Skip to content

Commit b0c30d2

Browse files
authored
Merge pull request aave#98 from AWTammsaar/master
Update handleAction documentation
2 parents 13d0634 + 78a065a commit b0c30d2

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

contracts/rewards/interfaces/IRewardsController.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ interface IRewardsController is IRewardsDistributor {
110110
function configureAssets(RewardsDataTypes.RewardsConfigInput[] memory config) external;
111111

112112
/**
113-
* @dev Called by the corresponding asset on any update that affects the rewards distribution
114-
* @param user The address of the user
115-
* @param userBalance The user balance of the asset
116-
* @param totalSupply The total supply of the asset
113+
* @dev Called by the corresponding asset on transfer hook in order to update the rewards distribution.
114+
* @param user The address of the user whose asset balance has changed
115+
* @param userBalance The previous user balance prior to balance change
116+
* @param totalSupply The total supply of the asset prior to user balance change
117117
**/
118118
function handleAction(
119119
address user,

docs/rewards/rewards-controller.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The `RewardsDistributor` abstract contract manages the distribution and accounta
1212

1313
## Rewards Controller
1414

15-
The Rewards Controller is the main contract and where the user interacts to claim the rewards of their positions. It inherits `RewardsDistributor` to handle the distribution of rewards. The users of the incentivised ERC20 assets will accrue value if they hold their tokens in possession without the need of staking or blocking the assets inside a contract. At every transfer the asset must call the `handleAction` method to account the rewards of the user.
15+
The Rewards Controller is the main contract and where the user interacts to claim the rewards of their positions. It inherits `RewardsDistributor` to handle the distribution of rewards. The users of the incentivised ERC20 assets will accrue value if they hold their tokens in possession without the need of staking or blocking the assets inside a contract. At every transfer the asset must call the `handleAction` method to account for the accumulated rewards of the user prior to balance change.
1616

1717
The users can claim all the rewards or an individual reward per transaction, with a variety of functions that allow more granularity at claim.
1818

@@ -155,19 +155,19 @@ The `RewardsDistributorTypes.RewardsConfigInput` struct is composed with the fol
155155

156156
## handleAction
157157

158-
Called by the corresponding asset on transfer hook to update the rewards distribution of an user.
158+
Called by the corresponding asset on transfer hook in order to update the rewards distribution.
159159

160160
### Interface
161161

162162
`function handleAction(address user, uint256 userBalance, uint256 totalSupply) external;`
163163

164164
### Input parameters
165165

166-
| Parameter Name | Type | Description |
167-
| -------------- | ------- | ----------------------------- |
168-
| user | address | The address of the user |
169-
| userBalance | uint256 | The user balance of the asset |
170-
| totalSupply | uint256 | The total supply of the asset |
166+
| Parameter Name | Type | Description |
167+
| -------------- | ------- | ---------------------------------------------------------- |
168+
| user | address | The address of the user whose asset balance has changed |
169+
| userBalance | uint256 | The previous user balance prior to balance change |
170+
| totalSupply | uint256 | The total supply of the asset prior to user balance change |
171171

172172
## claimRewards
173173

0 commit comments

Comments
 (0)