Skip to content

Code4rena

INIT Capital Invitational

Every publicly disclosed report for INIT Capital Invitational and what kind of bugs they were.

disclosed reports
7
most reported class
Business logic
bug classes found
3
first disclosure
2024
Find INIT Capital Invitational on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what INIT Capital Invitational chose to make public.

Access control

MarginTradingHook#updateOrder lacks access control

The updateOrder function in MarginTradingHook did not verify that the caller owned the order being updated, only that the caller had an open position. An attacker could modify any active order's trigger price, limit price, collateral amount, and output token.

INIT Capital Invitational

High
Business logic

Order’s creator can update tokenOut to arbitrary token

The updateOrder function lets an order's creator change tokenOut to any token, unlike order creation which restricts it to the margin position's base or quote asset. An attacker could front-run the executor's fillOrder by swapping in a high-value token, causing the executor to transfer that token instead.

INIT Capital Invitational

High
Business logic

fillOrder not properly cancel order when collateral of position is empty

The fillOrder function updates a memory copy of the order instead of the stored order when the position's collateral is empty, so the order is not actually cancelled. This misleads users into believing the order is cancelled when it remains active.

INIT Capital Invitational

Medium
DoS

MarginTradingHook users could potentially be DOSed

A modifier that refunds leftover wrapped native tokens to the caller would revert the whole call if the caller contract cannot accept native currency. An attacker could send a tiny amount of wrapped native tokens to the contract's balance, causing every call from such a caller to fail.

INIT Capital Invitational

Medium
DoS

LP unwrap / wrap is fully broken if master chef contract has insufficient reward token and block decollateralize wlp and wlp liquidation

The LP wrapper contract's unwrap function calls an external master chef contract that transfers pending reward tokens; if the master chef lacks sufficient reward tokens, the transfer reverts, blocking unwrap, decollateralisation, and liquidation. An attacker could exploit this by draining or causing a shortage of reward tokens in the master chef, preventing users from withdrawing their LP tokens or liquidating positions.

INIT Capital Invitational

Medium
DoS

SwapType.CloseExactOut balance check too strict can be DOSed

A swap function required the received output token balance to exactly equal the expected amount, so any small change in the pool ratio caused the transaction to revert. An attacker could front-run a swap with a tiny trade to shift the ratio and block the victim's swap.

INIT Capital Invitational

Medium