AEGIS — Hackathon Submission
Live demo: https://github.com/WaverAndrew/Aegis-B-BHack
Inspiration
High-risk shipping corridors, such as the Strait of Hormuz or routes through conflict zones, make trade insurance expensive or simply unavailable for many small and medium exporters. Traditional underwriters are slow, opaque, and often exclude the very businesses that need coverage most. We wanted to put parametric voyage insurance on-chain so it is transparent, instant, and accessible. The XRP Ledger’s low fees, fast finality, and native support for issued currencies, NFTs, and escrows made it the right place to build a single vault that pools liquidity, sells coverage, and can fund SME credit in one stack.
What it does
AEGIS is a parametric insurance vault on the XRP Ledger Testnet.
Liquidity providers deposit RLUSD into the vault and receive vRLUSD share tokens. They earn yield from coverage premiums and optionally from short-term RLUSD loans.
Shipowners and exporters select a vessel or voyage, get an instant quote such as a 2 percent premium, pay in RLUSD on XRPL, and receive a coverage NFT in their wallet. If an incident occurs, an oracle triggers a parametric payout in RLUSD from the vault. If no incident occurs, the NFT is burned and any escrowed XRP returns to the vault.
An oracle or admin resolves voyages as incident or no incident, which drives payouts and NFT burn or escrow resolution.
The app includes a coverage marketplace with live vessels and routes such as Hormuz to Mumbai and Bandar Abbas to Fujairah. It also integrates Polymarket for the live probability of safe passage. Everything runs on XRPL including issued currencies RLUSD and vRLUSD, trust lines, XLS-20 NFTs for policies, and escrows.
How we built it
Frontend: Next.js powers the landing page, LP dashboard for deposit and withdrawal with vault metrics, the exporter flow for selecting a voyage, quoting and binding coverage, and the admin or oracle interface for marking incident or no incident. It also includes map-based vessel selection and a coverage marketplace.
Backend: Node.js with TypeScript using an Express REST API. XRPL integration uses xrpl.js for payments, vault mint and burn, trust lines, NFT mint and burn with XLS-20, and EscrowCreate, EscrowFinish, and EscrowCancel. SQLite stores voyages, policies, loans, and vault state.
XRPL Testnet: Custom setup scripts create and fund the RLUSD issuer, vault account, and coverage NFT issuer. All flows use real XRPL transactions including Payments, NFTokenMint, NFTokenBurn, EscrowCreate, EscrowFinish, and EscrowCancel with submitAndWait and validated ledger queries.
Deployment: The frontend runs on Vercel and the backend is configurable for Railway or a similar platform.
Challenges we ran into
Trust lines and reserves: Every new currency and NFT interaction on XRPL has reserve implications. We had to carefully sequence onboarding so the user funds their wallet, sets trust lines, and then deposits or mints. The UX needed to clearly guide users so they do not encounter missing trust line or reserve errors during the flow.
Escrow timing: Parametric coverage ties escrow FinishAfter and CancelAfter conditions to voyage end dates. We had to align backend voyage dates, escrow creation, and oracle resolution so that EscrowFinish versus EscrowCancel is unambiguous and efficient.
Partial payments: XRPL allows partial payments. We consistently read meta.delivered_amount when processing incoming payments so we never over-credit the vault or a user.
Oracle design: We aimed to keep the oracle simple with an admin marking incident or no incident while keeping the process auditable and compatible with a future multisig or on-chain data source.
Accomplishments we are proud of
Full XRPL integration: A single vault that uses issued currencies RLUSD and vRLUSD, trust lines, XLS-20 NFTs for policies, and native escrows, all with real Testnet transactions and validated ledger reads.
End to end flows: Liquidity providers can deposit and withdraw. Exporters can request a quote, bind coverage, and receive a coverage NFT. The oracle can resolve voyages and trigger payouts or escrow resolution. The entire loop runs on Testnet.
Clear UX: The platform includes an LP dashboard, map-based vessel selection, a coverage marketplace with vessel status such as insured or needs coverage, and a live premium display.
Polymarket integration: Showing the live probability of safe passage for key straits adds real world context to the parametric product.
What we learned
XRPL’s combination of issued currencies, NFTs, and escrows works well for parametric insurance. Policies can exist as NFTs, premiums and payouts can use a stablecoin, and escrow can hold collateral or time lock premiums.
Parametric design with a binary outcome such as incident or no incident simplifies claims and fits naturally with oracle resolution and escrow conditions.
A single vault handling both liquidity and underwriting creates clear incentive alignment. Liquidity providers earn from premiums and loans while the same capital supports coverage and credit.
What’s next for Aegis
Mainnet readiness: Move from Testnet to XRPL Mainnet with a production RLUSD or similar issuer and real capital. Add multisig or decentralized oracle resolution.
More corridors and triggers: Expand the vessel and voyage catalog and support additional parametric triggers such as weather events, port delays, and new regions.
SME credit flow: Fully integrate loan disbursement and repayment so liquidity providers earn from both premiums and interest.
Better UX: Add wallet connections such as xrpl-connect, enable one click trust line setup, and improve onboarding for new XRPL users.
Compliance and legal: Work with insurers or reinsurers on structure and licensing so Aegis can offer real coverage in regulated markets.
Log in or sign up for Devpost to join the conversation.