fn is_paused(env: soroban_sdk::Env) -> bool
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
order_book: soroban_sdk::Address,
escrow_vault: soroban_sdk::Address,
settlement: soroban_sdk::Address,
zk_verifier: soroban_sdk::Address,
relayer_1: soroban_sdk::Address,
relayer_2: soroban_sdk::Address,
relayer_3: soroban_sdk::Address,
)
Admin-only emergency switch. Pausing blocks new match submissions only.
fn set_paused(env: soroban_sdk::Env, admin: soroban_sdk::Address, paused: bool)
Validate and settle a matched order pair — trustlessly.
Instead of trusting the relayer's revealed prices, the relayer supplies a
Groth16 match_proof. The MatchProof circuit proves, in zero knowledge, that
both commitments open to real orders, the clearing price lies within both
limit prices, the fill is within both committed quantities, and
usdc_amount = floor(xlm_amount * clearing_price / 1e6).
Public signals (verified against the on-chain MatchVk): [buyer_commitment, seller_commitment, clearing_price, xlm_amount, usdc_amount] This contract binds those signals to the orders it settles, so a valid proof cannot be replayed against different orders or amounts.
v1: requires relayer_1 auth (chooses WHICH crossing pairs to match). v2: upgrade to 2-of-3 threshold multisig.
fn submit_match(
env: soroban_sdk::Env,
buyer_commitment: soroban_sdk::BytesN<32>,
seller_commitment: soroban_sdk::BytesN<32>,
xlm_amount: i128,
usdc_amount: i128,
match_proof: Groth16Proof,
match_public_signals: soroban_sdk::Vec>,
)
fn get_match_count(env: soroban_sdk::Env) -> u64