Hunt prep
Before you test Unstoppable
What 17 disclosed reports say about Unstoppable: 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 | 14 | 0 | – | – | $0 |
| DoS lesson | 1 | 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.
-
`MarginDex::execute_limit_order` will always revert
The fix is to not clear the limit order in storage before calling `_remove_limit_order`; the code that deletes the order was removed.
Disclosed
-
Wrong accounting of the storage balances results for the protocol to be in debt even when the bad debt is repaid
The close-position logic should repay the full position debt amount (not just the swap proceeds) so that total_debt_amount is reduced correctly, or otherwise subtract the bad debt from total_debt_amount.
Disclosed
-
Vault: `_update_debt` does not accrue interest
The fix was to call `_debt_interest_since_last_update` before updating `last_debt_update`.
Disclosed
-
Leverage calculation is wrong
The leverage calculation was fixed by changing the numerator from `_debt_value + _margin_value` to `_position_value`.
Disclosed
-
The `Vault._update_debt()` function should be executed before admin sets new interest rate via `Vault.set_variable_interest_parameters()`
The fix was to call _update_debt before updating the interest parameters in set_variable_interest_parameters.
Disclosed
-
Vault multihop swaps for any token pair will fail in one direction
The add_path function should infer the tokens from the path and store a reversed copy for the opposite direction, and tests for multihop swaps should be added.
Disclosed
-
_account_for_withdraw_liquidity rounding in the wrong direction will run out of the vault
The issue was fixed by subtracting one share from the calculation to account for the rounding error.
Disclosed
-
Interested calculated is ampliefied by multiple of 1000 in `_debt_interest_since_last_update`
The fix was to use PERCENTAGE_BASE_HIGH instead of PERCENTAGE_BASE in the interest calculation.
Disclosed
-
The `Vault._to_usd_oracle_price()` function uses the same `ORACLE_FRESHNESS_THRESHOLD` for all token prices feeds which is incorrect
The issue was fixed by introducing a mapping that stores an individual freshness threshold for each token.
Disclosed
-
Debt is not updated when removing margin from a position
The issue was fixed by calling the debt update function at the beginning of the remove margin function.
Disclosed
-
Users trying to reduce their positions with market orders will always revert
The calculation was fixed to use the amount being reduced instead of the whole position amount.
Disclosed
-
Adversary manipulate the middle path when calling `execute_dca_order`, resulting user loss, benefiting the attacker
The project fixed it by adding a whitelist of tokens that users can swap from, though the tokens were hardcoded.
Disclosed
-
Spot dex cant handle fee-on-transfer tokens
The issue was fixed by checking balances before and after transfers to calculate the actual amount received.
Disclosed
-
`Vault._amount_per_base_lp_share` should also consider bad debt when `safety_module_lp_total_amount` is not enough
The share price calculation should account for bad debt that exceeds the safety module balance, as was done in a later pull request.
Disclosed
-
`reduce_position` doesn’t update margin mapping correctly
The issue was fixed by adding the reduced margin back to the user's margin mapping.
Disclosed