Hunt prep
Before you test Nibbl contest
What 12 disclosed reports say about Nibbl contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 6 | 0 | – | – | $0 |
| Smart contracts lesson | 3 | 0 | – | – | $0 |
| DoS lesson | 2 | 0 | – | – | $0 |
| Misconfiguration lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
_updateTwav() and _getTwav() will revert when cumulativePrice overflows
The cumulative price additions and subtractions should be wrapped in unchecked blocks so they can overflow and underflow as intended.
Disclosed
-
Ineffective TWAV Implementation
Implement a proper TWAV that averages over a specified time period (e.g., 15 minutes, 1 hour, 24 hours) and explicitly define that window in the contract.
Disclosed
-
NibblVault: In the buy function, users can avoid paying fees
The fee for the secondary curve portion should be calculated and charged before moving to the primary curve, as suggested with helper functions.
Disclosed
-
Basket NFT have no name and symbol
The name and symbol should be passed as immutable values so they are hardcoded in the implementation bytecode.
Disclosed
-
Twav.sol#_getTwav() will revert when timestamp > 4294967296
The subtraction should be placed inside an unchecked block so that underflow wraps as intended, matching the pattern used in _updateTWAV.
Disclosed
-
Lack of sanity check on _initialTokenSupply and _initialTokenPrice can lead to a seller losing his NFT
Add sanity checks to ensure sane expected values for _initialTokenSupply and _initialTokenPrice.
Disclosed
-
Buyout cannot be rejected when paused
The buyout end time should be reset when the system is paused, or redeem and withdraw should also be paused, to ensure token holders can always reject a buyout.
Disclosed
-
Reentrancy bug in Basket’s withdraw multiple tokens function which gives attacker ability to transfer basket ownership and spend it but withdraw all the tokens out of basket
The ownership of id=0 should be checked in every iteration, or ownership transfer should be disallowed during multiple-token withdrawals.
Disclosed
-
[PNM-004] Calculation of _secondaryReserveRatio can be overflowed
Add overflow checks, for example by using OpenZeppelin's safe cast helpers.
Disclosed
-
NibblVault buyout duration longer than update timelock
The report recommends either allowing the bidder to cancel the bid or adjusting the timelock and buyout duration so that the buyout duration is shorter than the update timelock.
Disclosed
-
Twav. getTwav() will return a wrong result when twavObservations[TWAV BLOCK_NUMBERS - 1].timestamp = 0.
The check should use cumulativeValuation instead of timestamp, as cumulativeValuation is always increasing and never zero after the first observation.
Disclosed