Function: claimReward(address recipient)
This function is used by users to claim their rewards.
Inputs
recipient
Control: Fully controlled.
Constraints: No constraints.
Impact: The recipient of the rewards.
Branches and code coverage (including function calls)
Intended branches
The function internally calls
_claimReward
, which will trigger issuance and accrue the collateral gains.The
_claimReward
should update the deposits and snapshot if there are either debt loss, collateral gains, or some claimable rewards for the user.
Function call analysis
treasury.transferAllocatedTokens(msg.sender, recipient, amount)
What is controllable?
msg.sender
andrecipient
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.