--- name: avax-blackhole description: Integrate Blackhole six-field RouterV2 routes with verified Algebra generations and separate veNFT governance. --- # Blackhole swaps and veNFTs 1. Identify stable/volatile AMM versus Algebra CL and generation from [technical docs](https://docs.blackhole.xyz/technical-amm-documentation). RouterV2 does not mean every pool is constant-productV2. AlgebraV1/V2 position managers/farming differ; resolve customPoolByPair and pairToDeployer before selecting them. 2. Load `examples/protocols/blackhole/recipe.mjs` and manifest.json from the executable bundle root. RouterV2: 0x9EED160D7D8253DeC1A2A512e504DE5E7ff3C111; RouterHelper proxy: 0xB603a73eB0E8713B87f957051d5128548BCa37d7; tested AlgebraV2 WAVAX/native-USDC pool: 0x7789fA308147Eae364e3BCfa35351F2b9E0bd012; spacing1 custom deployer: 0x43c4b7BD4C173992C6711c631859A2EAC84BF8Db. 3. Run `inspect({provider,blockTag,amountIn})`. Verify chain43114, runtime AND proxy implementation hashes, router/factory/helper/WAVAX, custom-factory pool membership, token order/spacing/liquidity, pool generation and Voter→VotingEscrow/GaugeManager. Unchanged proxy runtime does not prove unchanged implementation. 4. Quote RouterHelper.getAmountsOut.staticCall at the inspected block. Despite nonpayable ABI, eth_call does not persist. Validate first/last amounts and retain price-before/after context. Default raw '10000000000000000' is0.01 WAVAX ERC20, not nativeAVAX. 5. Encode six route fields: pair, from, to, stable, concentrated, receiver. Tested CL uses stable=false/concentrated=true; final receiver MUST equal swap to. Approve RouterV2, not helper/pool, despite helper receiving transferred input. `plan(input,evidence)` binds route, quote, owner/recipient, raw amounts, minimum and deadline; returns exact approvals and unsigned calldata. 6. Refresh/simulate after approvals. Run tests/live/fork commands; reconcile input/output and exact allowance consumption. The fork proves successful swap, IOA for inadequate output and IR for mismatched final receiver. ```sh node --test examples/protocols/blackhole/recipe.test.mjs node research/parity-dexes/run-live.mjs node research/parity-dexes/fork-execution.mjs ``` ## Governance is another state machine VoterV3.vote takes uint256 tokenId, pools and weights, not Pharaoh's user address. Check isApprovedOrOwner, voting power, lastVoted/timestamp, maxVotingNum, live gauges and current epoch/AVM restrictions. Documented final-hour restrictions require current contract eligibility, not only a countdown. VotingEscrow.locked returns amount:int128, end:uint256, isPermanent and isSMNFT. create_lock includes isSMNFT: Supermassive locks have different irreversible economics, never select this as a convenience default. GaugeManager.claimBribes uses bribe/token arrays and tokenId; fees, rebases and LP rewards differ. Swap planning rejects vote/claim and proves no holder-specific governance path. **Deliver:** engine/helper implementation; exact quote/route/spender; unsigned plan; simulation/local deltas; explicit governance/zap/LP limits. Evidence expires after300 seconds and deadline is future within600 seconds. Runtime identity is not a source audit. Sources: [technical docs](https://docs.blackhole.xyz/technical-amm-documentation), [voting](https://docs.blackhole.xyz/protocol-design/voting), [locks](https://docs.blackhole.xyz/protocol-design/locks), [pinned RouterV2](https://github.com/BlackHoleDEX/Contracts/blob/9fe67b59e346b463f77ab9e50c4018f5d1b1bd8e/contracts/RouterV2.sol), [pinned VoterV3](https://github.com/BlackHoleDEX/Contracts/blob/9fe67b59e346b463f77ab9e50c4018f5d1b1bd8e/contracts/VoterV3.sol).