Claimed
You reveal z
- You get 0zkUSDC in your Railgun note.
- The maker adds z to e and takes the ZEC.
The contract can only pay the note fixed at open.
How it works
Your ZEC stays shielded, your dollars land in Railgun, and nobody, including us, ever holds your money.
Your ZEC goes to a fresh shielded address whose spend key is e + z. The maker holds e. You hold z, made fresh from your seed for each swap.
The Ethereum contract stores only the public points E = e·G and Z = z·G, on the Pallas curve, so it can check a half when one is revealed.
Taking money out of the contract means revealing your half, which hands the other side what it needs to take the ZEC.
The maker offers a price and proves it knows e without showing it. You send back Z, a proof you know z, and the exact Railgun note your dollars must go to.
Before you send anything, the maker calls open(), locking the USDC in the contract under E, Z, two deadlines and your payout note. The contract's source is open, and every swap is public on Etherscan.
The app reads the swap back from Ethereum and only sends ZEC if every term matches.
It goes to the joint address. Neither side can spend it yet.
Once your ZEC has confirmed, the maker calls ready(), giving up its right to cancel. It can only do this before t0.
The app hands your claim to a relayer, and you can close the app. The relayer calls claim(z) through Flashbots Protect, so z stays out of the public mempool until it lands. The contract checks z·G = Z, then payout() shields the USDC into your Railgun note, the only note it can pay. You never need ETH.
Your half z is now public on Ethereum. The maker adds it to e and spends the ZEC. Both sides are paid.
Each one is fair to both sides.
Claimed
The contract can only pay the note fixed at open.
Refunded
The maker can cancel before t0 if it never confirmed, or refund in the day after t1.
The maker can't touch your ZEC without your half of the key. You only reveal that half by claiming, and the contract only pays the note you chose. With no owner or pause switch, nobody can change a swap once it opens.
Two deadlines, t0 and t1, cut every swap into windows, and in each only one side may act. A silent party can never trap the other.
If the maker never confirms
Once the maker confirms
The clock and the swap's stage alone decide who may reveal, so only one half is ever revealed and no reveal can be raced. One held up still lands any time before its window closes, and your claim goes out only with at least 5 minutes of its window left.
The same split key and contract, with the roles swapped.
ready.Until you sign ready, you can take your dollars back. Once you do, the maker has until t1 to take them, and from t1 they're yours to take back again.
Compared with NEAR Intents
Veylor still uses NEAR Intents for other assets. For ZEC and dollars, it uses the bridge.
| Compared on | NEAR Intents | Veylor's bridge |
|---|---|---|
| What Zcash shows | An unshield to a known NEAR deposit address, with the exact amount and time, public for good. | One ordinary shielded transaction. No amount, no destination, no unshield. |
| What the dollar side shows | USDC from a solver soon after, for about the same value. | USDC paid into your Railgun note, inside Railgun's shielded pool. |
| Linking the two legs | Amount and timing make the link. | No shared hash, unlike hash-locked swaps, and nothing visible on the Zcash side. |
| Your funds mid-swap | In someone else's transparent address, where they can be frozen, seized or lost. | Held by nobody. There's nothing to freeze. |
| When something breaks | A support ticket, and the refund may go to a transparent address. | A refund, built in, and if the maker goes quiet you claim without it from t0. |
| Who runs it | An operator. Its bridge issues your deposit address and holds the ZEC until a solver fills the trade. | A contract with no owner, admin key or pause switch. Anyone can be a maker on it. For now the app trades with one. |
| Censorship | The solver or operator can block you. | The maker can refuse to quote you, but can't take a swap's funds. At most it calls one off, which returns your ZEC. |
| What the other side sees | Your deposit, your payout address and your refund address. | The same. The maker sees its own swap, never your other notes. |
Where NEAR Intents is ahead
It's fire-and-forget, while the bridge needs your app open for part of each swap. It also has deeper liquidity, takes any amount, covers many chains, and is mature in production.
Try it
On Android, and in beta on iPhone. The bridge runs on mainnet with real funds, so start small.