Comment on page
Liquidity Mining
Active liquidity mining contracts are all here
For example, in USX/DF staking pool,
- 1.Get the price in USD of all assets, in this case, that would be USX and DF, assumption that the price is
pUSX
andpDF
; - 2.Get total balance of USX and DF deposited in the LP contract, say
tbUSX
andtbDF
; - 3.Calculate 1 LP token value should be:
vLP = (pUSX * tbUSX + pDF * tbDF) / LP.totalSupply;
- 4.Get total balance deposited in staking contract, say
tbLP
, then the total value of deposited LP tokens should be:tvLP = vLP * tbLP;
- 5.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;
- 6.The annual yield should be:
annual_yield = tvR / tvLP * 100%;
Mainnet
BSC
Arbitrum
Optimism
Polygon
Name | Address |
---|---|
Reward Treasury | |
UNISWAP - ETH/DF |
Name | Address |
---|---|
Reward Treasury | |
DODOEX - USX/BUSD |
Name | Address |
---|---|
Reward Treasury | |
DODOEX - USX/USDC | |
DODOEX - USX/EUX | |
Curve - USX/2CRV |
Name | Address |
---|---|
Reward Treasury | |
| |
Name | Address |
---|---|
Reward Treasury | |
| |
Returns all activated staking contracts.
function getAllRecipients()
public
view
returns (address[] memory _allRecipients)
Every staking pool shares the same interface for users depositing/withdraw LP tokens and claim their rewards.
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. |
Returns the total distributed amount since start time.
function rewardDistributed() public view returns (uint256);
Returns the up-to-date amount of reward to be claimed.
function earned(address _account) public view returns (uint256);
Deposit LP token into staking pool.
function stake(uint256 _amount) public;
Withdraw LP token from staking pool.
function withdraw(uint256 _amount) public;
Claim rewards.
function getReward() public;
Withdraw all LP tokens and claim rewards.
function exit() external;
Last modified 1yr ago