One invoke per transaction.
So weave the plan inside it.

The STRK20 pool allows a single external call per private transaction. That makes a private DeFi action only as expressive as the one helper contract it reaches. Jalin takes a plan instead — any number of steps, any contract, any calldata — and runs it inside that single invoke.

This is a router, not an application. It ships no use case of its own — it is the contract the next private swap, vault deposit or bridge leg would otherwise each have to write, audit and deploy separately.

Open the composerLive on Starknet mainnet · 4 qualifying transactions

Qualifying transactions on mainnet

  1. T10x060a25127edcca8a5f310fa711c1566dd39c688c8b30406d7482388d715ed311
  2. T20x023f7828c9be1a04c54ab0d2b95e48506a807906c76fd6646f2c6cedc77cdf70
  3. T30x07edfb70871f834236ff00f330ae20f214c0bfefa11f219a69d681d5627f9cab
  4. T40x0694f9d76480b957a0badeb1ea72a637dba903bf33c833716c5ff956f96a96bc

Each succeeded, touched the pool, and ran through a contract of ours — check them against the sprint's own rules. Or watch one being built: the demo, 3:38 — linked rather than embedded, because a 28 MB autoplay is not what a first viewport is for.

approvedepositswapbridgeprivacy_invokenotenote

A note is what the pool gives back: an encrypted record of a balance, readable only by the viewing key that owns it. Steps enter as ordinary calls and their outputs land as notes, so the plan is public and the position is not.

The constraint

Two protocol rules shape everything downstream. Together they mean a private swap needs a swap helper, lending needs another, and swap-then-lend needs a third. Every new interaction is a new Cairo contract — which is why almost everything built on STRK20 so far is a payment app. Payments are the only thing you can ship without writing Cairo.

One invoke per transaction. At most one external call per pool transaction.
Every token's balance must end at exactly zero. No value created or destroyed.

A plan, not a parameter list

fn privacy_invoke(
    ref self: ContractState,
    pool_address: ContractAddress,
    steps: Array<Step>,
    outputs: Array<Output>,
) -> Span<OpenNoteDeposit>

Each step names a target, a selector, calldata, and the approvals it needs. Nothing is whitelisted: any Starknet contract is a valid target and calldata is free-form, which is what makes a bridge call, a DEX route and a lending deposit the same object.

Why free calldata is safe here

Jalin is non-custodial and holds nothing between transactions, so a hostile plan can only harm the notes of whoever wrote it. Safety comes from invariants enforced in Cairo, not from a gatekeeper's list. Each has a test.

  • I1The pool is the only callercloses: Anyone calling the router directly
  • I2No step may target the pool or the routercloses: Reentrancy into the sandwich
  • I3Every approval is reset after its stepcloses: A stale allowance draining the next user
  • I4Zero residue: touched tokens end at zerocloses: Sweeping another user's leftovers
  • I5Each output clears its floorcloses: Slippage and hostile routes
  • I6Steps and calldata are boundedcloses: Griefing the proof budget

141 SDK tests, 408 Playwright tests across six projects on three engines, and 52 Cairo tests, nine of which fork mainnet: seven run the router against Endur's vault, AVNU's exchange, Vesu's lending market and StarkGate's bridge, and two run the deployed STRK20 shadow-account anonymizer, for the positions the router cannot hold. The reasoning behind these six rules is in docs/threat-model.md. None of it has been audited, and that word belongs here rather than only in the footer: these six rules are the whole of the safety argument, and nobody outside this project has checked them.

When not to use Jalin

Private swaps are already live on AVNU through its own anonymizer, and Ekubo is next. For a single swap, use those — they are purpose-built and they will price better than a generic router calling the same pool.

One invoke per transaction means a venue's anonymizer and this router compete for the same slot rather than composing. That every venue has to write its own, and that none of them compose, is the argument for Jalin existing — not a reason to use it for one step.

Deployed

JalinRoutervoyager ↗
0x008498d79ca390b34a6416cc45fb375ad9b921eefd8d4531d99a2d775feb3a7e
JalinGovernorvoyager ↗
0x05bd985e794aee4c12d529ab50a68e5a40c7e28a36642b2b8e2ccdb373346984
—
plans executed, read from the router
—
governance proposals, read from the governor
—
addresses have shielded into the pool

These reads failed when this page was served. Every figure here is a live contract call, so nothing is cached in their place — reload and they come back.

The pool's anonymity figures could not be read when this page was served. They are the least flattering numbers here and they are not being withheld — the scan over the pool's deposit events failed, and it is a live read on every load.

Governance owns every router parameter and is an anonymizer helper itself: ballots arrive through privacy_invoke, so the weight of a vote is public and the voter is not.
Open the composerThe composer names the size of the cell you would land in, before you sign · check the 4 qualifying transactions