Skip to content

Methodology

DISCLAIMER // NFA // DYOR

This analysis is based on observations of the contract behavior. We are not smart contract security experts. This document aims to explain what the contract appears to do based on the code. It should not be considered a comprehensive security audit or financial advice. Always verify critical information independently and consult with blockchain security professionals for important decisions.

⊙ generated by robots | curated by humans

METADATA
Contract Address 0x00000000...1da8dB (etherscan)
Network Ethereum Mainnet
Analysis Date 2026-07-03

Overview

The analysis worked from verified source. Because the contract is verified on Etherscan (ConfidentialPool, solc 0.8.34, viaIR), the standard-json source was fetched and split into files, and every finding was read directly from Solidity rather than reconstructed from bytecode. On-chain state and activity were then pulled with cast and the Etherscan v2 API to ground the analysis in what the contract actually holds and has done, and the ten constructor immutables were decoded from the creation bytecode to establish the external wiring (SP1 verifier, program/relay vkeys, canonical factory, Bitcoin relay, collateral engine, tETH link, reflection genesis + resume digest).

The reading proceeded subsystem by subsystem: the shielded note tree and nullifier set; the wrap/deposit boundary; the one settle entrypoint (the bulk of the logic); the attestBitcoinStateProven reflection path; the public and confidential AMM; the CDP/cUSD and cBTC gates; and the farm treasury. Activity was cross-checked against emitted events (6 AssetRegistered, 5 Wrap, 9 LeavesInserted, 7 NullifiersSpent; no cross-out/CDP/cBTC events), confirming the deployer's self-test covered deposits, transfers/unwraps, asset registration, and Bitcoin attestation but not the exotic paths.

Thought Process

mindmap
  root((ConfidentialPool))
    Obtain
      Etherscan verified source
      Split standard-json
      Decode 10 constructor immutables
      cast codesize / balance
    Understand
      Standalone, immutable, no proxy
      SP1 proof, not Groth16
      3 Merkle trees: note / lock / CDP
      6 registered assets
    Subsystems
      Wrap / settle boundary
      Confidential + public AMM
      CDP / cUSD via CollateralEngine
      cBTC vs reflected locks
      Bitcoin bridge + reflection
    Trust
      2 SP1 guest vkeys off-chain
      4 external contracts
      Mutable DAO engine
      No admin / pause / upgrade
    Verify
      cast call view state
      Etherscan txlist + logs
      Deployer funded by z0r0z EOA
      Registered token addresses

Verification Guide

Analysis relied on the verified Etherscan source plus on-chain reads with Foundry cast and the Etherscan v2 API. Source files were saved under the artifacts directory; no decompilation was needed.

External Resources


Commandline Tools

Tip

Commands below use cast from the Foundry Toolkit. To run the commands below, you must set the RPC URL environment variable:

export ETH_RPC_URL=https://eth.llamarpc.com

Confirm identity, size, and verification

# CODE SIZE OF THE DEPLOYED CONTRACT (24,566 BYTES)

cast codesize 0x000000000049Cc3f65588E74d9c25B66781da8dB


# CURRENT NATIVE ETH BALANCE (0)

cast balance 0x000000000049Cc3f65588E74d9c25B66781da8dB --ether

Read live shielded-pool state

# NOTE-TREE LEAF COUNT AND ROOT

cast call 0x000000000049Cc3f65588E74d9c25B66781da8dB "nextLeafIndex()(uint256)"
cast call 0x000000000049Cc3f65588E74d9c25B66781da8dB "currentRoot()(bytes32)"


# CBTC BACKING (SATS) AND THE FIXED CBTC ASSET ID

cast call 0x000000000049Cc3f65588E74d9c25B66781da8dB "cbtcBackingSats()(uint256)"
cast call 0x000000000049Cc3f65588E74d9c25B66781da8dB "CBTC_ZK_ASSET_ID()(bytes32)"

Resolve registered assets and escrow

# RESOLVE A SHARED BITCOIN ID TO THE CANONICAL ERC-20 (E.G. CBTC_ZK_ASSET_ID -> tacBTC)

cast call 0x000000000049Cc3f65588E74d9c25B66781da8dB \
  "canonicalTokenFor(bytes32)(address)" \
  0x62a20d98fc1cd20289621d1315294cb8772f934d822e404b71e1f471cf0679c8


# READ AN ASSET REGISTRY ENTRY AND ITS ESCROW (USDC INTERNAL ID)

cast call 0x000000000049Cc3f65588E74d9c25B66781da8dB \
  "assets(bytes32)(bool,address,uint256,bytes32,bool,uint8)" \
  0xc05bfed4c4eb61d2b39b643f841b78964ec96715a5795853b94be0dbc569c1d6
cast call 0x000000000049Cc3f65588E74d9c25B66781da8dB \
  "escrow(bytes32)(uint256)" \
  0xc05bfed4c4eb61d2b39b643f841b78964ec96715a5795853b94be0dbc569c1d6

Decode constructor immutables (external wiring)

# THE CREATION BYTECODE CARRIES 10 ABI-ENCODED CONSTRUCTOR ARGS IN ITS LAST 0x140 BYTES.
# FETCH IT FROM THE ETHERSCAN getcontractcreation ENDPOINT, THEN ABI-DECODE THE TAIL:
#   (address sp1Verifier, bytes32 programVKey, bytes32 bitcoinRelayVKey, address canonicalFactory,
#    address headerRelay, bytes32 genesisReflectionAnchor, uint256 reflectionConfirmations,
#    bytes32 reflectionResumeDigest, bytes32 tethBitcoinLink, address collateralEngine)

cast abi-decode "c(address,bytes32,bytes32,address,address,bytes32,uint256,bytes32,bytes32,address)" \
  0x<LAST_0x140_BYTES_OF_CREATION_BYTECODE>

Token Cost Breakdown

PHASE DESCRIPTION TOKENS
Phase 0 Obtain the Contract (fetch verified source, decode constructor) 25 tok
Phase 1 Discovery & Understanding (read 2,380 lines, map subsystems) 55 tok
Phase 2 Deep Dive Analysis (settle / attest / AMM / CDP / cBTC) 30 tok
Phase 3 Risk & Trust Analysis 20 tok
Phase 4 Documentation Generation (6 files) 35 tok
TOTAL Complete Contract Analysis 165 tok

Note: Token costs are estimates based on typical conversation lengths and complexity. Actual consumption may vary by ±10-15% depending on API responses, iterative refinement, and verification steps.