Skip to content

Code4rena

Overlay Protocol contest

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

disclosed reports
11
most reported class
Business logic
bug classes found
3
first disclosure
2022
Find Overlay Protocol contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Overlay Protocol contest chose to make public.

Smart contracts

OZ ERC1155Supply vulnerability

The project used a vulnerable version of OpenZeppelin's ERC1155Supply contract where totalSupply was not updated before a callback during minting. An attacker could call build and then unwind in the same transaction to manipulate totalSupply-dependent calculations.

Overlay Protocol contest

High
Business logic

isUnderwater returns opposite boolean for short positions

The `isUnderwater` function in Position.sol incorrectly flips the inequality for short positions, so it returns the opposite boolean. An attacker could potentially exploit this if the function were used in critical control flow, but currently it is not.

Overlay Protocol contest

Medium
Smart contracts

pow() is missing check on input parameters with 0 value

The pow() function in LogExpMath.sol lacks checks for zero inputs, unlike the Balancer original. This omission might lead to unexpected results, though no specific attack is described.

Overlay Protocol contest

Medium
Business logic

Can’t enableCollateral after a disableCollateral

The disableCollateral function revokes roles but fails to set the collateralActive flag to false, so enableCollateral can never be called again because its require checks that the flag is false. This permanently prevents re-enabling a collateral type.

Overlay Protocol contest

Medium
Business logic

Cached version of ovl may be outdated

Two contracts cache the address of the OVL token as an immutable variable, but the mothership contract allows the governor to change that address. After a change, the caching contracts would still interact with the old token address.

Overlay Protocol contest

Medium
Business logic

Improper Upper Bound Definition on the Fee

The adjustGlobalParams function lacks upper and lower bounds on fee parameters, allowing values that are too large and cause reversions in critical functions. An attacker with governance control could set excessive fees, potentially rugging users.

Overlay Protocol contest

Medium
Business logic

OverlayV1UniswapV3Market computes wrong market liquidity

The contract computed market liquidity using a token-ordering flag derived from the OVL price feed rather than the market feed the liquidity came from. If the two pools ordered ETH differently, the depth calculation was inverted, producing a wrong market depth and market cap.

Overlay Protocol contest

High
Business logic

_totalSupply not updated in _transferMint() and _transferBurn()

The token contract's internal mint and burn helper functions do not update the total supply variable, unlike the standard mint and burn functions. This causes the reported total supply to be inaccurate, which could mislead external protocols, user interfaces, and analytics platforms that rely on it.

Overlay Protocol contest

Medium
Access control

OverlayToken.burn function could burn tokens of any user

The burn function in OverlayToken.sol allowed any address with burner privileges to burn tokens from any user's balance without their consent. An attacker with burner permissions could destroy arbitrary amounts of other users' tokens.

Overlay Protocol contest

Medium
Access control

Timelock and events for governor functions

The report notes that several administrative functions in the OverlayV1Mothership contract lack timelocks and events, meaning critical parameter changes can occur instantly without warning. An attacker who gains admin access could make immediate, unnoticed changes to the system.

Overlay Protocol contest

Medium
Business logic

Fee double counting for underwater positions

The contract records fees before checking whether a position is underwater, so fees are counted even when the position's value is fully consumed by debt. This can cause fee withdrawal to burn or transfer more than the actual available fees, leading to failed withdrawals or fund leakage.

Overlay Protocol contest

Medium