Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Smart Contracts

Overview of the Shinobi Cash smart contract architecture.


High-Level Architecture

Shinobi deploys contracts across two chain types, with a single canonical privacy pool.

Pool Chain (Arbitrum)

ContractRole
ShinobiCashEntrypointOrchestrates withdrawals, receives crosschain deposits
ShinobiCashPoolPrivacy pool — commitments, nullifiers, ZK verification
ShinobiInputSettlerEscrow and refunds for withdrawal intents
ShinobiDepositOutputSettlerFills crosschain deposit intents
PaymastersERC-4337 gas sponsorship

Origin Chains (Base, etc.)

ContractRole
ShinobiCrosschainDepositEntrypointUser deposit interface
ShinobiInputSettlerEscrow and refunds for deposit intents
ShinobiWithdrawalOutputSettlerFills crosschain withdrawal intents

The pool chain is the source of truth for privacy state. Origin chains provide deposit interfaces and receive withdrawal execution. All crosschain movement is mediated via OIF settlers and oracles.


Core Contract Groups

Entrypoints

User-facing contracts that orchestrate deposits and withdrawals.

  • ShinobiCashEntrypoint (pool chain)
    Proof-verified withdrawals, pool updates, refund commitments

  • ShinobiCrosschainDepositEntrypoint (origin chains)
    User interface for crosschain deposits


Privacy Pool

Canonical privacy state.

  • Commitment insertion (deposits)
  • Nullifier spending (withdrawals)
  • Multi-note spending (withdraw2)

Shinobi × OIF (Settlers)

Crosschain escrow, fills, and refunds using the Open Intent Framework.

  • ShinobiInputSettler — escrow and refunds on origin chains
  • ShinobiDepositOutputSettler — deposit fills with mandatory intent validation
  • ShinobiWithdrawalOutputSettler — optimistic withdrawal fills

Paymasters

ERC-4337 paymasters for gasless withdrawals.

  • Replace relayers and pre-funded wallets
  • Enforce fees on-chain
  • Use standard AA infrastructure

Next