Skip to content

Sherlock

Oku's New Order Types Contract Contest

Every publicly disclosed report for Oku's New Order Types Contract Contest and what kind of bugs they were.

disclosed reports
19
most reported class
DoS
bug classes found
4
first disclosure
2024
Find Oku's New Order Types Contract Contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Oku's New Order Types Contract Contest chose to make public.

DoS

Malicious User can Poison Bracket.sol with Blacklisted Accounts

The order creation function does not check whether the recipient address is blacklisted by the token, so an attacker can create cheap orders with a blacklisted recipient. These orders cannot be cancelled because the cancellation function tries to refund the blacklisted address, allowing the attacker to fill the pending orders array and cause a denial of service.

Oku's New Order Types Contract Contest

Medium
Smart contracts

Unsafe Type Casting in Token Amount Handling

Multiple contracts in the protocol perform unsafe downcasting from uint256 to uint160 when handling token amounts in Permit2 transfers, allowing users to create orders with mismatched amounts. An attacker could create an order with a high amount but pay very little, then modify or cancel the order to drain the contract.

Oku's New Order Types Contract Contest

High
Access control

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 grants the Bracket contract an unlimited allowance to spend its input tokens. An attacker can create a Bracket order and call performUpkeep with crafted data to make Bracket transfer all of StopLimit's tokens to itself, then receive them as order output.

Oku's New Order Types Contract Contest

High
DoS

Bracket and StopLimit contracts are vulnerable to DoS attacks

The Bracket and StopLimit contracts allow users to create orders with the recipient set to the zero address. When the admin tries to cancel such an order, the token transfer to the zero address reverts for tokens like USDT, making the order uncancellable and allowing an attacker to fill the pending order array and cause a denial of service.

Oku's New Order Types Contract Contest

Medium
DoS

In OracleLess.createOrder() feeBips value validation is missing

The createOrder function in OracleLess.sol lacks validation that feeBips is at most 10000, allowing orders with excessive fees that always revert in execute. A malicious user can create many such orders, and by using a blacklisted token like USDC, prevent cancellation, causing a denial of service as the pending orders queue grows.

Oku's New Order Types Contract Contest

Medium
Access control

Insecure calls to `safeTransferFrom` leads to users tokens steal by attacker

The protocol's order creation and modification functions use the order recipient as the owner for token transfers, allowing an attacker to create an order that pulls tokens from a victim who has a residual allowance. The attacker can then fill the order and profit while the victim loses tokens.

Oku's New Order Types Contract Contest

High
DoS

Malicious users can `createOrder` with `0 amount` and make `DOS` for all

The createOrder function allowed orders with zero input amount, letting an attacker create many such orders. This bloated the pendingOrderIds array, causing fillOrder and cancelOrder to run out of gas when iterating it, blocking all users from filling or cancelling orders.

Oku's New Order Types Contract Contest

Medium
Business logic

A malicious attacker can create many orders that is not cancelable

The OracleLess contract allows any token address as tokenIn, so an attacker can create orders with a malicious token that reverts on transfer, making the order impossible to cancel. An attacker could create many such orders to grief the protocol and waste gas for other users.

Oku's New Order Types Contract Contest

Medium
DoS

Create order can be DOSed as there is no compulsory fee collected during the creation/cancellation of orders

The smart contract allows users to create orders without paying a fee, and the number of pending orders is capped. An attacker can fill all available order slots with orders that can never be executed, and when the admin cancels them, the attacker can immediately recreate them, causing a denial of service for legitimate users.

Oku's New Order Types Contract Contest

Medium
Business logic

`StopLimit` order cannot be filled under certain condition

A StopLimit order that passed the minimum order size check at creation can fail to fill later if the token's price drops, because the resulting Bracket order re-checks the minimum size and reverts. This prevents the StopLimit order from being executed.

Oku's New Order Types Contract Contest

Medium
DoS

`cancelOrder` order can be DOSed due to unbounded loop

The `_cancelOrder` function loops through an unbounded `pendingOrderIds` array, so an attacker can create many orders with a malicious token that reverts on transfer, making cancellation impossible for legitimate users and the admin. This creates a denial-of-service condition and potential financial ransom.

Oku's New Order Types Contract Contest

Medium
Business logic

Order will be executed with wrong slippage if by the time of execution, price crosses take profit

An order's direction is set at creation based on the current exchange rate relative to the take-profit price. If the price moves past the take-profit before execution, the order may be treated as a stop order, applying the stop slippage instead of the take-profit slippage, which could cause higher losses if stop slippage is larger.

Oku's New Order Types Contract Contest

Medium