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.
Locks one fixed denomination of ETH and appends the user's note commitment as a leaf in that denomination's Poseidon Merkle tree. This is the "into Tacit" direction — once the leaf is on-chain, the depositor can mint the matching confidential asset on Bitcoin.
ATTRIBUTE
VALUE
Selector
0x1de26e16
Parameters
commitment (Poseidon note commitment), denomination (must equal a configured pool denom, in wei)
Access
External, payable, nonReentrant, anyone
FLAG
OBSERVATION
☑
msg.value must equal denomination exactly for the ETH path; mismatch reverts
☑
Duplicate commitments are rejected per pool (DuplicateCommitment)
△
A second capacity gate queries the SP1 verifier's lastProvenPoolIndex and refuses deposits within POOL_TREE_RESERVE (1024) leaves of capacity, to avoid locking ETH the Bitcoin-side tree can no longer accept
◇
commitment must be a valid bn254 field element (< _FIELD_SIZE)
Splits a larger amount across several denominations in one transaction — e.g. deposit 0.11 ETH as one 0.1 + one 0.01 leaf. Each (commitment, denomination) pair is inserted independently; for ETH, msg.value must equal the sum of all denominations.
ATTRIBUTE
VALUE
Selector
0xa4b135c1
Parameters
commitments[], denominations[] (equal length)
Access
External, payable, nonReentrant, anyone
FLAG
OBSERVATION
☑
Each entry runs the full _insertDeposit precondition set independently
☑
msg.value must equal the summed denominations exactly
◇
Splitting across denominations is a common mixer technique for breaking round-number amount correlation
CONDITION
REQUIREMENT
Equal-length arrays
commitments.length == denominations.length
Per-entry checks
every entry satisfies _insertDeposit preconditions
Releases one denomination of escrowed ETH by proving that a corresponding T_BRIDGE_BURN happened on Bitcoin. The single call performs Bitcoin Simplified Payment Verification (SPV), Tacit envelope parsing, an SP1 accepted-burn lookup, and a Groth16 proof check before transferring funds. This is the "out of Tacit" direction and the core of the bridge.
External, nonReentrant, anyone (recipient is fixed inside the burn envelope, not by msg.sender)
FLAG
OBSERVATION
☑
Funds go to the recipient embedded in the burn envelope, never to msg.sender — so anyone can relay another user's withdrawal
☑
Six independent checks must all pass before funds move — enumerated in the Preconditions table below
☑
bindHash mixes block.chainid and address(this), preventing a burn proof from being replayed against a different chain or a different bridge deployment
△
The G2 element b is half-swapped on read (snarkjs (c0,c1) → precompile (c1,c0)); an ordering the code comments flag as test-pinned
△
No current-root equality check — an accepted burn claim remains redeemable even after the Bitcoin pool root advances. Intended (see code comment), but widens the validity window
CONDITION
REQUIREMENT
Bitcoin inclusion
verifyBlock confirms the header chain reaches the relay tip with ≥ 6 confirmations, and the tx Merkle proof matches the block's merkle root
The plain-ETH fallback reverts. ETH can only enter the contract through deposit / batchDeposit, never by a bare transfer. This blocks accidental sends and keeps totalBalance accounting exact.