โ Liquidity Mining
The current liquidity mining contract on the DODO platform includes two versions of implementation. The following will describe the corresponding contract interfaces, as well as the mining projects performed under each network.
DODOMineV1 #
The first version of the mining contract can flexibly add and remove staked tokens, and divide the overall DODO token reward by setting the weight of each pledged token. This version is mainly for the DODO V1 Standard pool, which provides liquidity for single tokens and distributes DODO token rewards.
Write Functions#
The main write functions of the contract include deposit
for staking, withdraw
and withdrawAll
for token withdrawals, and claim
and claimAll
for withdrawing rewards.
deposit#
For the staking function deposit
, you need to pass in the address of the token to be staked, and the number of tokens to be staked by the user. Before calling it, make sure that the user's staking tokens are authorized to the mining contract, and that the mining contract internally transfers the staking tokens from the user's account to the mining contract via the transferFrom
method. When deposit
is called, the contract will also automatically withdraw and transfer the user's currently earned rewards to the user's account.
function deposit(address _lpToken, uint256 _amount) public;
withdraw and withdrawAll#
For withdrawals, the contract provides the two methods withdraw
&& withdrawAll
. For the withdraw
function, you need to pass the token address and specify the number of tokens to be withdrawn. For the withdrawAll
function, you only need to pass the token address to be withdrawn, and the contract will withdraw all the tokens pledged by the current user to his account. Also, by calling either of these two functions, the contract will automatically withdraw and transfer the current rewards to the user's account.
function withdraw(address _lpToken, uint256 _amount) public;
function withdrawAll(address _lpToken) public;
claim and claimAll#
For reward withdrawal, the contract provides the functions claim
&& claimAll
. The former requires passing in the address of the staked token from which the reward tokens are extracted. The latter function will extract all the mining rewards that the current user has participated in.
Please note that the claimAll
function will consume more gas, so please use it carefully.
function claim(address _lpToken) public;
Solifunction claimAll() public;
Read Functions#
The first version of the mining contract also involves a number of read functions, including the following.
getUserLpBalance#
The function getUserLpBalance
gets the number of tokens staked by the user, which requires passing in the staked token address as well as the user address.
function getUserLpBalance(
address _lpToken,
address _user
) public view returns (uint256);
getPendingReward and getAllPendingReward#
These functions return the amount of unclaimed reward tokens belonging to the current user. For getPendingReward
, you need to pass in the staked token address and the user address to get the number of user rewards corresponding to the specified staked asset. To run getAllPendingReward
, you only need to pass in the user's address, and the function will return the total number of tokens rewarded for all mining projects the current user has participated in.
function getPendingReward(address _lpToken, address _user) external view returns (uint256);
function getAllPendingReward(address _user) external view returns (uint256);
Note: in the current V1 version of mining activities, reward adjustments are more flexible and modifiable
Current Mining Projects Using DODOMineV1#
- ETH (mining contract address: 0xaed7384f03844af886b830862ff0a7afce0a632c)
- Currently releasing 4.2 DODO rewards per block.
Staking Token | Liquidity Pool | Weight |
---|---|---|
WETH DLP | WETH - USDC | 200 |
USDC DLP | WETH - USDC | 200 |
WBTC DLP | WBTC - USDC | 200 |
USDC DLP | WBTC - USDC | 200 |
USDC DLP | WBTC - USDC | 440 |
USDT DLP | WBTC - USDC | 440 |
- BSC (mining contract address: 0x01f9BfAC04E6184e90bD7eaFD51999CE430Cc750)
- Currently releasing 0.54 DODO rewards per block.
Staking Token | Liquidity Pool | Weight |
---|---|---|
BUSD DLP | BUSD - USDT | 0.22 |
USDT DLP | BUSD - USDT | 0.22 |
USDC DLP | USDC - BUSD | 0.05 |
BUSD DLP | USDC - BUSD | 0.05 |
- Arbitrum One (mining contract address: 0xE3C10989dDc5Df5B1b9c0E6229c2E4e0862fDe3e)
- Currently releasing 1.5 DODO rewards per block.
Staking Token | Liquidity Pool | Weight |
---|---|---|
WETH DLP | WETH - USDC | 200 |
USDC DLP | WETH - USDC | 200 |
WBTC DLP | WBTC - USDC | 200 |
USDC DLP | WBTC - USDC | 200 |
USDT DLP | USDT - USDC | 200 |
USDC DLP | USDT - USDC | 200 |
- Aurora (mining contract address๏ผ0xDBFaF391C37339c903503495395Ad7D6B096E192)
- Currently releasing 0.1 DODO rewards per block.
Staking Token | Liquidity Pool | Weight |
---|---|---|
USDT DLP | USDT - USDC | 200 |
USDC DLP | USDT - USDC | 200 |
- Polygon (mining contract address: 0xB14dA65459DB957BCEec86a79086036dEa6fc3AD)
- Currently releasing 0.44 DODO rewards per block.
Staking Token | Liquidity Pool | Weight |
---|---|---|
USDC DLP | USDT - USDC | 200 |
USDT DLP | USDT - USDC | 200 |
- MoonRiver (mining contract address: 0x6b3518E0260aE1515976A30FA67513C760De2570)
- Currently releasing 0.005 WMOVR rewards per block.
Staking Token | Liquidity Pool | Weight |
---|---|---|
USDT DLP | USDT - USDC | 200 |
USDC DLP | USDT - USDC | 200 |
- Boba (mining contract address: 0x2d8349E957A69E4cC7B4ef225A4B6a85Be57FBF3)
- Currently releasing 3 DODO rewards per block.
Staking Token | Liquidity Pool | Weight |
---|---|---|
USDT DLP | USDT - USDC | 200 |
USDC DLP | USDT - USDC | 200 |
DODOMineV2 #
In the second version of the mining contract, every contract corresponds to a staking token, and supports multiple mining.
Write Functions #
The main write functions of the contract include deposit
for staking, withdraw
for withdrawals, and claimReward
and claimAllRewards
for claiming mining rewards.
deposit #
For the staking function deposit
, the parameter passed is the amount of tokens being staked. Prior to staking, the user's tokens are authorized to the current mining contract, and the transferFrom
function is called internally to transfer the user's staked tokens to the mining contract.โ
function deposit(uint256 amount) externSol
withdraw#
For the withdraw
staked token function, pass in the number of staked tokens to be withdrawn.
function withdraw(uint256 amount) external
claimReward and claimAllRewards#
For the claimReward
function, you need to pass in the corresponding serial number of the reward tokens, and only the corresponding reward tokens will be extracted. By contrast, the claimAllRewards
function, will extract all the reward tokens mined.
function claimReward(uint256 i) publicfunction claimAllRewards() external
Read Functions#
The second version of the mining contract also involves a number of read functions, including the following:
getPendingReward and getPendingRewardByToken#
These functions get the number of reward tokens unclaimed by the user. getPendingReward
requires passing in the user address and the corresponding reward token serial number, while getPendingRewardByToken
requires you to pass in the user address and the reward token address.
function getPendingReward(address user, uint256 i) public view returns (uint256);
function getPendingRewardByToken(address user, address rewardToken) external view returns (uint256);
Note: in the current V2 version of mining activities, reward adjustments are be more flexible and modifiable.
Current Mining Projects Using DODOV2โ#
ETHโ#
- Staked Token DAI-USDT DLP (0x3058ef90929cb8180174d74c507176cca6835d73)
- Mining Contract 0x1A4F8705E1C0428D020e1558A371b7E6134455A2
- Currently releasing 1.25 DODO rewards per block.
BSCโ#
- Staked Token DODO-BNB DLP (0xd534fae679f7f02364d177e9d44f1d15963c0dd7)
- Mining Contract 0x322B43e406D1B4Df9Bc36d058317Dd1cd3b0385F
- Currently releasing 0.3 DODO rewards per block.
Arbitrum Oneโ#
- Staked Token DODO-USDC DLP (0x6a58c68ff5c4e4d90eb6561449cc74a64f818da5)
- Mining Contract 0x38Dbb42C4972116c88E27edFacD2451cf1b14255
- Currently releasing 0.5 DODO rewards per block.
Aurora#
- Staked Token DODO-USDC DLP (0xc7689e5315a8b237ac7ab62119df299dd8c4b6d5)
- Mining Contract 0x10353A2e2EeAE8369c685526FC724137002BBDF9
- Currently releasing 0.1 DODO rewards per block.
- Currently releasing 0.007 NEAR rewards per block.
Polygon#
- Staked Token DODO-USDT DLP (0x581c7DB44F2616781C86C331d31c1F09db87A746)
- Mining Contract 0x738aba1389C5e37d24b5B669F07CBEa594c733E4
- Currently releasing 0.11 DODO rewards per block.
Boba#
- Staked Token DODO-USDT DLP (0xb55c56541dceef41322b5d7a7880594afcd9711c)
- Mining Contract 0xb69e388c678d6b5aed323e3ef2f22d5fef8fb1ec
- Currently releasing 0.44 Boba rewards per block.