The StakingERC721 is a staking contract that allows to get rewards in ERC20.
The repository contains contracts for farming with any ERC721 compatible NFTs.
Any specified ERC-721 can be used to farm any ERC-20 compatible tokens, by depositing/locking them into the ERC721Staking contract that uses ERC-721 instead of the normal ERC-20 token. NFT owners can stake or unstake their NFTs at any time.
You can access this Module and the code here: https://bit.ly/3MzgnCH
How to Use Staking ERC721
- Prepares staking token(ERC721), rewards token(ERC20) address, and rewards duration.
- Owner funds rewards token.
- Users can stake staking tokens, rewards amount will be calculated by shares.
- Users can unstake tokens if requires or exit staking.
- Users can claim rewards anytime.
- Owner can fund again after rewards duration.
Functions
#WRITE
- claim
- fund
- onERC721Received
- renounceOwnership
- setPaused
- setRewardsDuration
- stake
- unstake
- recoverERC20
- transferOwnership
- exit
#READ
- balanceOf
- balances
- earned
- getRewardForDuration
- lastTimeRewardApplicable
- lastUpdateTime
- owner
- paused
- periodFinish
- rewardPerToken
- rewardPerTokenStored
- rewardRate
- rewards
- rewardsDuration
- rewardsToken
- stakedAssets
- stakingToken
- totalSupply
- userRewardPerTokenPaid
You can access this Module and the code here: https://bit.ly/3MzgnCH
If you still haven’t signed up to Bunzz, what are you waiting for?
Sign up here https://app.bunzz.dev/signup and get your smart contracts deployed in 5 minutes through our great GUI.