The trading volume per liquidity calculation only counts the liquidity of the final price range after a swap, ignoring the initial and intermediary ranges. This undercounts liquidity, overstating volume per liquidity and leading to lower adaptive swap fees in most cases.
The mint function allows a user to add liquidity on behalf of another address, which updates that address's lastLiquidityAddTimestamp. A malicious user can repeatedly add a tiny amount of liquidity for a victim, keeping the victim in the liquidity cooldown and preventing them from removing their own liquidity.
The Algebra protocol does not support rebasing, deflationary, or inflationary tokens because it does not verify the actual token balance change during transfers. An attacker could exploit this to cause accounting errors or steal funds when such tokens are used.
The vault address in the AlgebraFactory could be set to the zero address, causing all swaps and flash loans in deployed pools to either revert or burn community fees, depending on the ERC-20 token implementation.
The swap function only checks that the pool's balance increased by at least the required input amount, so a caller can send extra input tokens without receiving corresponding output tokens. An attacker could exploit this to cause users to lose funds if they interact with a malicious or buggy contract.
The swap function for fee-on-transfer tokens calculates the required amount as a positive balance difference, so it can never signal an exact-output swap. As a result, users cannot perform exact-output swaps with these tokens.
The exp() function in AdaptiveFee.sol uses a Taylor series that is inaccurate when x/g is large, causing errors up to 15% in exp() and 18% in sigmoid(), which affects fee calculation. The calculation also consumes significant gas due to computing up to the 8th term.
The safeTransfer function in TransferHelper.sol uses a low-level call to transfer tokens without first checking that the token contract exists. An attacker could create a pair with a token that can be self-destructed, and after destruction, deposits into the pool would be lost because the transfer call would still succeed.
Swapping in AlgebraPool fails if external calls to the active incentive contract (AlgebraVirtualPool) revert. An attacker could not directly exploit this, but a misconfiguration or bug in the incentive contract would block all swaps until it is fixed or the incentive is unset.
The flashloan fee in AlgebraPool is set by the first swap in each block, so a swap before a flashloan can change the fee. An attacker could frontrun a flashloan with a swap to force the borrower to pay a higher fee.
The volatility estimator used in the smart contract is biased and underestimates volatility for finite sample sizes. This leads to lower fees than intended, which harms users.
The initialize function of a new liquidity pool can be front-run by a bot that sees the pending transaction and calls initialize first with a different initial price. This lets the attacker set the pool's starting price, potentially causing the original creator to deposit at an unfavourable price.
QA
QuickSwap and StellaSwap contest
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.