← All workContact us
Staking Contract
ERC721A Staker
Open source · Open-source prototype
Most NFT staking contracts lock the token in escrow, which means an approval, a transfer and gas on the way in and out. ERC721A Staker takes a different route: the NFT stays in the holder’s wallet and keeps earning until it moves.
The trick is ERC721A’s ownership data. Each token records when its current owner received it, so the staker compares that timestamp with the moment staking began. A transfer changes the timestamp and ends the stake on its own, with no lock-up and no approval.
What we did
- Stake detection based on ERC721A ownership timestamps, so transfers end a stake automatically.
- Rewards in any ERC-20 token, accrued per second.
- Batch stake and harvest, plus view helpers for front ends (staked tokens per owner, stake status).
- Gas-conscious storage: packed uint48 structs, immutable parameters and custom errors.
- 48 test cases with time-travel helpers.
More work
Have a project in mind?
Bringing Art + Utility to the Metaverse and the NFT space
