Skip to content

Code4rena

Maverick contest

Every publicly disclosed report for Maverick contest and what kind of bugs they were.

disclosed reports
8
most reported class
Business logic
bug classes found
4
first disclosure
2023
Find Maverick contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Maverick contest chose to make public.

Business logic

Pool._amountToBin() returns a wrong value when protocolFeeRatio = 100% .

The internal function that converts an amount into a bin balance adds one extra unit to the protocol fee, so when the protocol fee ratio is set to 100% the bin balance is updated with a value larger than it should be. This could cause bin balances to be calculated incorrectly.

Maverick contest

Medium
Business logic

Unused ETH is not refunded when a limit price is set

When a user sells ETH with a limit price, the swap may be partially executed, but the router does not refund the unspent ETH, leaving it in the contract. Anyone can then withdraw that ETH via the public refundETH function.

Maverick contest

Medium
Business logic

The calculation of LP token amount and deposit amount is wrong for edge cases

The report claims that the LP token minting and deposit calculation in Bin.sol uses reversed inequalities for the edge cases where the price is below the lower tick or above the upper tick, which would mint the wrong number of LP tokens and deposit the wrong amounts. The project responded that the code is correct and the white paper contains a typo, and the judge treated the documentation error as a medium severity issue.

Maverick contest

Medium
Access control

exactInput allows stealing of funds via a malicious pool contract

The Router contract's exactInput function does not verify that pool addresses in the user-supplied path were created by the official factory. An attacker could trick a user into signing a transaction with a malicious pool contract in the path, which would steal the user's funds during the swap.

Maverick contest

Medium
Business logic

Trader can manipulate price because bin only moved after swap

The liquidity bin in a Maverick pool is only moved after a swap, so if the pool is inactive the bin stays in the wrong position. A trader can perform a zero-token swap to update the time-weighted average price and prevent bin movement, then trade at a better price.

Maverick contest

Medium
Race condition

Router.getOrCreatePoolAndAddLiquidity can be frontrunned which leads to price manipulation

The Router.getOrCreatePoolAndAddLiquidity function allows a user to create a pool and add liquidity in one transaction. An attacker can front-run this transaction to create the pool with a different initial price, causing the victim's liquidity to be added at the attacker's price and allowing the attacker to profit.

Maverick contest

Medium
Business logic

TWA update is not correct

The time-weighted average price (TWA) update in the swap function incorrectly clips the end square root price, so it only contributes positively to the active tick. This can cause moving bins to be updated incorrectly, potentially leading to inaccurate pricing.

Maverick contest

Medium