Hunt prep
Before you test Knox Finance
What 11 disclosed reports say about Knox Finance: 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 | 7 | 0 | – | – | $0 |
| DoS lesson | 2 | 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.
-
_getNextFriday() returns wrong value when timestamp is between Monday 12am and 8am
The check should add 8 hours to the 4-day threshold, i.e., compare against `4 days + 8 hours`.
Disclosed
-
Auction can potentially sell more contracts than it has collateral for
The withdrawal logic should be changed to track total contracts sold across all withdrawals, for example by using a mapping to prevent multiple withdrawals instead of removing orders, and refunding users once the total exceeds the available collateral.
Disclosed
-
Users can avoid performance fees by withdrawing before the end of the epoch forcing other users to pay their fees
Fees should be taken on withdrawals that occur before the vault is settled.
Disclosed
-
## Auction can be ended with large limit order
Use AuctionStorage.Status instead of sentinel values for determining whether the auction is in the canceled state.
Disclosed
-
Internal `OptionMath._getPositivePlaceValues()` function do not handle values below `185`
The recommendation adds non-zero checks around each place-value division so values below 185 can still be rounded up or down.
Disclosed
-
Chainlink's `latestRoundData` might return stale or incorrect results
The contract should be fixed by adding checks for stale data, such as verifying that the round is complete and the price is not too old.
Disclosed
-
[NAZ-M6] Unbounded loop in `_previewWithdraw() && _redeemMax()` Can Lead To DoS
The recommendation is to avoid doing all the work in a single transaction, especially calls inside a loop; the project said it would not fix it in this review.
Disclosed
-
Underflow in ```_previewWithdraw``` could prevent withdrawals
The loop in _previewWithdraw should check if totalContractsSold is >= totalContracts and set remainder to 0, and _addOrder should call _processOrders even before the auction starts to prevent orders that exceed totalContracts.
Disclosed
-
Wrong implementation of orderbook can make user can't get their fund back
The contract should track removed order IDs in a separate list and assign those IDs to new orders instead of using the index length.
Disclosed