Staking ERC721 Smart Contract Module in Bunzz

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

  1. Prepares staking token(ERC721), rewards token(ERC20) address, and rewards duration.
  2. Owner funds rewards token.
  3. Users can stake staking tokens, rewards amount will be calculated by shares.
  4. Users can unstake tokens if requires or exit staking.
  5. Users can claim rewards anytime.
  6. 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.

Share this article:

Leave a Comment

Your email address will not be published. Required fields are marked *