Reward Distribution

Every dForce Lending user accrues DF for each block they are supplying to or borrowing (including minting Synths) from the protocol. globalDistributionSpeed and globalDistributionSupplySpeed represent the total amount of token distributed per block on the borrow and supply sides respectively. Each asset that participated in the reward schedule will be allocated with a distribution speed, distributionSpeed and distributionSupplySpeed represent reward amount distribute on supply and borrow sides respectively.

Variables to address distribution speed of each asset.

/// @notice the global Reward distribution speed for borrow
    uint256 public globalDistributionSpeed;
    
/// @notice the global Reward distribution speed for supply
    uint256 public globalDistributionSupplySpeed;

/// @notice the Reward distribution speed of each iToken
    mapping(address => uint256) public distributionSpeed;
    
/// @notice the Reward distribution speed supply side of each iToken
    mapping(address => uint256) public distributionSupplySpeed;

Deployed Contracts

  • General Pool

Name

Address

Descriptions

Reward Distributor

Interface for distribution

LendingData

Interface for data

  • Stock Pool (not distributed yet)

Name

Address

Descriptions

Reward Distributor

Interface for distribution

LendingData

Interface for data

How to calculate the claimable amount of reward in LendingDataV2.sol?

Returns the amount of reward one account has earned in participating in all the assets of supplying or borrowing(mint MSD token considers as borrow).

function getAccountRewardAmount(address _account) external returns (uint256)

Claim reward for any account and any asset in RewardDistributorV3.sol.

/**
* @notice Claim reward accrued in iTokens by the holders
* @param _holders The account to claim for
* @param _iTokens The _iTokens to claim from
 */
    function claimReward(address[] memory _holders, address[] memory _iTokens)
        public;

Claim reward for any account of all participated assets supplied to or borrowed (including mint Synths) from the protocol RewardDistributorV3.sol.

/**
* @notice Claim reward accrued in iTokens by the holders
* @param _holders The account to claim for
* @param _suppliediTokens The _suppliediTokens to claim from
* @param _borrowediTokens The _borrowediTokens to claim from
 */
    function claimRewards(address[] memory _holders, address[] memory _suppliediTokens, address[] memory _borrowediTokens)
        external 

Claim reward for any account of all participated assets RewardDistributorV3.sol.

**
* @notice Claim reward accrued in all iTokens by the holders
* @param _holders The account to claim for
*/
    function claimAllReward(address[] memory _holders) external

Last updated