The Smart-Contracts of RyuGen2 Staking
View Live Version
Β·
Ryu Collection
Β·
RyuGen2 Collection
Β·
Ryusaur Collection
Table of Contents
This repository contains the contracts used for the staking of the RyuGen2 collection.
These are EVM compatible.
Ryu NFT is a collection of ERC721 tokens available on the Avalanche blockchain.
This one has already realized more than 10 000 $AVAX volume.
The collection sold out at 3333 NFT, the mint price was 2.22 $AVAX.
Gen1 dragons include 3234 base and 99 legendary which can breed and be staked for daily $nRyu.
By staking their Ryu Gen1 users can generate $nRyu.
$nRYU is the Gen1 staking rewards token. It's an ERC20 token.
$nRYU has a hard cap supply of 130,000,000 tokens.
The $nRYU token can be utilized on Breeding, Potions acquisitions, Gen2 Prestige system, and more.
π Check the token on SnowtraceRyuGen2 is a collection of ERC721 tokens available on the Avalanche blockchain.
These tokens are only obtainable by breeding Ryu Gen1 tokens or by using potions from the lab.
The collection is capped at 9999 NFT.
Ryu Gen2 is the first generation of offspring in the Ryu Ecosystem. Stake these NFTs to earn $nRyu.
π Check the collection on KalaoRyusaurs (DINOs) were launched as a free mint on KalaoGo. Unlike most free mints from this time, this NFT bears actual utility.
Ryusaurs function most similarly to the Gen2 Staking Potions, but without the expiration date.
The collection is capped at 999 NFT.
This staking contract does not work like the usual staking contracts.
Indeed this one works with a system of level and tier and will thus incite the users to climb these.
Each level will allow the user to obtain greater returns.
In addition to this level and tier mechanics it will also be possible to boost the emissions of its NFT thanks to the staking of other collections: Ryusaurs and Ryu Gen1.
This contract also manages the specificities of Ryu Gen2 NFT's
This contract has been designed to maximize the use of the different collections and the $nRyu token while allowing to track its issue.
Indeed by joining a Ryusaur or a RyuGen1 to his RyuGen2 staking you get a token emission boost.
The contract also allows you to retrieve a leaderboard of levels and ranks obtained that will create community engagement
The token $nRyu is no longer mintable and the contract will have to be fed manually by the creator by sending the tokens on it.
All costs, earnings, emissions and cap are expressed in $nRyu.
Each level change is subject to a cost which is defined by the following function:
This gives us the following table which is not dependent on the tier:
Each level passage also allows the token to increase its emissions per day, its emissions are defined by the following function:
This give us the followings tables :
Each passage of level thus also allows the token to increase its cap of emission (maximum of gained token), this one is defined by the following function:
By calculating the sum of the terms of this sequence, we obtain the total gain per NFT of : 7117,98075 $nRyu
The number of tokens distributed will therefore be obtained via the function, where x is the RyuGen2 Supply :
To get a local copy up and running follow these simple example steps.
- npm
npm install npm@latest -g
- hardhat
npm install hardhat
- Clone the repo
git clone https://github.com/YassineSMARA/ryu-breeding-contracts.git
- Install NPM packages
npm install
- Enter your PRIVATE_KEY in
.env.example and rename the file to
.env`PRIVATE_KEY=ENTER_YOUR_PRIVATE_KEY
Try running some of the following tasks:
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts
npx eslint '**/*.{js,ts}'
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix
Yassine SMARA
Discord: Krabs#9454
Mail: 1yassine.smara@gmail.com