Leverage user can avoid paying fees to bond holders by withdrawing before auction ends
Leverage token holders in a bond/leverage pool can redeem their tokens before the quarterly auction transfers reserve funds out, so their redemption is not charged the fee that funds bond holder payments. This lets them take leverage exposure without paying their share, pushing those fees onto the remaining leverage holders.
0x52 Follow with moray5554 and phoenixv110
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2024-12-plaza-finance-judging/issues/450
This issue has been acknowledged by the team but won't be fixed at this time.
Found by
0x52, moray5554, phoenixv110
Summary
Bond holders are paid fees by leverage holders in discrete quarterly payments. Due to the long length of this period, leverage holders can easily exploit and avoid this fee by withdrawing before funds are taken to pay for the auction. By doing this they can easily avoid paying all fees to bond holders, causing substantial losses to other leverage holders who are now forced to pay the malicious user's share of the fees.
if (collateralLevel <= COLLATERAL_THRESHOLD) {
redeemRate = ((tvl * multiplier) / assetSupply);
} else if (tokenType == TokenType.LEVERAGE) {
@> redeemRate = ((tvl - (bondSupply * BOND_TARGET_PRICE)) / assetSupply) * PRECISION;
} else {
redeemRate = BOND_TARGET_PRICE * PRECISION;
}
We see above that the redeemRate for leverage tokens is calculated based on the number of asset held by the pool.
function transferReserveToAuction(uint256 amount) external virtual {
(uint256 currentPeriod, ) = bondToken.globalPool();
address auctionAddress = auctions[currentPeriod];
require(msg.sender == auctionAddress, CallerIsNotAuction());
@> IERC20(reserveToken).safeTransfer(msg.sender, amount);
}
We also see that funds are transferred out of the contract until after the auction is completed. Therefore if the user withdraws before the auction ends then they will received an amount that is not subject to the bond holders fee.
Root Cause
Pool.sol#L383-L414 fails to enforce or charge partial fees to redeeming leverage users
Internal preconditions
None
External preconditions
None
Attack Path
N/A
Impact
Leverage users can get leverage exposure for free while forcing other users to pay their fees
POC
Unfortunately it is impossible to demonstrate via POC because transferReserveToAuction is broken
Mitigation
N/A
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
Likely the redemption logic calculates the leverage payout from current pool assets without deducting or charging the periodic fee owed to bond holders, so redeeming before the auction transfer avoids it entirely.
Impact
Leverage holders can obtain leverage exposure for free while other leverage holders are forced to pay the fees the withdrawer avoided; the report notes a proof of concept was not possible because the auction transfer function is broken.
What the attacker needed
Holds leverage tokens in the pool; redeems before the auction ends
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.
The pool has two kinds of tokens: bond tokens, which are meant to earn a regular fee, and leverage tokens, which take on more risk. That fee is collected only at set times when money is moved out for an auction. If a leverage holder cashes out just before that moment, the fee is never taken from them, and the other leverage holders end up covering it.
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.