Liquidity Mining
Active liquidity mining contracts are all here
How to calculate staking annual yield?
For example, in USX/DF staking pool,
Get the price in USD of all assets, in this case, that would be USX and DF, assumption that the price is
pUSX
andpDF
;Get total balance of USX and DF deposited in the LP contract, say
tbUSX
andtbDF
;Calculate 1 LP token value should be:
vLP = (pUSX * tbUSX + pDF * tbDF) / LP.totalSupply;
Get total balance deposited in staking contract, say
tbLP
, then the total value of deposited LP tokens should be:tvLP = vLP * tbLP;
Get reward rate from staking contract, this variable represents the distributed amount of reward token per block, in Ethereum Mainnet, the block period is ~13 seconds (for BSC, it's about 3 seconds per block), so distribution value per year is:
tvR = pDF * RR(RewardRate) * blockPerYear;
blockPerYear = 3600 * 24 * 365 / block_peroid;
The annual yield should be:
annual_yield = tvR / tvLP * 100%;
Deployed Contracts
Reward Treasury
UNISWAP - ETH/DF
Reward Distributor
Function getAllRecipients()
Returns all activated staking contracts.
Staking Pool
Every staking pool shares the same interface for users depositing/withdraw LP tokens and claim their rewards.
Variables
Name
Descriptions
address rewardToken
reward token address.
uint256 rewardRate
amount of reward token will be distributed per block.
uint256 startTime
timestamp for starting to distribute reward,
who deposits before this time will not get any reward.
function rewardDistributed()
Returns the total distributed amount since start time.
function earned()
Returns the up-to-date amount of reward to be claimed.
function stake()
Deposit LP token into staking pool.
function withdraw()
Withdraw LP token from staking pool.
function getReward()
Claim rewards.
function exit()
Withdraw all LP tokens and claim rewards.
Last updated