Tomb forks reloaded: the smart contracts
In the previous stories, Tomb forks flaws and improvements, and Tomb forks from a different angle, we described the different flaws of current Tomb forks, and explained at how we look at them from a completely different perspective.
They were quite theoretical and abstract articles.
Here, we'll get dirty and dive into the solidity code of what we could call Tomb fork reloaded, or Tomb fork 2.0 smart contracts.
To start with, I won't avoid the joy of explaining how badly written current Tomb fork smart contracts are written, especially considering the amazing gas fees they force their users to spend. (To be honest, these smart contracts do contain some brilliant features that I could never have imagined nor coded myself. They are just over complicated, and almost completely forgot about gas cost optimisation. More over, they are still written in Solidity 0.6, and still use that stupid SafeMath library.)
Then I'll give you the code of my simplified, re-organised, gas cost optimised version, so you can deploy something better next time you want to create a Tomb fork.
I promise I'll write this story, as soon as I have written the two previous ones.