You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
some funds will not be converted nor returned to the depositor
Summary
in the contract TokenRewards function depositFromPairedLpToken line 177 it will try to swap the PAIRED_LP_TOKEN into reward and it uses the function _swapForRewards and if _rewardsSwapAmountInOverride is greater than zero it will override the amounin variable and use that instead of the one that the user deposited so if _rewardsSwapAmountInOverride is less than the one that the user deposited it will try to swap a small amount the problem here is that the user will not receive the remaining amount which is (the amount that the user deposited - _rewardsSwapAmountInOverride)
Sneaky Zinc Narwhal
High
some funds will not be converted nor returned to the depositor
Summary
in the contract TokenRewards function depositFromPairedLpToken line 177 it will try to swap the PAIRED_LP_TOKEN into reward and it uses the function _swapForRewards and if _rewardsSwapAmountInOverride is greater than zero it will override the amounin variable and use that instead of the one that the user deposited so if _rewardsSwapAmountInOverride is less than the one that the user deposited it will try to swap a small amount the problem here is that the user will not receive the remaining amount which is (the amount that the user deposited - _rewardsSwapAmountInOverride)
https://github.com/sherlock-audit/2025-01-peapods-finance/blob/main/contracts/contracts/TokenRewards.sol#L293
Root Cause
in the function line 293 _rewardsSwapAmountInOverride will override the actual amount that the user deposited
Internal Pre-conditions
_rewardsSwapAmountInOverride have to be greater than zero
External Pre-conditions
nothing
Attack Path
nothing
Impact
the fund will not be convert or might even stack in the contract
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered: