# Making a payment to the protocol with _dontMint parameter will result in lost fund for user.

Juicebox JBTiered721Delegate._processPayment returns early when _dontMint is set, skipping creditsOf update so the payer's ETH is lost instead of credited.

- Payout: Contest reward
- Severity: high
- Program: Juicebox
- Credited: yixxas
- Disclosed: 2023-01-09
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-10-juicebox-findings/issues/45
- Library page: https://bugbountylibrary.com/r/c4%3A2022-10-juicebox%3AH-01
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** JBTiered721Delegate._processPayment (NFT rewards extension)
**Root cause:** When metadata carries the IJB721Delegate interfaceId and _dontMint is true, _processPayment returns immediately before the leftover-amount logic that writes creditsOf[_data.beneficiary], so the paid value is neither minted nor credited.
**Steps:**
1. Deploy project via deployer.launchProjectFor with tiered NFT delegate and tiers with contributionFee 10..100.
2. Call _jbETHPaymentTerminal.pay{value:10}(projectId,100,address(0),_user,0,false,'Take my money!',new bytes(0)) -> user mints 1 NFT.
3. Record creditsOf(_user) before.
4. Call pay again with metadata `abi.encode(bytes32(0), type(IJB721Delegate).interfaceId, true, false, false, empty)` (_dontMint=true).
5. Observe NFT balance unchanged and creditsOf(_user) unchanged despite ETH paid.
**How found:** Code reading of _processPayment: noticed the early `if (_dontMint) return;` inside the metadata branch bypasses the trailing creditsOf update, then confirmed with a Foundry E2E test.
**Exploitation:** Any payer using the _dontMint flag (intended to skip NFT minting to save gas) sends ETH that is neither minted into an NFT nor recorded as credits, permanently losing the funds to the protocol.
**Insight:** In payment handlers with multiple early-return branches, check that every exit path still performs the accounting write (credits/refunds) that the normal path does; flags meant to skip one action often skip bookkeeping too.
