Skip to content

Code4rena

Juicebox Buyback Delegate

Every publicly disclosed report for Juicebox Buyback Delegate and what kind of bugs they were.

disclosed reports
33
most reported class
Business logic
bug classes found
5
first disclosure
2022
Find Juicebox Buyback Delegate on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Juicebox Buyback Delegate chose to make public.

Business logic

Low Liquidity in Uniswap V3 Pool Can Lead to ETH Lockup in JBXBuybackDelegate Contract

The JBXBuybackDelegate contract swaps ETH for project tokens on Uniswap V3 but sets the price limit to the extreme, so if the pool has low liquidity the swap stops early and the unused ETH remains locked in the contract. An attacker could exploit this by manipulating the pool or waiting for low liquidity, causing users' ETH to become permanently stuck.

Juicebox Buyback Delegate

Medium
Business logic

Funding cycles that use JBXBuybackDelegate as a redeem data source (or any derived class) will slash all redeemable tokens

The redeemParams function in JBXBuybackDelegate returns zero for the reclaim amount instead of passing through the input value, so any funding cycle configured to use it as a redeem data source will burn tokens and send zero tokens to the beneficiary. The function also lacks the virtual keyword, preventing derived contracts from overriding the faulty implementation.

Juicebox Buyback Delegate

Medium
Business logic

Delegate architecture forces users to set zero slippage

The delegate's design forces users to set the minimum returned tokens parameter to zero when paying, because the swap path returns a zero weight and would revert if the minimum is non-zero. This disables the slippage check when the vanilla minting path is taken, so users may receive fewer tokens than expected.

Juicebox Buyback Delegate

Medium
Business logic

The tier reserved rate is not validated and can surpass JBConstants.MAX_RESERVED_RATE

The tier reserved rate in the Juicebox NFT rewards contract is not validated and can be set above the maximum allowed value, causing an inflated count of outstanding reserved tokens. This inflated value increases the total redemption weight, which can reduce or zero out the amount users receive when redeeming their NFTs.

Juicebox Buyback Delegate

Medium
Business logic

Reserved token rounding can be abused to honeypot and steal user’s funds

The reserved-token calculation rounds up to one token when no tokens have been minted yet, so a project can mint a single reserve token for every tier and redeem them to take most of a victim's contribution. An attacker can launch a honeypot project and steal the first user's funds without any special flags.

Juicebox Buyback Delegate

High
Business logic

Outstanding reserved tokens are incorrectly counted in total redemption weight

The total redemption weight for overflow redemptions added the count of outstanding reserved tokens directly to a contribution-floor-weighted sum, instead of multiplying that count by the tier's contribution floor. This made the total weight inconsistent with the sum of individual contributor weights, so contributors could redeem incorrect (potentially larger) portions of the overflow.

Juicebox Buyback Delegate

High
Business logic

Changing default reserved token beneficiary may result in wrong beneficiary for tier

A tier's reserved token beneficiary is not stored explicitly when it matches the current default, so later changing the default silently redirects that tier's reserved tokens to the new default beneficiary. An attacker or owner could cause reserved tokens intended for one address to be sent to another.

Juicebox Buyback Delegate

Medium
Business logic

NFT not minted when contributed via a supported payment terminal

A Juicebox project can accept payments in multiple currencies via different payment terminals, but the NFT delegate only supports one pricing currency. If a payment is made in another currency and no price feed is configured, the delegate silently returns without minting the NFT, even if the contribution would have qualified for a tier.

Juicebox Buyback Delegate

Medium
Business logic

Beneficiary credit balance can unwillingly be used to mint low tier NFT

The payment processing function combines a new payment with the beneficiary's existing credit balance to mint NFTs, without checking that the payer is the beneficiary. An attacker can pay a small amount and name a victim as beneficiary, forcing the victim's saved credits to be used to mint a lower-tier NFT instead of the higher-tier one they were saving for.

Juicebox Buyback Delegate

Medium
Access control

Multiples initializations of JBTiered721Delegate

The initialize function of the JBTiered721Delegate contract could be called by anyone with a zero store address and empty parameters, letting them become the owner. The attacker could then call didPay with fake data to inflate creditsOf for arbitrary accounts without touching the store.

Juicebox Buyback Delegate

Medium
Access control

JBToken: mint function could mint arbitrary amount of tokens

The JBToken contract's mint function is restricted only to the owner, and ownership can be transferred to any address via the changeTokenOf function, allowing that address to mint an arbitrary number of tokens.

Juicebox Buyback Delegate

Medium
DoS

processFees() may fail due to exceed gas limit

The processFees() function iterates over an unbounded array of held fees, which can grow large as fees are added. An attacker could cause the function to exceed the gas limit, preventing fee distribution.

Juicebox Buyback Delegate

Medium
Business logic

addFeedFor should check if inverse feed already exists

The addFeedFor function only checked whether a price feed for the given currency pair already existed in one direction, but not the inverse direction. This allowed two different oracles to be set for the same pair in opposite directions, potentially causing inconsistent currency conversions.

Juicebox Buyback Delegate

Medium
Race condition

Token Change Can Be Frontrun, Blocking Token

A token ownership transfer could be frontrun by an attacker who calls the change function first, linking the token to their own project and gaining ownership. This could allow the attacker to mint arbitrary amounts of the token if it has an owner-restricted mint function.

Juicebox Buyback Delegate

High
DoS

Juicebox project owner can create a honeypot to cause grief

A project owner can set a very large number of splits, causing the distributeReservedTokensOf function to exceed the block gas limit when called. A user who calls it expecting a large share of reserved tokens instead loses gas fees without receiving tokens.

Juicebox Buyback Delegate

Medium
Smart contracts

Discounted fee calculation is imprecise and calculates less fees than anticipated

The fee calculation in the Juicebox smart contract used an incorrect formula that divided by the sum of the discounted fee and the maximum fee, leading to a lower fee being charged than intended. An attacker could exploit this to pay less than the required fee when making payments through the protocol.

Juicebox Buyback Delegate

Medium
DoS

Grieffer beneficiary can cause DOS

A beneficiary of a payout split could revert the transaction when receiving funds, which would block the distribution of payouts to all other beneficiaries. An attacker who controls one beneficiary address could therefore cause a denial of service for the whole payout process.

Juicebox Buyback Delegate

Medium
DoS

Unhandled chainlink revert would lock all price oracle access

The contract calls Chainlink's latestRoundData without error handling, so if the feed reverts, all price queries fail. Since feeds cannot be changed after configuration, this causes a permanent denial of service for price oracle access.

Juicebox Buyback Delegate

Medium
Smart contracts

Reentrancy issues on function distributePayoutsOf

The distributePayoutsOf function transfers funds to beneficiaries before updating state, allowing a beneficiary to re-enter and potentially cause incorrect calculations or repeated payouts. The judge noted a lack of a clear exploit path but confirmed that re-entry is possible if the attacker is a splits beneficiary.

Juicebox Buyback Delegate

Medium
Business logic

Code credits fee-on-transfer tokens for amount stated, not amount transferred

The Juicebox payment terminal credited the amount stated in a payment rather than the amount actually received when using fee-on-transfer tokens. This could cause withdrawals to revert because the contract's balance would be less than the recorded amount, potentially locking funds for projects.

Juicebox Buyback Delegate

Medium
Business logic

Use a safe transfer helper library for ERC20 transfers

The JBERC20PaymentTerminal contract calls ERC20 transfer and transferFrom without checking return values, so tokens that return false instead of reverting may silently fail, and tokens without return values (like USDT) cause reverts. An attacker could receive project tokens without their payment actually succeeding, and the terminal cannot support popular nonstandard ERC20s.

Juicebox Buyback Delegate

Medium
Audit finding

Oracle data feed can be outdated yet used anyways which will impact payment logic

The price feed contract used only the price answer from Chainlink's latestRoundData() without checking whether the data was stale or from a complete round. An attacker could exploit outdated price data to cause incorrect token minting, distribution amounts, and overflow calculations, impacting all projects and token holders.

Juicebox Buyback Delegate

High