Hunt prep
Before you test Oku's New Order Types Contract Contest
What 19 disclosed reports say about Oku's New Order Types Contract Contest: 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 |
|---|---|---|---|---|---|
| DoS lesson | 7 | 0 | – | – | $0 |
| Business logic lesson | 6 | 0 | – | – | $0 |
| Access control lesson | 4 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 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.
-
Lack of nonReentrant modifier in fillOrder() and modifyOrder() allows attacker to steal funds
The protocol team fixed this issue by adding the nonReentrant modifier to both fillOrder and modifyOrder.
Disclosed
-
Incorrect Freshness Logic Validation in PythOracle breaking the entire mechanism for triggering orders
The logic should be corrected to require that the publishTime is greater than or equal to block.timestamp minus noOlderThan.
Disclosed
-
Malicious User can Poison Bracket.sol with Blacklisted Accounts
The protocol was fixed by adding validation for the recipient address against the token's blacklist.
Disclosed
-
Users can modify a cancelled order, withdrawing the same tokens twice
The contracts should be fixed to prevent modification of cancelled orders.
Disclosed
-
stopLimit Id collision with bracket orders due to no validation, opening up an attack to steal funds
The protocol team fixed this issue by adding contract-specific entropy and a nonce to the order ID generation.
Disclosed
-
Failure to reset unspent approval to the target address will lead to the wiping of the smart contract balance
The contract should reset the approval to zero after the external call, as shown in the mitigation diff.
Disclosed
-
Unsafe Type Casting in Token Amount Handling
The issue was fixed by implementing OpenZeppelin's SafeCast library.
Disclosed
-
Attackers can drain the `OracleLess` contract by creating an order with a `malicious tokenIn` and executing it with a `malicious target`
The protocol team fixed this issue in the following PRs/commits: https://github.com/gfx-labs/oku-custom-order-types/pull/1
Disclosed
-
attacker can drain StopLimit contract funds through Bracket contract because it gives type(uint256).max allowance to bracket contract for input token in performUpkeep function
The StopLimit contract should only increase the allowance for the Bracket contract by the amount required for the specific order, not to the maximum value.
Disclosed
-
Bracket and StopLimit contracts are vulnerable to DoS attacks
The order creation should require that the recipient is not the zero address.
Disclosed
-
In OracleLess.createOrder() feeBips value validation is missing
The protocol team fixed this issue by adding a check that feeBips <= 10000 in createOrder().
Disclosed
-
Insecure calls to `safeTransferFrom` leads to users tokens steal by attacker
The protocol team fixed this issue by using msg.sender instead of the order recipient as the owner in safeTransferFrom.
Disclosed
-
Malicious users can `createOrder` with `0 amount` and make `DOS` for all
The protocol team fixed this issue in a pull request.
Disclosed
-
A malicious attacker can create many orders that is not cancelable
The protocol team fixed this issue by adding a mechanism to whitelist tokens.
Disclosed
-
Create order can be DOSed as there is no compulsory fee collected during the creation/cancellation of orders
The protocol team fixed this issue by collecting fees upon creating or canceling orders, as indicated in the referenced pull request.
Disclosed