WAuraPools doesn't correctly account for AuraStash causing all deposits to be permanently lost
The WAuraPools contract attempts to transfer stash AURA tokens directly to users when burning wrapped LP tokens, but stash AURA cannot be transferred like a regular ERC20 token, causing all such transfers to revert. As a result, all deposits become permanently unrecoverable.
Some Aura pools have two sources of AURA. First from the booster but also as a secondary reward. This secondary reward is stash AURA that doesn't behave like regular AURA. Although properly accounted for in AuraSpell, it is not properly accounted for in WAuraPools, resulting in all deposits being unrecoverable.
uint256 rewardTokensLength = rewardTokens.length;
for (uint256 i; i != rewardTokensLength; ) {
IERC20Upgradeable(rewardTokens[i]).safeTransfer(
msg.sender,
rewards[i]
);
When burning the wrapped LP token, it attempts to transfer each token to msg.sender. The problem is that stash AURA cannot be transferred like an regular ERC20 token and any transfers will revert. Since this will be called on every attempted withdraw, all deposits will be permanently unrecoverable.
for (uint256 i; i != rewardTokensLength; ) {
address sellToken = rewardTokens[i];
if (sellToken == STASH_AURA) sellToken = AURA;
_doCutRewardsFee(sellToken);
if (
expectedRewards[i] != 0 &&
!PSwapLib.swap(
augustusSwapper,
tokenTransferProxy,
sellToken,
expectedRewards[i],
swapDatas[i]
)
) revert Errors.SWAP_FAILED(sellToken);
/// Refund rest (dust) amount to owner
_doRefund(sellToken);
unchecked {
++i;
}
AuraSpell requires the above code to prevent this. WAuraPools uses the exact same reward list and needs the same protections. The result is that funds will be permanently trapped, because the transfer will always fail.
for (uint256 i; i != rewardTokensLength; ) {
address sellToken = rewardTokens[i];
if (sellToken == STASH_AURA) sellToken = AURA;
_doCutRewardsFee(sellToken);
if (
expectedRewards[i] != 0 &&
!PSwapLib.swap(
augustusSwapper,
tokenTransferProxy,
sellToken,
expectedRewards[i],
swapDatas[i]
)
) revert Errors.SWAP_FAILED(sellToken);
/// Refund rest (dust) amount to owner
_doRefund(sellToken);
unchecked {
++i;
}
AuraSpell requires the above code to prevent this. WAuraPools uses the exact same reward list and needs the same protections. The result is that funds will be permanently trapped, because the transfer will always fail.
You've created a valid escalation!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Shogoki
Seems valid
STASH AURA seems to be a valid extraRewardToken but transfer can only be called from the pool, which will actually transfer AURA instead.
So if the WAURAPool tries to call transfer it will revert.
hrishibhat
Result:
Medium
Unique
Considering this issue a valid medium
The original report as published on Sherlock, by 0x52. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
How it worked
Root cause
The contract does not account for stash AURA being non-transferable and attempts to transfer it directly, unlike AuraSpell which converts it to regular AURA first.
Impact
All deposits in affected WAuraPools become permanently unrecoverable because every withdrawal attempt reverts.
What the attacker needed
Aura pool with stash AURA as reward; User deposits into WAuraPools
The fix
The contract should check if a reward token is stash AURA and send regular AURA instead, similar to the logic in AuraSpell.
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.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
Some Aura pools give rewards in a special token called stash AURA, which cannot be sent to another address like normal tokens. The WAuraPools contract tries to send this token directly to users when they withdraw, but that always fails, so users can never get their deposits back.
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.