-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slippage issues in redeem()
/addLiquiditySingleSy()
/removeLiquiditySingleSy()
in PendlePowerFarmLeverageLogic.sol
#95
Comments
redeem()
/addLiquiditySingleSy()
SY tokens.redeem()
/addLiquiditySingleSy()
/removeLiquiditySingleSy()
SY tokens.
redeem()
/addLiquiditySingleSy()
/removeLiquiditySingleSy()
SY tokens.redeem()
/addLiquiditySingleSy()
/removeLiquiditySingleSy()
SY & curve::exchange
in PendlePowerFarmLeverageLogic.sol
redeem()
/addLiquiditySingleSy()
/removeLiquiditySingleSy()
SY & curve::exchange
in PendlePowerFarmLeverageLogic.sol
redeem()
/addLiquiditySingleSy()
/removeLiquiditySingleSy()
in PendlePowerFarmLeverageLogic.sol
GalloDaSballo marked the issue as duplicate of #130 |
GalloDaSballo marked the issue as sufficient quality report |
trust1995 marked the issue as unsatisfactory: |
Hi @trust1995 this issue isn't a duplicate of #130 please look into this. |
There is an overall before / after value check, which is a fair way for the project to deal with slippage. |
Hi @trust1995 remember that this is the PendlePowerFarmLeverageLogic, my point is that they wouldn't achieve the supposed yield they were initially supposed to receive from the strategy medium looks appropriate at least |
I respect your position but disagree. |
Lines of code
https://github.com/code-423n4/2024-02-wise-lending/blob/79186b243d8553e66358c05497e5ccfd9488b5e2/contracts/PowerFarms/PendlePowerFarm/PendlePowerFarmLeverageLogic.sol#L170
https://github.com/code-423n4/2024-02-wise-lending/blob/79186b243d8553e66358c05497e5ccfd9488b5e2/contracts/PowerFarms/PendlePowerFarm/PendlePowerFarmLeverageLogic.sol#L183
https://github.com/code-423n4/2024-02-wise-lending/blob/79186b243d8553e66358c05497e5ccfd9488b5e2/contracts/PowerFarms/PendlePowerFarm/PendlePowerFarmLeverageLogic.sol#L472
Vulnerability details
Impact
Pendle pools can be very volatile especially in extreme market scenarios, when performing leverage tactics in
PendlePowerFarmLeverageLogic.sol
it makes interactions with the Pendle pools the issue here is that on the call to:addLiquiditySingleSy()
redeem()
removeLiquiditySingleSy()
The contract accepts that the minimum amount of tokens it receives to a minimum of zero.
Sample :
Even this is specified in Pendle SDK.
https://api-v2.pendle.finance/sdk/#/
This is bad as an attacker can front-run the calls to cause the contracts to incur losses and backrun the tx to gain.
They require a slippage check to ensure the transactions do not end in loss to the caller.
This wouldn't revert the transaction and there loss of yield to the leverage strategy so I am labeling a high.
Tools Used
Manual review.
Recommended Mitigation Steps
As per the Docs use the underlying preview function to determine the supposed minimum amount out before performing the calls.
Assessed type
Other
The text was updated successfully, but these errors were encountered: