This repository has been archived by the owner on Nov 12, 2023. It is now read-only.
Bauer - AuraSpell Vault.exitPool
without any slippage protection
#15
Labels
Non-Reward
This issue will not receive a payout
Bauer
high
AuraSpell
Vault.exitPool
without any slippage protectionSummary
When users exit the pool from a Balancer pool with minAmountsOut set to 0, they may be vulnerable to sandwich attacks
Vulnerability Detail
The
AuraSpell.closePositionFarm()
function is used for closing a leveraged position. Inside the function,the protocol remove liquidity from a Balancer pool and expects to receive at least the minimum amount of tokens specified in minAmountsOut. However ,the minAmountsOut is [0,0],it is vulnerable to sandwich attacks.As the code below, the Vault protocol will check the minimum amount of tokens the user expects to get out of the Pool.
Impact
Users may be vulnerable to sandwich attacks when exiting the pool
Code Snippet
https://github.com/sherlock-audit/2023-05-blueberry/blob/main/blueberry-core/contracts/spell/AuraSpell.sol#L183-L190
https://dashboard.tenderly.co/tx/mainnet/0x81e61ccf1e4190dd81cc73bbaac497d53d367e4c5804790fa168044df578d525/debugger?trace=0.2
Tool used
Manual Review
Recommendation
Set the minimum amount of tokens the user expects to get out of the Pool
The text was updated successfully, but these errors were encountered: