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.

1
/// @notice the global Reward distribution speed for borrow
2
uint256 public globalDistributionSpeed;
3
4
/// @notice the global Reward distribution speed for supply
5
uint256 public globalDistributionSupplySpeed;
6
7
/// @notice the Reward distribution speed of each iToken
8
mapping(address => uint256) public distributionSpeed;
9
10
/// @notice the Reward distribution speed supply side of each iToken
11
mapping(address => uint256) public distributionSupplySpeed;
Copied!

Deployed Contracts

Ethereum Mainnet
Binance Smart Chain
  • General Pool
Contracts
Address
Descriptions
Reward Distributor
Interface for distribution
LendingData
Interface for data
  • Stock Pool (not distributed yet)
Contracts
Address
Descriptions
Reward Distributor
Interface for distribution
LendingData
Interface for data
  • General Pool
Contracts
Address
Descriptions
Reward Distributor
Interface for distribution
LendingData
Interface for data
  • Stock Pool (not distributed yet)
Contracts
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).
1
function getAccountRewardAmount(address _account) external returns (uint256)
Copied!

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

1
/**
2
* @notice Claim reward accrued in iTokens by the holders
3
* @param _holders The account to claim for
4
* @param _iTokens The _iTokens to claim from
5
*/
6
function claimReward(address[] memory _holders, address[] memory _iTokens)
7
public;
Copied!

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

1
/**
2
* @notice Claim reward accrued in iTokens by the holders
3
* @param _holders The account to claim for
4
* @param _suppliediTokens The _suppliediTokens to claim from
5
* @param _borrowediTokens The _borrowediTokens to claim from
6
*/
7
function claimRewards(address[] memory _holders, address[] memory _suppliediTokens, address[] memory _borrowediTokens)
8
external
Copied!

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

1
**
2
* @notice Claim reward accrued in all iTokens by the holders
3
* @param _holders The account to claim for
4
*/
5
function claimAllReward(address[] memory _holders) external
Copied!
Copy link