Infrastructure

Broadcaster

Self-hosted relayer that submits ZK proofs on behalf of users. Earn B20 gas fees.

What is a Broadcaster?

A self-hosted node that relays transactions for RAIL20 users. Users send proofs to the broadcaster instead of submitting directly — breaks the on-chain link between user and transaction.

Why Use a Broadcaster?

Direct submission leaks metadata: wallet address, IP, timing. A broadcaster breaks this link.

Setup

bash
git clone https://github.com/rail20/backend.git
cd backend
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env  # fill broadcaster key + addresses
python3 -m uvicorn api.main:app --host 0.0.0.0 --port 8900

Docker

bash
docker build -t rail20-broadcaster .
docker run -d -p 8900:8900 --env-file .env rail20-broadcaster

Revenue Model

StreamSourceAmount
Gas markupUser pays B20ETH gas + 1% markup
Protocol shareFeeRouter30% of all protocol fees

Configuration

bash
# .env
BROADCASTER_PRIVATE_KEY=0x...
BERYL_RPC_URL=https://sepolia.base.org
VAULT_ADDRESS=0x...
GAS_MARKUP_BPS=100    # 1% markup

Monitoring

json
{
  "broadcaster": "0xf39F...2266",
  "broadcaster_balance_eth": 0.5,
  "latest_block": 43076585
}