Guides

Run a relayer

A relayer pays gas and broadcasts shielded transactions, so nobody has to touch the chain from their own funding wallet. Run one and earn a share of the fee on every spend it submits.

Live · mainnet & testnet
Relaying is built into the CLI from both sides. Hosted network relayers run on both chains — relay.cowlprotocol.com/mainnet and relay.cowlprotocol.com — and any install can serve as one.

1 — Serve

cowl relay serve                 # listen on :4663, 25% margin over gas
cowl relay serve --port 8080 --margin 20

Your wallet becomes the relayer: it signs the submissions and collects the fees. The margin is the percent you charge over raw gas cost, so every relay clears more than it costs to broadcast. Keep the wallet topped up and it is self-sustaining.

2 — Let spenders point at you

Anyone can quote your relayer before they use it, and route a spend through it with --relay:

cowl relay quote http://your-host:4663      # what it charges per spend
cowl unshield 0.1 --relay http://your-host:4663
cowl trade 0.3 USDG --relay http://your-host:4663

The fee is quoted from live gas prices and folded into the spend’s proof next to your address, so redirecting, overcharging, or replaying it simply fails verification.

Censor, not seize
A relayer’s only power is to ignore a transaction. It never holds funds and cannot read amounts or positions. Spenders route around a bad relayer by pointing --relay somewhere else.

Related

  • Gasless relayer — the trust model and how the fee stays inside the proof.
  • Fee structure— where the relayer fee sits among the protocol’s fees.