Protocol rewards tokens permanently stuck
During liquidations the protocol records a 2.8% share of seized collateral in a protocolReward mapping, but no function can ever withdraw or use those tokens. The protocol's earned revenue therefore accumulates permanently locked in the contract.
Source: https://github.com/sherlock-audit/2025-05-lend-audit-contest-judging/issues/184
Found by
0x15, 0xAlix2, Kvar, SarveshLimaye, Waydou, benjamin_0923, chaos304, h2134, jokr, newspacexyz, patitonar, t.aksoy, wickie, xiaoming90, yaioxy, zxriptor
Summary
During liquidations, the protocol seizes a portion of collateral tokens (2.8%) as protocol rewards. These seized tokens are tracked in the protocolReward mapping but have no mechanism for withdrawal, causing them to be permanently stuck in the contract.
Root Cause
In CoreRouter.sol, the protocol calculates and stores its share of seized tokens during liquidations:
uint256 currentReward = mul_(seizeTokens, Exp({mantissa: lendStorage.PROTOCOL_SEIZE_SHARE_MANTISSA()}));
lendStorage.updateProtocolReward(lTokenCollateral, lendStorage.protocolReward(lTokenCollateral) + currentReward);
The PROTOCOL_SEIZE_SHARE_MANTISSA is set to 2.8% (2.8e16), meaning the protocol claims 2.8% of all seized collateral. However, there are no functions in LendStorage.sol, CoreRouter.sol, or CrossChainRouter.sol that allow withdrawal or utilization of these accumulated rewards.
The only function that modifies protocolReward is updateProtocolReward(), which can only increase the balance but never decrease it.
Internal Pre-conditions
None
External Pre-conditions
None
Attack Path
This is not an attack but a design flaw:
- The user's position becomes liquidable due to market conditions
- Liquidator calls
liquidateBorrowInternal() - Protocol calculates its 2.8% share:
currentReward = seizeTokens * 0.028 - Protocol share is added to
protocolReward[lTokenCollateral]mapping - Remaining tokens (97.2%) go to the liquidator
- Protocol's 2.8% share remains permanently stuck with no withdrawal mechanism
Impact
High - Protocol loses access to earned revenue from liquidations. Over time, significant value accumulates in the contract that cannot be recovered, representing a permanent loss of protocol funds that could be used for:
- Treasury operations
- Development funding
- Emergency reserves
- Governance token buybacks
PoC
No response
Mitigation
The protocol team should reassess the intended usage of liquidation-seized funds and implement appropriate mechanisms accordingly. Potential approaches include:
- Adding accumulated protocol rewards to existing reserve mechanisms.
- Establishing governance-controlled usage of these accumulated assets.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The protocol credits itself a share of seized collateral in storage but never implements any function to withdraw or spend that balance.
Impact
The protocol permanently loses access to its earned liquidation revenue, which could otherwise fund treasury, development, reserves or buybacks.
What the attacker needed
A liquidatable borrower position; a liquidator executes the liquidation
The fix
The protocol should decide how seized rewards are meant to be used and add a mechanism, such as routing them into reserves or governance-controlled spending, so they can be withdrawn.
How it was found
- A user's position becomes liquidable due to market conditions
- A liquidator calls the internal liquidation function
- The protocol calculates its 2.8% share of the seized tokens
- That share is added to the protocolReward mapping for the collateral token
- The remaining 97.2% goes to the liquidator
- The protocol's share stays in the contract with no way to withdraw it
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a borrower is liquidated, part of their collateral is taken and a small slice (2.8%) is meant to go to the protocol itself. The code writes that slice into a record, but nothing in the contract lets anyone move those tokens out, so they sit there forever. It is like putting money in a safe that has no door.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.