The calcLpTokenSupply function can fail to converge and revert when the iteration oscillates by ±2, causing calcReserveAtRatioLiquidity to revert. An attacker could trigger this condition to cause a denial of service for legitimate users.
The lookup table function getRatiosFromPriceSwap returns a wide price range for certain extreme prices, causing the reserve calculation loop to oscillate and never converge, returning a value far from the target. An attacker could exploit this to obtain incorrect reserve calculations, potentially disrupting the protocol's functionality.
The WellUpgradeable contract's _authorizeUpgrade function lacks an onlyOwner modifier, allowing any address to call upgradeTo and upgradeToAndCall. An attacker could upgrade the contract to a malicious implementation, compromising its integrity and potentially causing total fund loss.
The decodeWellData function incorrectly checks decimal0 instead of decimal1 when defaulting to 18 decimals, causing decimal1 to be set to 18 regardless of its actual value. This leads to incorrect scaling of token reserves, potentially causing overvaluation or undervaluation of token amounts and prices in various functions.
In an extreme price range of the Stable2LUT1 lookup table, the reserve correction step in updateReserve becomes larger than the reserve itself, causing an arithmetic underflow that reverts the function. Even with a smaller step size, the Newton iteration fails to converge and returns zero, making the price calculation unusable.
A bit-shifting error in the storeBytes16 function caused the upper 128 bits of a storage slot to overwrite the lower 128 bits of another slot, corrupting reserve amounts and leading to wrong oracle values. An attacker could potentially manipulate the pump's reserve data, though the impact was limited because the incorrectly shifted bytes were never non-zero.
The Well contract's shift() and sync() functions change reserves without updating the Pumps oracle, unlike swap functions. An attacker could manipulate reserves in one block, then swap back to restore them, causing the Pumps to record invalid reserves and manipulate the oracle.
The report claims a useless modifier in an empty constructor and a bad assumption that the block time remains constant, which could cause functions like readInstantaneousReserves to work incorrectly if the block time changes. The judge increased severity to Medium, but the project acknowledged the first item as a duplicate QA report and the second as a duplicate of another issue.
The MultiFlowPump contract uses a single hardcoded cap for maximum percentage change in token reserves, applied to all tokens regardless of their volatility. This can cause volatile assets to be capped more than normal trading activity, or stable assets to be allowed to deviate more than usual, distorting the pump's moving averages and potentially enabling price manipulation.
The MultiFlowPump contract stores reserve counts using libraries that pack bytes16 values, but in two functions the wrong storage slot is read when the number of reserves is odd, causing the lower 128 bits of one slot to be overwritten with a value from a different slot. This corrupts reserve amounts in the pump, leading to wrong oracle values.
The getBytes32FromBytes function in the LibBytes library has an incorrect out-of-bounds check: when the requested index equals the data length, it reads memory beyond the bytes array instead of returning zero. An attacker could cause callers to receive arbitrary incorrect data, potentially leading to incorrect pricing or loss of funds if used in reserve calculations.
The Aquifer contract allows deploying Well contracts via create2 with a salt, and if the implementation contract can self-destruct, an attacker can redeploy a different implementation to the same address and then deploy a new Well to the same address with different logic. This could cause users to interact with a Well whose behaviour differs from what they expect.
The Well AMM charges no fees, so an attacker can sandwich a victim's swap with two trades that move the price beyond the victim's slippage limit, causing the victim's transaction to revert. The attacker's tokens are restored by the constant product formula, so the only cost is gas.
The pump contract stores the chain block time as an immutable value, but block times can change (e.g., on L2s). When the actual block time differs, the price change cap becomes either too strict or too permissive, leading to arbitrage opportunities or increased manipulability.
A liquidity provider who deposits tokens in an imbalanced ratio can be front-run by an attacker who adds liquidity in the same imbalanced way and then immediately removes it after the victim's deposit, stealing a significant portion of the victim's funds. The report demonstrates that the attacker can gain nearly 30% of the victim's deposited tokens.
The constant product invariant of a liquidity pool can be broken because the sync function updates reserves without updating the LP token supply. An attacker can donate tokens and call sync to make removeLiquidityImbalanced revert, causing a temporary denial of service for that function.
The boreWell function in the Aquifer contract uses a publicly visible salt parameter when creating new Wells. An attacker can frontrun a user's transaction with the same salt to either capture the deposit intended for that Well or cause the user's transaction to revert, repeatedly blocking Well creation.
The Well contract does not account for fee-on-transfer tokens that deduct fees from the sender, so each transfer out reduces the Well's actual token balance below its stored reserves. An attacker could repeatedly swap and skim to drain the Well's funds.
The square root calculation used to determine LP token supply has a larger precision error than division, causing excess reserve tokens to remain in the contract when users add liquidity with imbalanced reserves. An attacker could monitor the contract and withdraw these accumulated excess reserves via removeLiquidityImbalanced.
BI
Basin Invitational
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.