WeVE (FTM) may be lost forever if redemption process is failed
The redemption process can fail if a user redeems more than their eligible amount, causing the destination chain transaction to revert without refunding the burned WeVE tokens. An attacker could lose their WeVE permanently by repeatedly redeeming due to slow cross-chain messaging.
Submitted by Chom
RedemptionSender.sol#L28-L51 RedemptionReceiver.sol#L72-L105
WeVE (FTM) may be lost forever if redemption process is failed.
Redemption process is likely to be failed if
- (redeemedWEVE += amountWEVE) > eligibleWEVE
- Not enough USDC or VELO in the contract
The case that redeem more than eligible can’t be fixed because eligibleWEVE is hardcoded on contract initialization.
This mean that if there are any mistake for example LayerZero slow down and user try to repeatedly redeem their WeVE, user will lose their WeVE token forever due to contract always reverted in the destination chain due to the reason that user has redeemed more than eligible.
Proof of Concept
- User redeem WeVE in fantom chain using redeemWEVE function in RedemptionSender contract.
- LayerZero slow but user think it is failed. (But it is just slow)
- User repeat process 1 again
- LayerZero call lzReceive in RedemptionReceiver contract on Optimism chain for the first time it’s success. USDC + VELO is redeemed as intended.
- LayerZero call lzReceive in RedemptionReceiver contract on Optimism chain again due to repeated transaction in step 3. But this time, user has exceeded her redeem limit. Caused lzReceive call to revert with reason “cannot redeem more than eligible”. But doesn’t refund WeVE to the user
require(
(redeemedWEVE += amountWEVE) <= eligibleWEVE,
"cannot redeem more than eligible"
);
- User FUD Velodrome and file a lawsuit against Velodrome.
Recommended Mitigation Steps
- In RedemptionReceiver, Wrap lzReceive into another function and perform try catch on new lzReceive function to call old wrapped lzReceive function and on revert add refund amount to that user.
- Write refund lzReceive handler on RedemptionSender.
- Create a new refund function in RedemptionReceiver. When user call, it will send layerzero message back to lzReceive function in RedemptionSender contract on Fantom.
pooltypes (Velodrome) disputed and disagreed with severity
Alex the Entreprenerd (judge) decreased severity to Medium and commented:
I believe the finding to have validity exclusively on the basis of the fact that a user may burn their WeVe and reach cap on the receiving chain, getting nothing out of it.
Because that’s contingent on reaching cap, the loss will be limited to the capped amount. For that reason, I think Medium Severity to be more appropriate.
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 receiver contract reverts when the cumulative redeemed amount exceeds a hardcoded eligibility limit, and the revert does not trigger a refund of the already-burned tokens on the source chain.
Impact
A user could permanently lose their WeVE tokens if they redeem more than their eligible amount, but the loss is limited to the capped amount.
What the attacker needed
User has WeVE tokens to redeem; cross-chain message is delayed; user redeems more than eligible amount
The fix
The redemption receiver should wrap lzReceive in a try-catch and refund the user on revert, or provide a refund mechanism back to the source chain.
How it was found
- User calls redeemWEVE on the Fantom chain.
- LayerZero is slow, so the user thinks the transaction failed.
- User repeats the redemption.
- The first lzReceive on Optimism succeeds and pays out USDC and VELO.
- The second lzReceive reverts because the user exceeded the redeem limit, and the WeVE is not refunded.
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.
This is a cross-chain token redemption system. A user burns tokens on one chain (Fantom) and should receive tokens on another chain (Optimism). If the user tries to redeem more than allowed, the second chain rejects the transaction but the burned tokens are not returned, so they are lost.
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.