Hunt prep
Before you test Juicebox Buyback Delegate
What 33 disclosed reports say about Juicebox Buyback Delegate: 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 | 17 | 0 | – | – | $0 |
| DoS lesson | 6 | 0 | – | – | $0 |
| Smart contracts lesson | 5 | 0 | – | – | $0 |
| Access control lesson | 3 | 0 | – | – | $0 |
| Race condition 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.
-
Low Liquidity in Uniswap V3 Pool Can Lead to ETH Lockup in JBXBuybackDelegate Contract
The contract should return any unused ETH to the beneficiary after the swap.
Disclosed
-
Funding cycles that use JBXBuybackDelegate as a redeem data source (or any derived class) will slash all redeemable tokens
The function should return the input reclaimAmount, memo and a zero delegate address, and be marked virtual so derived contracts can override it.
Disclosed
-
Delegate architecture forces users to set zero slippage
The situation should be revised, as setting a zero value for `_minReturnedTokens` can have a significant impact on users engaging with the protocol.
Disclosed
-
Reserved token rounding can be abused to honeypot and steal user’s funds
The rounding up of outstanding reserve tokens should be removed.
Disclosed
-
Making a payment to the protocol with _dontMint parameter will result in lost fund for user.
The code was changed to add credits even when _dontMint is true.
Disclosed
-
Minting and redeeming will break for fully minted tiers with reserveRate != 0 and reserveRate / MaxReserveRate tokens burned
The suggested mitigation returns zero when the minted reserve count exceeds the mintable figure, avoiding the underflow; the judge noted this solves the main issue, though tracking burned reserves would fix the maths more fully.
Disclosed
-
Redemption weight of tiered NFTs miscalculates, making users redeem incorrect amounts - Bug #1
The calculation should be changed to pass _i+1 to _numberOfReservedTokensOutstandingFor.
Disclosed
-
Outstanding reserved tokens are incorrectly counted in total redemption weight
The calculation should either multiply the outstanding reserved token count by the contribution floor before adding it, or not count those tokens at all.
Disclosed
-
NFT not minted when contributed via a supported payment terminal
The report recommends reverting when a different currency is used and no price feed is set, and longer term supporting multiple currencies in the NFT delegate.
Disclosed
-
Beneficiary credit balance can unwillingly be used to mint low tier NFT
The contract should be changed to add a per-address setting, defaulting to false, that lets a beneficiary choose whether others may use their credit balance.
Disclosed
-
Deactivated tiers can still mint reserve tokens, even if no non-reserve tokens were minted.
The rounding logic should be disabled for deactivated tiers, for example by passing an isDeactivated flag.
Disclosed
-
Changing default reserved token beneficiary may result in wrong beneficiary for tier
The contract should also store the tier's reserved token beneficiary explicitly when it equals the current default.
Disclosed
-
The tier setting parameter are unsafely downcasted from type uint256 to type uint80 / uint48 / uint40 / uint16
The project should either change the struct fields to uint256 or use safe casting to prevent truncation.
Disclosed
-
Iterations over all tiers in recordMintBestAvailableTier can render system unusable
The report recommends replacing the linear scan with a binary search so gas grows logarithmically, and the judge suggests adding a limit on the number of tiers.
Disclosed
-
JBToken: mint function could mint arbitrary amount of tokens
The mint function should be restricted to a specific minter (the JBTokenStore contract) rather than any owner, for example by adding an onlyMinter modifier.
Disclosed