28630 - [SC - Insight] Improper Validation for Partial Filling of INCH...
Submitted on Feb 22nd 2024 at 18:40:15 UTC by @offside0011 for Boost | Puffer Finance
Report ID: #28630
Report type: Smart Contract
Report severity: Insight
Target: https://etherscan.io/address/0x7276925e42f9c4054afa2fad80fa79520c453d6a
Impacts:
Permanent freezing of funds
Description
This is a re-submission of #28620 https://bugs.immunefi.com/dashboard/submission/28620
Brief/Intro
In PufferDepositor.sol, users have the capability to swap tokens to stETH through the 1inch protocol and deposit them into Puffer using the swapAndDeposit1Inch(...) function. However, since 1inch supports partial filling, any tokens that remain unswapped will be locked within the PufferDepositor contract.
Vulnerability Details
The user utilizes the swapAndDeposit1Inch(...) function with partial filling enabled through 1inch, swapping token X for stETH and depositing it.
As a result of fluctuations in token prices or potential front-running by attackers during this swap, only a portion of token X is exchanged for stETH, with the remainder being returned to the PufferDepositor.
The returned token X remains locked within the PufferDepositor indefinitely.
Impact Details
The user will lose a portion of their funds.
References
Proof of Concept
Last updated
Was this helpful?