The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Valid

Inability to Claim Rewards for Removed Tokens in Liquidation Pool contract

Summary:

The protocol permits users to stake TST and/or EUROs in the Liquidation Pool, accruing rewards from borrowing fees and vault liquidations. These rewards are claimable by stakers at their discretion. However, an issue arises when a token, once accepted and used in liquidations, is subsequently removed from the protocol. This removal prevents users from claiming their pending rewards in the removed token.

Vulnerability Details:

The claimRewards function enables users to claim their liquidation rewards, which are available for claiming anytime. This function relies on the getAcceptedTokens method to identify tokens eligible for reward distribution.

function claimRewards() external {
ITokenManager.Token[] memory _tokens = ITokenManager(tokenManager).getAcceptedTokens();
for (uint256 i = 0; i < _tokens.length; i++) {
ITokenManager.Token memory _token = _tokens[i];
uint256 _rewardAmount = rewards[abi.encodePacked(msg.sender, _token.symbol)];
if (_rewardAmount > 0) {
delete rewards[abi.encodePacked(msg.sender, _token.symbol)];
if (_token.addr == address(0)) {
(bool _sent,) = payable(msg.sender).call{value: _rewardAmount}("");
require(_sent);
} else {
IERC20(_token.addr).transfer(msg.sender, _rewardAmount);
}
}
}
}

The issue arises when the protocol’s list of accepted tokens is modified, particularly when tokens are removed. Any rewards pending in the removed token becomes unclaimable, as the claimRewards function ceases to recognize them as part of the rewardable assets.

Impact

Users will be unable to claim rewards that they have earned from liquidations involving tokens that have been removed from the accepted list.

Tools Used:

Manual analysis

Recommendation:

Modify the reward claiming process to include both current and previously accepted tokens. This adjustment will ensure that users can always claim their rewards, irrespective of any changes in the accepted tokens list.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

remove-token

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

removetoken-low

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.