Hunt prep
Before you test Dango DEX
What 18 disclosed reports say about Dango DEX: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 9 | 0 | – | – | $0 |
| DoS lesson | 8 | 0 | – | – | $0 |
| Smart contracts lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Providing and withdrawing liquidity lacks slippage protection
Slippage protection mechanisms should be added by introducing parameters to both ProvideLiquidity and WithdrawLiquidity messages, and an optional deadline parameter should be considered.
Disclosed
-
Inconsistent multiplication during order creation and cancellation can lead to panics and Denial of Service during order cancellation
The cancellation logic should be changed to use the same safer integer-based multiplication as creation, ensuring any order that can be created can also be safely cancelled.
Disclosed
-
Attacker can exploit thin liquidity in xyk pool to save on fees
The fee should be charged from the input amount or at every step of the route.
Disclosed
-
A newly deployed pool can be DoS
The code should explicitly ensure that the first provision amounts are not zero and that the first LP mint is not zero.
Disclosed
-
Ineffective minimum order size check for ASK limit orders can lead to Denial of Service
For ASK orders, the minimum order size should also be enforced on the base asset amount, not only on the quote value.
Disclosed
-
Overflow in geometric can dos swap
The types should be aligned so that input_amount in ask_exact_amount_out and output_amount in bid_exact_amount_in use Dec<u128, 6> instead of Dec<u128, 18>.
Disclosed
-
The first Liquidity Provider can perform a fee less swap by providing unbalanced liquidity
The pool should reject unbalanced initial liquidity or simulate a swap and charge the fee when the first provider deposits unbalanced amounts.
Disclosed
-
XYK reflect_curve omits swap fee in order sizing, leaking LP fees
The sizing formulas should be adjusted to include the swap fee: for bids use R_q * (1 - f) / p - R_b and for asks use R_b * (1 - f) - R_q / p.
Disclosed
-
Price cannot be represented when a high-value base asset is quoted in a high-decimal asset
The price type should be upgraded to a 256-bit fixed-point type so the scaled values fit.
Disclosed
-
User can pause all auctions by overflow in mid-price average
The mid price should be calculated as lo + (hi - lo) / 2 to avoid overflow during the addition.
Disclosed
-
Any change in bucket size will DOS order cancellation leading to frozen user funds and halts the entire auction
The order should record the bucket sizes in force at creation so cancellation can reference the original configuration.
Disclosed
-
XYK `reflect_curve` is incorrect and decreases K over time leading to loss of funds for LP providers
The order size calculation should use the square root of K divided by price instead of the initial quote reserve divided by price.
Disclosed
-
`OwnerMsg::ForceCancelOrders` is unusable due to the DEX contract lacking a `receive` function to accept refunds from cancelled passive liquidity orders
The DEX contract should implement a receive function, or cancel_order should skip the refund transfer when the recipient is the DEX contract itself.
Disclosed
-
Users may fail to add liquidity because of overflow
The multiplication should be carried out in a wider integer type, such as uint256, before the square root is taken.
Disclosed