
How to Build with BaaS
The first workshop of the Cross-Chain Summer Hackathon, organised by Chainflip with THORChain and Maya Protocol. DoraHacks hosted it and streamed it live on YouTube and Binance Live. In 51 minutes I showed hackathon builders how to put native cross-chain swaps into their own product with Broker as a Service, without running a Chainflip broker themselves. The recording is on YouTube.
Why a broker, and why not run one. Chainflip swaps native assets across chains, at the time Bitcoin, Ethereum, Arbitrum and Polkadot, without wrapped tokens, and its just-in-time liquidity keeps slippage low. To offer those swaps in your own product you become a broker, which also lets you set your own commission on every swap. Running a broker means running a Chainflip node and the broker API next to it, ideally two of each behind load balancers and DDoS protection, and keeping up with every release. I told it through two builders: Alberto, whose mobile swap app only covered EVM chains and who had no time for Linux servers, and Marco, who runs an aggregator and wants better prices for his users but has no time to maintain more infrastructure.
Registering, step by step. On Chainflip’s Perseverance testnet, with Sepolia for the Ethereum side, we went through registration: create an account in the Polkadot.js wallet, fund it with five FLIP through the State Chain Gateway contract from MetaMask, give the account the broker role, and register it with BaaS with a name, an e-mail address and a commission in basis points, where 15 basis points means 0.15% on every swap. Registration returns an API key for the integration and an admin key to change the commission and withdraw earnings. The wallet extension didn’t show up in the screen share, so this part ran from the backup slides I’d made of every step.
Then it’s just HTTP. The rest of the demo ran in Postman against the API: the list of supported assets with their minimum amounts and decimals, the broker’s balance and earned fees, and a quote for 20 FLIP to USDC on Arbitrum with its fees and expected duration. The swap call opens a deposit channel, valid for 24 hours, and returns the deposit address, a swap ID and an explorer link. I sent 20 FLIP to it from MetaMask and we followed the swap until the validators broadcast the payout, through the status endpoint that tracks each stage and flags an expired channel, and then saw the commission show up in the fees endpoint.
What a builder gets. No backend is needed: the API key can only start swaps that earn its owner a commission, so it’s safe to ship in a browser, even in a static HTML page. It’s non-custodial: funds go from the user’s wallet straight into Chainflip, and commissions stay in your own account. Your minimum commission is enforced on the server, so a caller can raise it for a given user but never lower it. And teams already built on the Chainflip SDK can switch by pointing it at BaaS, one line of configuration.
What to build. In the questions afterwards I walked through the hackathon’s three tracks: building on the Chainflip SDK, for example swaps that call a smart contract or hand off to another DEX; combining Chainflip with THORChain and Maya; and anything else on Chainflip, from dashboards to liquidity provisioning front ends. At the time four brokers already ran in production on BaaS.
And the hackathon. I also entered the hackathon myself, and my Stablecoin Liquidity Provisioning Bot won first place in the Chainflip General Track.
Technologies: Chainflip (broker API, State Chain, deposit channels), Broker as a Service, REST APIs, Postman, Polkadot.js, MetaMask, Ethereum Sepolia, Chainflip Perseverance testnet.
Given at
- June 27, 2024: Cross-Chain Summer Hackathon, online, streamed on YouTube and Binance Live
Files
- Slides (PDF) (8.1 MB)
You May Also Like

Monitoring Before the Fire
Uptime Kuma on its own instance, a probe catalog derived from config instead of memory, and alerts that found me before my family did.

Self-Hosting Young Software: Tududi
A task manager whose pinned tag vanished, whose documented SSO didn't exist yet, and what deploying early-stage software really costs.

The Repo Now Lives on the Server It Builds
Forgejo on the platform: migrating this project into itself, CI on a RAM budget, and a major upgrade gated on a bit-for-bit restore.



