The ProvideLiquidity and WithdrawLiquidity messages lack slippage protection parameters, so users cannot specify minimum acceptable amounts. An attacker or market movement could change pool reserves before execution, causing users to receive fewer LP tokens or an unfavourable asset mix.
A discrepancy in multiplication logic between order creation and cancellation allows an attacker to create an ASK limit order that always overflows when cancelled, causing a panic. This prevents the administrator from forcefully cancelling orders, leading to a denial of service.
The swap fee is calculated from the output of the last pool in a multi-hop route, so an attacker can add liquidity to a thin pool, swap through it, withdraw the liquidity, and pay less fee than intended. This lets the attacker obtain more of the desired token than a direct swap would allow, causing a fee loss for the protocol.
A newly deployed liquidity pool can be permanently disabled by providing zero amounts of both tokens as the first liquidity provision. This leaves the pool with zero reserves but non-zero supply, causing all subsequent liquidity additions to fail with a division-by-zero error.
The minimum order size check for ASK limit orders compares the quote value (base amount times price) rather than the base amount, so an attacker can place many tiny orders at an absurdly high price and still pass the check. A large batch of such unfilled ImmediateOrCancel orders makes the cron auction spend excessive time cancelling and refunding them, which could cause block timeouts, and a large number of orders can also make the owner's force-cancel message run out of gas.
Asymmetric liquidity provision charges only the swap fee on the virtual swap, not the taker fee. An attacker could deposit asymmetrically and immediately withdraw, effectively swapping without paying the taker fee.
In the geometric swap logic, a value with 6 decimals is added to a value with 18 decimals, and the conversion multiplies the smaller value by 1e12, producing a 36-decimal number that overflows u128 for modest amounts. As a result, swaps in ask_exact_amount_out and bid_exact_amount_in revert, or users may receive the wrong number of tokens.
The first liquidity provider to an empty pool can deposit only one asset, and the code mints LP tokens without simulating a swap or charging a fee. When a later provider adds balanced liquidity, the first provider can withdraw and receive a mix of both assets, effectively getting a swap without paying the fee.
The XYK pool's reflect_curve function sizes passive bid and ask orders without including the swap fee, so takers can match those orders without paying the fee. This means liquidity providers lose the fee revenue they should have earned on those fills.
The geometric pool's pricing curve can be bypassed by adding liquidity asymmetrically and then immediately withdrawing it, letting an attacker effectively swap at the flat oracle price regardless of trade size. This means large trades avoid the intended price impact, reducing the pool's earnings and harming liquidity providers.
The DEX stores prices in a 128-bit fixed-point type with 24 decimals, whose maximum value is about 3.4e14. For a valid pair such as WBTC quoted in DAI, the scaled internal price reaches about 1.1e15, so the price cannot be stored and trades in that market fail.
The geometric pool's ask_exact_amount_out function rounds the required input amount down in favour of the trader, and then truncates the decimal value again when converting to an integer. An attacker could repeatedly swap to receive more quote currency than the BTC they pay, draining the BTC pool over many swaps.
The mid-price calculation adds the best bid and ask prices without checking for overflow, so an attacker can place a very high ask and a small bid to cause an overflow. This error bubbles up and sets a global PAUSED flag, stopping all auctions across every trading pair.
When administrators change the bucket sizes used for tracking liquidity depth, existing limit orders can no longer be cancelled because the cancellation code looks up storage keys built with the new sizes. This locks user funds and can also break the auction cleanup routine, pausing all trading.
The XYK `reflect_curve` function computes passive order sizes using the initial quote reserve instead of the constant product invariant, resulting in prices that are more favourable to takers than a regular AMM swap. This causes the pool's K invariant to decrease over time, leading to a loss of funds for liquidity providers.
The DEX contract cannot receive coin transfers because it lacks a receive function, so cancelling passive liquidity orders triggers a refund transfer to the contract itself that fails. This makes the emergency ForceCancelOrders message revert, preventing administrators from cancelling all orders.
The pool's invariant calculation multiplies two uint128 reserve amounts before taking a square root, so the intermediate product can overflow for tokens with 18 decimals. This makes adding liquidity fail for ordinary amounts such as one ETH paired with several thousand DAI.
DD
Dango DEX
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.