Skip to content

This repository contains the contracts used for the staking of the RyuGen2 collection.

Notifications You must be signed in to change notification settings

YassineSMARA/ryu-staking-contract

Repository files navigation


Logo

Ryu Staking Contracts

The Smart-Contracts of RyuGen2 Staking

View Live Version Β· Ryu Collection Β· RyuGen2 Collection Β· Ryusaur Collection

Table of Contents
  1. About The Project
  2. Breeding
  3. Potions
  4. Getting Started
  5. Usage
  6. Test
  7. Contact

About The Project

This repository contains the contracts used for the staking of the RyuGen2 collection.
These are EVM compatible.

(back to top)

Built With


Hardhat Mocha Chai

(back to top)

Ryu Gen1

Ryu Gen1

Ryu NFT is a collection of ERC721 tokens available on the Avalanche blockchain.
This one has already realized more than 10 000 $AVAX volume.

Tokenomics

The collection sold out at 3333 NFT, the mint price was 2.22 $AVAX.

Description

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.

πŸ›’ Check the collection on Kalao

(back to top)

$nRyu

$nRyu

$nRYU is the Gen1 staking rewards token. It's an ERC20 token.

Tokenomics

$nRYU has a hard cap supply of 130,000,000 tokens.

$nRyu Tokenomics

Description

The $nRYU token can be utilized on Breeding, Potions acquisitions, Gen2 Prestige system, and more.

πŸ” Check the token on Snowtrace

(back to top)

Ryu Gen2

Ryu Gen2

RyuGen2 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.

Tokenomics

The collection is capped at 9999 NFT.

Description

Ryu Gen2 is the first generation of offspring in the Ryu Ecosystem. Stake these NFTs to earn $nRyu.

πŸ›’ Check the collection on Kalao

(back to top)

Ryusaur

Ryusaur

Ryusaurs (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.

Tokenomics

The collection is capped at 999 NFT.

πŸ›’ Check the collection on Kalao

(back to top)

Description

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.

(back to top)

Maths

All costs, earnings, emissions and cap are expressed in $nRyu.

Cost to go from one level to the next

Each level change is subject to a cost which is defined by the following function:

$$ \begin{align*} f(x) = 1.36 * x + 2.05 \end{align*} $$

This gives us the following table which is not dependent on the tier:

Cost Table

Emission/day per level and tier

Each level passage also allows the token to increase its emissions per day, its emissions are defined by the following function:

$$ \begin{align*} f(x) = 0.216334 * x + K \\ tier 1 : K = 0.6833 \\ tier 2 : K = 2.1833 \\ tier 3 : K = 3.6833 \\ \end{align*} $$

This give us the followings tables :

Emission Tier 1

Emission Tier 1 Table

Emission Tier 2

Emission Tier 2 Table

Emission Tier 3

Emission Tier 3 Table

Emission Cap

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:

$$ \begin{align*} f(x) = 1.4729 * x + K \\ tier 1 : K = 0.6833 \\ tier 2 : K = 4.4375 \\ tier 3 : K = 8.18125 \\ \end{align*} $$

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 :

$$ \begin{align*} f(x) = 7117.98075 * x \end{align*} $$

Emission Cap Tier 1

Emission Cap Tier 1 Table

Emission Cap Tier 2

Emission Cap Tier 2 Table

Emission Cap Tier 3

Emission Cap Tier 3 Table

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • npm
    npm install npm@latest -g
  • hardhat
    npm install hardhat

Installation

  1. Clone the repo
    git clone https://github.com/YassineSMARA/ryu-breeding-contracts.git
  2. Install NPM packages
    npm install
  3. Enter your PRIVATE_KEY in .env.example and rename the file to .env`
    PRIVATE_KEY=ENTER_YOUR_PRIVATE_KEY

(back to top)

Usage

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

Test

Test Coverage

(back to top)

Contact

Yassine SMARA
Discord: Krabs#9454
Mail: 1yassine.smara@gmail.com

(back to top)

About

This repository contains the contracts used for the staking of the RyuGen2 collection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published