Skip to content

Code4rena

Nibbl contest

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

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

Disclosed reports

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

DoS

_updateTwav() and _getTwav() will revert when cumulativePrice overflows

The contract stores cumulative price observations by adding a new value to the previous cumulative total, and reads them back by subtracting two totals. Because these additions and subtractions are checked for overflow, the contract will revert once the cumulative value exceeds the integer limit, breaking the time-weighted average price functions.

Nibbl contest

Medium
Business logic

Ineffective TWAV Implementation

The time-weighted average valuation (TWAV) implementation only averages over four observations, which can be updated every block, making it effectively an observation-weighted average over a very short window. An attacker could manipulate the valuation to reject a buyout and then dump tokens within about one minute.

Nibbl contest

Medium
Business logic

NibblVault: In the buy function, users can avoid paying fees

In the NibblVault contract's buy function, when a purchase spans both the secondary and primary curves, the fee for the secondary curve portion is not charged. An attacker could avoid paying fees on that part of the purchase, reducing revenue for the curator and admin.

Nibbl contest

Medium
Misconfiguration

Basket NFT have no name and symbol

The Basket contract is meant to be used behind a proxy, but the ERC721 implementation is not upgradeable and its constructor sets the name and symbol only on the implementation. As a result, every proxy has an empty name and symbol, which breaks integrations and listings.

Nibbl contest

Medium
DoS

Twav.sol#_getTwav() will revert when timestamp > 4294967296

The Twav contract's _getTwav function subtracts two uint32 timestamps without unchecked arithmetic, so when the current timestamp has overflowed uint32 but the previous one has not, the subtraction underflows and reverts. This would make the _rejectBuyout function unavailable, potentially freezing user funds in the vault.

Nibbl contest

Medium
Business logic

Buyout cannot be rejected when paused

The buyout mechanism allows a bidder to withdraw the NFT after a fixed duration even if the system is paused, because redeem and withdraw functions lack the whenNotPaused modifier. This means token holders cannot reject a buyout during a pause, as they cannot buy new tokens to increase the value.

Nibbl contest

Medium
Smart contracts

[PNM-004] Calculation of _secondaryReserveRatio can be overflowed

A calculation of the secondary reserve ratio could overflow due to a cast to uint32, allowing an attacker to bypass checks in the initialize function. This could result in an incorrect configuration and impact subsequent functionality.

Nibbl contest

Medium
Business logic

NibblVault buyout duration longer than update timelock

The buyout duration (5 days) is longer than the timelock for updating the vault implementation (2 days), so a bidder who initiates a buyout cannot cancel it before the administrator can change the implementation. This could leave the bidder in a bad state, potentially losing funds or trust.

Nibbl contest

Medium