Skip to content

Instantly share code, notes, and snippets.

@jessiepathfinder
Last active September 22, 2021 01:43
Show Gist options
  • Save jessiepathfinder/e4cd8d2613fc373c24d170ed3a257e8e to your computer and use it in GitHub Desktop.
Save jessiepathfinder/e4cd8d2613fc373c24d170ed3a257e8e to your computer and use it in GitHub Desktop.

MintME.com coin REKT post mortem

How are smart contract addresses computed

On MintME, smart contract addresses are computed using the hash of the deployer's address and nounce. The nounce is incremented every time you send a transaction.

How the REKT happened

When the MintME hardfork was performed, the devs stored the final state of the old blockchain in the initial state of the new blockchain. The devs failed to carry over address nounces, which meant that anyone can change smart contracts they have deployed.

Temporary fix

Send a bunch of zero-value transactions until your new nounce is bigger than your old nounce (e.g if you sent 30 transaction using your address before the fork, you have to send 31 zero-value transaction in order to completely mitigate this). This would prevent you from changing your smart contracts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment