The _calculateFees function implements a three-tier progressive fee structure (1%, 3%, 5%), but the uint32 type used for the listing price caps the maximum value at ~$4,294.97 USDC. This renders the 5% fee tier (HIGH_FEE_BPS) completely unreachable and limits the 3% tier (MID_FEE_BPS) to prices between $1,000 and ~$4,294.97 instead of the intended $1,000-$10,000 range. The protocol will never collect fees at the intended higher rates.
The protocol owner deploys with the expectation of collecting 5% fees on high-value sales above $10,000 USDC and 3% fees on sales up to $10,000. In reality, the maximum fee rate achievable is 3% and only on sales between $1,000 and ~$4,294 USDC.
Fee revenue comparison at maximum listable price (~$4,294.97 USDC):
Actual fee (3%): ($4,294.97 * 300) / 10,000 = ~$128.85 USDC
**Intended fee if $10,000 sale were possible (3%):** ($10,000 * 300) / 10,000 = $300 USDC
**Intended fee if $15,000 sale were possible (5%):** ($15,000 * 500) / 10,000 = $750 USDC
The protocol permanently loses all fee revenue above the $128.85 cap per transaction, and the entire HIGH_FEE_BPS code path is dead code.
Additionally, there is a fee cliff at the $1,000 boundary: listing at $1,000 incurs a 1% fee ($10), but listing at $1,001 jumps to 3% ($30.03) — a $20 increase in fees for $1 more in price. This creates a perverse incentive for sellers to price just under $1,000 to avoid the fee jump.
The _calculateFees function operates on uint256 and defines thresholds that exceed uint32 capacity:
Since listing.price is uint32 (max 4,294,967,295), and MID_FEE_THRESHOLD is 10,000,000,000:
The else if branch is reachable only for prices $1,000.01 to ~$4,294.97
The final return branch is never reachable — _price can never exceed MID_FEE_THRESHOLD
src/NFTDealers.sol:233-240 — _calculateFees() with unreachable 5% branch
src/NFTDealers.sol:28-29 — Fee thresholds exceeding uint32 capacity
src/NFTDealers.sol:60 — uint32 price in Listing struct (root cause)
Copy the test code below
Paste it into test/NFTDealersTest.t.sol
Run: forge test --mt test_unreachableFeeTiers_POC -vvv
Location: test/NFTDealersTest.t.sol
| Fee Tier | Price | Fee | Reachable via Listing? |
|---|---|---|---|
| 1% | $500 | $5.00 | Yes |
| 1% (boundary) | $1,000 | $10.00 | Yes |
| 3% | $1,001 | $30.03 | Yes |
| 3% (near max) | $4,294 | $128.82 | Yes (near uint32 cap) |
| 5% | $10,001 | $500.05 | NO - exceeds uint32 max |
| 5% | $50,000 | $2,500.00 | NO - exceeds uint32 max |
The fee cliff at $1,000 boundary: $1 price increase causes a $20.03 fee jump.
Change the price field in the Listing struct from uint32 to uint256 (see H-01 mitigation). This allows prices to reach all fee tiers as intended. Additionally, consider implementing marginal/progressive fee rates instead of flat per-bracket rates to eliminate the fee cliff at tier boundaries.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.