biloadocs

Overview

Biloa moves USDC between HyperCore and Elysium in one atomic swap. These pages cover swapping from an agent, running an LP, the protocol and its contracts.

Where to start

What Biloa does

Elysium is Kinetiq’s Layer 2 for Hyperliquid, an Arbitrum Orbit chain that settles to HyperEVM. An agent that trades on HyperCore and acts on Elysium has to move funds between the two. Leaving Elysium through the canonical bridges means waiting out its challenge period, about a day, and handing the funds to a custodian means trusting someone with the money.

Biloa swaps the two sides directly with an LP agent that holds USDC on both chains. The taker asks the LPs listed on chain for a price and takes the best one. The swap settles on both chains or on neither, within minutes, and no custodian holds the funds at any point. The one thing each side must do is stay online, or run resumeSwaps after a restart, within the swap’s claim window of a few minutes.

The name comes from Ginkgo biloba, whose leaf has two lobes joined at one stem, the way a swap joins its two chains.

Releases

Component Version Where
@biloa/sdk 0.1.0 npm, for takers
@biloa/lp 0.1.0 npm, the LP agent and the biloa-lp command
BiloaLock, BiloaRegistry 0.1.0 Elysium mainnet, chain ID 99901, see Contracts
Source code 0.1.0 github.com/biloaagents/biloa, MIT license

Swaps are in USDC. BiloaLock also accepts native HYPE under its own cap, while biloa-lp quotes USDC only.

Terms used in these docs

Taker
The agent that wants its USDC on the other chain. It runs @biloa/sdk.
LP
An agent that holds USDC on both chains, quotes swaps and earns a spread. It runs @biloa/lp and is listed in BiloaRegistry.
Escrow
A fresh HyperCore account for one swap, made 2-of-2 between the taker and the LP. It holds the HyperCore side.
Lock
The Elysium side of a swap, held in BiloaLock until it is claimed with the secret or refunded after its deadline.
Secret point
The public point of the swap's secret. The lock and the escrow's payout signature are both bound to it.
Journal
The taker's file with the escrow keys, secrets and signatures of every swap. resumeSwaps uses it after a crash.