Post mortem of Fantom Kittens HD minting release — Part 1 — (12/18/2021)

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

Originally sent on Discord: https://discord.com/channels/888201624466628619/914855873921318922/921786099481845820

For the launch of Kittens HD we had prepared several minting options including free claims for those who had been with us in some way believing in the FakeWorms Studio progress, one anti-sniping feature and ERC2981 for on-chain royalties:

  • Normal public minting. Get one kitten for 4.2 FTM, 3 for 4.1 FTM and 10 for 4.0 FTM
  • OG minting. Claim 1:1 HD for every OG Kitten you had in your wallet.
  • Specials minting. Claim 1 HD for every special kittens you had in your wallet.
  • rKITTEN minting. Mint 1 HD kitten for every 420 rKITTEN you had prior snapshot or if you have ever staked in MasterKitten.

Unfortunately after launched we discovered we had some unexpected outputs in the claiming methods, in the anti-sniping feature and on-chain royalties.

Fortunately these do not affect the experience of our community with our collection and we properly patched them without any issues!

The claiming ones were the most critical and could only actually be hard to deal with if we didn’t patch before finish minting

👉 Normal public minting didn’t check if the amount desired would mint more than the total possible amount of 10k Kittens HD. We solved this by revoking claiming in the original contract and deploying another contract that does the proper checks.

👉 The anti-sniping feature we put have a centralized resolver URI that points out to our server handler and we check if a token has been minted before delivering it to the requester. This makes it impossible to guest the next kitten. Unfortunately we shadowed the baseURI local variable and we can’t change it anymore.

👉Specials claiming didn’t check if the user had already claimed for that Special Kittens token in their wallet before. We then deployed another contract that does the correct checks and sanitization.

👉 We misplaced the division operator in the on-chain royalties method and all operations overflow and default to 0. Nothing we can do about this now but fortunately all marketplaces have a fallback for owner provided royalties.

--

--