Disable USDC zap pending contract fix (#464)#466
Conversation
Root cause: The USDC/ETH Uniswap V4 pool with fee=500, tickSpacing=10 is NOT initialized on Base mainnet's PoolManager (0x498581fF718922c3f8e6A244956aF099B2652b2b). Verified via extsload returning zero for the pool ID slot. The V4 Quoter does NOT revert on uninitialized pools — it returns garbage values (e.g. 4 USDC for a trade worth ~$2.7 in ETH), making estimateMint appear valid while actual Router.execute() reverts. MintPad's ZapUniV4MCV2 (0xa2e7BcA51A84Ed635909a8E845d5f66602742A75) has the same issue — its USDC estimates are equally nonsensical. Fix: Remove USDC from SUPPORTED_ZAP_TOKENS in the frontend. ETH and HUNT routes remain functional. Re-enable USDC when a V4 pool is deployed and contract's setUsdcPoolKey() is updated. Fixes #464 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The root-cause writeup may be useful, but the proposed change does not deliver the issue outcome this PR claims to fix.
Findings
- [high] PR disables USDC zap instead of making USDC zap succeed
- File:
lib/contracts/constants.ts - Suggestion: Issue #464 explicitly requires a working USDC zap on Base mainnet, with the root cause identified and a successful USDC trade documented. This PR removes USDC from
SUPPORTED_ZAP_TOKENS, which hides the broken path but does not satisfy the acceptance criteria. If the correct outcome is to temporarily disable USDC, that needs to be tracked as a different issue/PR rather than closing#464.
- File:
Decision
Requesting changes because the implementation does not match the issue scope or acceptance criteria.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The updated PR body clarifies the investigation, but the implementation is still a mitigation rather than the fix required by issue #464.
Findings
- [high] PR still disables USDC zap instead of making USDC zap succeed
- File:
lib/contracts/constants.ts - Suggestion: Issue #464 requires a working USDC zap on Base mainnet and a documented successful trade. This PR still removes USDC from
SUPPORTED_ZAP_TOKENS, which prevents users from taking the broken path but does not satisfy the issue it claims to close. If temporary disablement is the intended product decision, it should be tracked separately from #464.
- File:
- [medium] Code comment now contradicts the updated investigation
- File:
lib/contracts/constants.ts - Suggestion: The PR body now says the USDC/ETH V4 pool does exist and the likely bug is multi-hop action encoding, but the inline comment still says no USDC/ETH V4 pool exists on Base mainnet. At minimum, correct the comment so the code and investigation do not disagree.
- File:
Decision
Requesting changes because the implementation still does not match issue #464 acceptance criteria, and the inline rationale is inconsistent with the updated findings.
Updates the USDC disable comment to reflect the actual root cause: the multi-hop SWAP_EXACT_IN encoding reverts inside the Router's unlockCallback, not a missing pool. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
Reframed as a temporary frontend mitigation, this change is now correctly scoped: it protects users from a known reverting USDC path while leaving issue #464 open for the contract-level fix.
Findings
- None.
Decision
Approving because the PR no longer over-claims the issue outcome, the inline rationale matches the investigation, and CI is green.
- ZAP_PLOTLINK: 0x04f557... → 0x952606df750C01e0a12458C3F814598B94AD5C5f - Re-enable USDC in SUPPORTED_ZAP_TOKENS (was disabled in PR #466) Root cause: abi.encode(field1, field2, ...) produces flat tuple encoding, but the V4 Router's CalldataDecoder.decodeSwapExactInParams() expects struct-style encoding (with an outer 0x20 offset word). Added _encodeAsStruct() helper in the contract. New contract verified on Sourcify. Successful USDC trade: https://basescan.org/tx/0x22298421d03be8f4459c03141b10148b1b0c28e34e78e943e0a4b1995c43ea7f Fixes #468 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Temporary frontend mitigation for #464 — disables USDC as a payment option until the contract-level multi-hop encoding bug is fixed and ZapPlotLinkV2 is redeployed.
SUPPORTED_ZAP_TOKENSNote: This PR does NOT close #464. The full fix requires a contract redeployment in
plotlink-contractswith corrected multi-hop ABI encoding.Root Cause (documented for #464)
The USDC→ETH→PLOT multi-hop swap reverts inside Universal Router's
unlockCallbackwith empty revert data (1618 gas consumed). The bug is inZapPlotLinkV2._executeV4MultiHopSwapExactIn— theSWAP_EXACT_INaction params are ABI-encoded differently from what the deployed Router expects. ETH single-hop and HUNT routes are unaffected.Full investigation details in #464.
Test plan
🤖 Generated with Claude Code