zerotracedocs

Constants

Every protocol constant and default, with its exact value, including the Pons terms ZERO trades under.

Values are read from the verified contracts. Where a value is set at deployment, the table gives the value the mainnet deployment uses; read the live value from the contract when it matters.

PrivateVault

ConstantValueMeaning
VIRTUAL_SHARES1e6Virtual shares in the share price, against the first-depositor inflation attack
NETWORK_FEE_INTERVAL1 hoursHow often poke resets the network fee from the price average; the previous fee stays accepted until the next reset
opCostWei (storage, read through maxOpCostWei())0.0002 ether at deploymentThe operation cost: the most an operation may charge the gas deposit, and the value in ETH of the network fee. Set by initialize, then by the guardian with setOpCost
MIN_OP_COST_WEI0.00005 etherThe lowest operation cost the guardian can set
MAX_OP_COST_WEI0.001 etherThe highest operation cost the guardian can set
Network feeopCostWei * tokensPerEthEma / 1e18 ZERO (at least 1)An operation must pay at least the lower of networkFee and previousNetworkFee, and may cost at most the operation cost that goes with the fee it pays
MAX_PRICE_STEP_BPS1_000 (10%)A block's price (the last one poked in it) enters the average clamped to ±10% of it
EMA weight1/8ema = (ema * 7 + close) / 8: at most 1/8 × 10% = 1.25% per block
BPS_DENOMINATOR (private)10_000Basis points
SIG_VALIDATION_FAILED (private)1Returned by validateUserOp for an invalid proof
EIP-712 version"1"EIP712(name, "1"); the domain name is the constructor's name_ (TOKEN_NAME, zerotrace), the verifying contract the proxy
DEFAULT_ADMIN_ROLE0x00Grants and revokes every role; the admin role of all three
UPGRADER_ROLEkeccak256("UPGRADER_ROLE")May call upgradeToAndCall
GUARDIAN_ROLEkeccak256("GUARDIAN_ROLE")May call pause, unpause, setEntriesPaused, setTargetExitsPaused and setOpCost
UPGRADE_INTERFACE_VERSION"5.0.0"OpenZeppelin UUPS: upgrades go through upgradeToAndCall only
REGISTER_TYPEHASH (private)keccak256("Register(address owner,uint256 opk,bytes32 viewKey,uint256 nonce,uint256 deadline)")registerFor signatures
Share priceconvertToAssets(s) = s * (B + 1) / (S + VIRTUAL_SHARES)Rounds down; convertToShares is the inverse
ERC-4337 nonceuint192(nullifiers[0]) << 64One nonce key per first nullifier

The price average counts block.number, which on Robinhood Chain is the L1 block (about 12 seconds).

FeeHarvesterV3

ConstantValueMeaning
TEAM_SHARE_BPS5_000 (50%)Share of the ETH each harvest collects that is owed to the team's recipient: 0.35% of each trade
MAX_IMPACT_BPS50 (0.5%)The most a single buy may move ZERO's price, sized from the pool's active liquidity or the curve's ETH reserve
MAX_PREMIUM_BPS1_500 (15%)A buy must get at least 85% of the ZERO the vault's price average gives, after Pons fees
CALLER_TIP_BPS50 (0.5%)The caller's gas refund never exceeds this share of the ETH a harvest puts to work
GAS_OVERHEAD25_000Gas refunded on top of what the call measures, at min(tx.gasprice, 2 * block.basefee)
Buys per block1At most one buy per L1 block (lastBuyBlock)
MAX_HALVINGS (private)8Sizes tried for a buy the market does not take within the limits, halving each time
BPS (private)10_000Basis points
targetDeposit (immutable)0.1 etherEntryPoint deposit the harvester keeps for the vault

The owner's handOver changes ZERO's creator fee recipient at once: there is no successor delay.

FeeHarvesterV2, an earlier harvester, has the same values plus SUCCESSOR_DELAY (24 hours): how long a proposed successor waits before anyone can make it ZERO's fee recipient.

FeeHarvester (launch)

ConstantValueMeaning
MAX_SLIPPAGE_BPS300 (3%)A buy must land within this distance of the price average, after Pons fees
CALLER_TIP_BPS50 (0.5%)As in V3
GAS_OVERHEAD25_000As in V3
SUCCESSOR_DELAY24 hoursAs in FeeHarvesterV2
MAX_HALVINGS (private)8Sizes tried for a buy too large for the tolerance, halving each time (down to 1/128)
targetDeposit (immutable)0.1 etherEntryPoint deposit the harvester keeps for the vault

NoteRefund

ConstantValueMeaning
ROOT18245288291973779630509445427376437660009926679625643508353614234913233621661The earlier vault's note-tree root at block 86632173, its last state
BACKING90422335996389553352857672The earlier vault's totalBacking then, in wei of ZERO
SHARES20520873138048082021922500621968Its totalShares then
VIRTUAL_SHARES1e6As in the vault: a note of s shares is refunded s * (BACKING + 1) / (SHARES + VIRTUAL_SHARES)
Refund fund90409186608928900835385885 wei (90,409,186.61 ZERO)Every share but the locked seed's, at that value, rounded up
Spent before that state120 nullifiersNotes already spent then, never refunded
MIN_OP_COST_WEI / MAX_OP_COST_WEI0.00005 / 0.001 ETHRange of the cap on a claim's gas cost; it starts at 0.0002 ETH
REFUND_CALL_GAS (SDK)1_300_000Execution gas of a claim: the shield into the vault

PoseidonMerkleTree

The same values hold in the circuit and in the app.

ConstantValueMeaning
TREE_DEPTH242^24 = 16,777,216 leaves per tree
ROOT_HISTORY_SIZE64Recent roots accepted by isKnownRoot; final roots of full trees stay valid forever
Empty leaf0
Insertionpairs of leaves1 + 23 = 24 tree hashes per insertion; a single note is paired with an empty leaf

NoteHash and the circuit

ConstantValueMeaning
FIELD0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 (21888242871839275222246405745257275088548364400416034343698204186575808495617)BN254 scalar field modulus
DOMAIN_NOTE1cm = H(DOMAIN_NOTE, stub, shares)
DOMAIN_NULLIFIER2nf = H(DOMAIN_NULLIFIER, nk, cm, index)
SHARES_BITS120Maximum bit size of any share amount in the circuit
SPEND_TYPEHASHkeccak256("Spend(bytes32 transaction)")EIP-712 type the wallet signs for every spend
HashPoseidon2 over BN254stub = H(opk, rho, r), opk = H(nk, wallet key limbs), tree nodes H(left, right)

Circuit and proof sizes

ItemValue
Inputs and outputs2 input notes, 2 output notes
Public inputs9: root, 2 nullifiers, 2 commitments, exit shares, extDataHash, domain separator high and low 128 bits
NUMBER_OF_PUBLIC_INPUTS in the generated verifier17
VK_HASH in the generated verifier0x099927050be607d17373997a1fb29eb5ae5f68756b81a6b1faa5c81304743cc0
NUM_SMALL_IPA_OPENING_CLAIMS in the generated verifier5: the small-subgroup IPA also opens the grand sum at 1
Circuit sizeN = 131072 (2^17, LOG_N = 17)
Gates83,781, of which about 73,000 check the wallet signature (measured)
Proof size9,152 bytes (PROOF_BYTES)
Proof systemUltraHonk, EVM target (-t evm: keccak transcript, ZK)
On-chain verificationabout 2.42M gas (measured, forge test --gas-report)
Proving timeabout 1.3 s in Node, 3 to 5 s in desktop Chrome (measured)
Toolchainnargo and @noir-lang/noir_js 1.0.0-beta.25, bb and @aztec/bb.js 5.2.1, noir-lang/poseidon v0.3.0; pinned in circuits/scripts/toolchain.sh, downloaded from the GitHub releases with checksums checked

Pons terms

Set by Pons V2 when it created ZERO, and frozen since. Read them from the curve (feeBps, creatorTaxBps, protocolFeeShareBps) and from factory.getLaunchedToken(zero).

TermValueMeaning
Supply1,000,000,000 ZERO (18 decimals)Minted into the bonding curve at launch
Standard fee (feeBps)100 (1%)On every trade, on the curve and on the graduated pool
Pons share (protocolFeeShareBps)3000 (30% of the standard fee)Kept by Pons
Creator tax (creatorTaxBps)0On every trade, all to the creator fee recipient (the harvester). Pons caps it with maxCreatorTaxBps()
Buybackdisabled (buybackEnabled = false)All of the creator share goes to the harvester
Trader pays1%Standard fee plus creator tax
Reaches the harvester0.7%70% of the standard fee
Of which to the team0.35%The harvester's TEAM_SHARE_BPS; the other 0.35% is the private holders' (gas deposit, then ZERO for the vault)
Fee currencyETHCredited to the Pons fee escrow; the harvester calls claim()
Graduation threshold4.2 ETH collected by the curveThen graduate and createGraduatedPool, both permissionless
Graduated poolfee 0, tick spacing 200, hook factory.memeHook()Native ETH as currency0, ZERO as currency1
Opening snipe tax99%, decaying to 0 over 5 secondsOn buys only; addresses named at launch are exempt, as Pons' rules allow
Launch phases0 not graduated, 1 swept, 2 pool createdPonsLaunchedToken.phase

Deployment values

ItemValueMeaning
Token name / symbolzerotrace / ZEROZERO's expected name and symbol, checked before deploying; the name is also the vault's EIP-712 domain name
Creator tax0ZERO's expected Pons creator tax, checked before deploying
Seed purchase0.001 etherSEED_ETH of DeployV3.s.sol: spent on ZERO for the locked seed note, bought through the router
Seed note stubkeccak256("zerotrace/locked-seed") mod FIELDNobody knows a preimage, so the note cannot be spent
Initial gas deposit0.1 etherGAS_DEPOSIT of DeployV3.s.sol: the vault's initial EntryPoint deposit
Target deposit0.1 etherThe harvester's target, read from the previous harvester
OP_COST_WEI of DeployV3.s.sol0.0002 etherThe vault's operation cost at deployment
Vault rolesADMIN, UPGRADER, GUARDIAN of DeployV3.s.solAt launch all three are 0x1B0210b9695BbEB8bD70964A46bf512021127A73 (the deployer). On Robinhood Chain ADMIN and UPGRADER must be named explicitly; GUARDIAN defaults to the deployer
Harvester ownerHARVESTER_OWNER of DeployV3.s.sol0x1B0210b9695BbEB8bD70964A46bf512021127A73 (the deployer); defaults to the previous harvester's owner
Harvester team recipient0x1B0210b9695BbEB8bD70964A46bf512021127A73Read from the previous harvester
Successor delay of the previous harvester24 hoursThe hand-over from FeeHarvesterV2 to FeeHarvesterV3, executed by DeployV3.s.sol's execute()
Optimizer runs200 for PrivateVault, 10_000 for every other contractThe vault at 10,000 runs exceeds the 24,576-byte contract size limit
Salt namespacezerotrace-v1Salt namespace of the CREATE3 addresses
CreateX0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5EdCREATE3 factory for the first deployment's contracts, the hasher and the launch harvester among them; salts are guarded by the deployer and the chain ID
Pons factory0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7ePons V2 launch factory
Pons fee escrow0xd3AFEB2a57f70eF218Aa82451c51B2fb0416Ac9eWhere Pons credits the creator fees
PoolManager0x8366a39CC670B4001A1121B8F6A443A643e40951Uniswap v4 PoolManager
EntryPoint0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108ERC-4337 EntryPoint v0.8

App defaults

What the ZeroTrace app uses when it builds a private transaction.

ItemValueMeaning
Verification gas limit5,500,000Validation gas limit of every private action
Call gas, sale650,000Execution gas of a sale (the swap and the ETH transfer)
Call gas, send or unshield60,000Execution gas of a send or unshield
Proof size9152 bytesThe placeholder proof used for estimates has the same size
EntryPoint0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108Canonical EntryPoint v0.8
CRS points2 ** 17 (131072)CRS points the prover loads, served by the app
Note ciphertext length286 bytes32 (ephemeral key) + 1 (view tag) + 24 (nonce) + 96 + 117 (memo) + 16 (tag)
Share amount limit2 ** 120The same bound as SHARES_BITS in the circuit
Slippage100 bps (1%)Minimum output = quote × (10,000 − slippage) / 10,000
Provisional gaspreVerificationGas 1,000,000; maxFeePerGas 0.1 gwei; maxPriorityFeePerGas 1,000,000 weiUsed before the bundler's estimate, when the bundler reports no price
Fee in sharesshares worth networkFee, rounded up, plus 1Shares paid as the network fee
Gas cost check(verificationGasLimit + callGasLimit + preVerificationGas) * maxFeePerGas <= maxOpCostWeiChecked before proving; above it the app asks to try again later
Bundler gas pricestandard × 5/4From pimlico_getUserOperationGasPrice
Bundler preVerificationGasestimate × 11/10
Bundler receipt pollingfrom every 2 s, backing off to 5 sGives up after 2 minutes
Direct submission gas20,000,000Gas of the handleOps call when the wallet submits it itself
Key-derivation Issued At2026-01-01T00:00:00.000ZFixed, so the message and the keys are deterministic
Key-derivation Noncefirst 16 hex characters of the earlier vault's addressThe key and payment-link messages name the earlier vault (Deployment.keyVault), so wallets keep their keys and private address

Services

ItemValue
App domainzerotrace.so
Bundlerhttps://public.pimlico.io/v2/4663/rpc
Indexer page size of /events2000 events

On this page