Fantom Kittens HD mid-minting post-mortem

Gabriel Rubens Abreu
Fantom Kittens
Published in
2 min readJan 29, 2022

Problem: Minting was broken due to an upgrade in the DAO safe contract.

What was happening and how did it happen:

When minting we forward the minting money to the DAO address (0xC748E6dE30222F4e9bC01812860FF005A82543E) which is a Gnosis Safe contract.

Recently Gnosis released an update to the safe which changed the behavior when receiving new ETH/Fantom into the account leading to a higher gas consumption. We were using address.transfer method to forward the minting money to the safe which applies a hard limit of 2300 gas units to the transfer which caused the transaction to revert because upon receiving the money the DAO safe contract was emitting a new event which causes the high gas consumption.

I had some suspicions about what was the culprit initially but it was taking hours to properly debug and validate them — like that someone had mistakenly removed the minter contract permissions to mint and etc. But then Marco Worms reminded me of Tenderly and it was then just a matter of plugging in the transaction in a forked simulation and in less than 5 minutes I could confirm everything!

Tenderly showing where the transaction was getting reverted

The solution: I deployed a new minter contract that uses a direct transfer method without hard capping the gas consumption of the transfer method.

Join the Kittens at https://discord.gg/nAkU5Tu3DE

--

--