Removing all liquidity from an Omnipool asset leaves the pool with zero reserve and zero shares, after which the add_liquidity function divides by the zero reserve and always reverts. This permanently prevents any liquidity provider from adding liquidity or minting shares, and if a small donation is made first, providers receive zero shares and their funds are locked.
The report describes an edge case where an asset's tradability state is set to allow only adding and removing liquidity while its price is manipulated, so the price check is skipped and the withdrawal fee becomes 100%, causing liquidity providers to lose all their funds when removing liquidity. The attacker could front-run the setting of this state to exploit the manipulated price.
The remove_token function in the Omnipool contract does not call the on_liquidity_changed hook, so the oracle and circuit breaker are not updated when liquidity is withdrawn. This can cause the oracle to calculate prices based on outdated liquidity and the circuit breaker to fail to enforce limits correctly.
When an asset is removed from the omnipool, its oracle entries are not deleted, so if the asset is later re-added at a different price, the oracle's exponential moving average mixes old and new data, producing an incorrect price for a short period. This can cause liquidity providers to be unable to add liquidity due to a price difference check, or cause protocols relying on the oracle to use a wrong price.
The withdraw_protocol_liquidity function lacks the safe_withdrawal price check present in remove_liquidity, so an attacker can frontrun the admin's withdrawal and manipulate the spot price to cause slippage losses. The report claims these losses can be much higher than the 2% limit enforced elsewhere.
The liquidity removal function in the omnipool pallet lacks a minimum amount out parameter, so a liquidity provider can suffer slippage losses if a malicious actor frontruns the withdrawal by swapping to move the price. The report demonstrates losses of up to about 1% in test scenarios, capped at 2% by an existing price deviation check.
The withdraw_asset_amount function in HydraDx's StableSwap AMM lacks a check on total pool liquidity, allowing a user to transfer a tiny share to another address and then withdraw all their shares, leaving the pool with very low liquidity. This can break the minimum liquidity invariant, making the pool easily manipulatable, or prevent other users from withdrawing via remove_liquidity_one_asset.
The EMA oracle only updates when StableSwap hooks fire, so direct token transfers to StableSwap change pool prices without updating the oracle. An attacker could make the oracle report an outdated price, potentially affecting external protocols that rely on it.
The Omnipool allows users to add liquidity and then immediately withdraw almost all of it, leaving a tiny position that still occupies storage. An attacker could repeatedly create such dust positions to bloat the chain's storage at very low cost, potentially leading to a denial of service.
The stableswap pallet lacks a function to withdraw liquidity in all pool tokens at once, so redeeming the entire LP supply through the single-asset withdrawal function causes an arithmetic overflow and reverts. This can leave the initial liquidity locked in the pool.
HY
HydraDX
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.