- User can stake their NFTs, which rewards them 1 point per hour per NFT
- User can redeem their points anytime
- User can unstake their NFT, which will trigger
A user can only have 1 UserInfo. This account tracks the total points accumulated by the user and the current active staked NFT.
A user can have multiple UserStakeInfo. Each UserStakeInfo tracks the state of each staked NFT, such as the time the NFT was staked, the last time it was redeemed, and the current state.
- If required, initialize
UserInfo
,UserStakeInfo
, and token account forUserStakeInfo
. - Transfer NFT from the user token account to the token account owned by
UserStakeInfo
. - Update data field of
UserInfo
andUserStakeInfo
- Calculate points based on
last_stake_redeem
fromUserStakeInfo
and update balance inUserInfo
- Transfer NFT back to the user token account from token account owned by
UserStakeInfo
. - Calculate points based on
last_stake_redeem
fromUserStakeInfo
and update balance inUserInfo
- Allow any collection to create their owned staking pool
- Complete NFT collection verification checking
- Allow one click stake all, redeem all, and unstake all