SecFall EN FR

Ce site existe aussi en français.

Lire en français →

← Back to all work

case study

AYZE

A lending market where you can see who pays when a loan goes bad.

The brief

Small businesses need short-term credit fast, without putting up collateral. Lenders will provide it, but only if they can see who carries the risk when a loan goes bad.

AYZE is a lending marketplace on the XRP Ledger built around that question. A broker runs a vault and puts in their own money first. Lenders fund the vault. Borrowers draw fixed loans from it. And for each loan, an accredited protection seller can guarantee part of every instalment, and is paid a share of the interest for taking that risk.

The approach

Everything uses the ledger’s own lending features, in native XRP: the vault, the broker, the loans, the credentials and the escrows. Who may borrow, and who may guarantee a loan, is an on-ledger credential: a borrower holds one from AYZE and one from the vault’s broker; a protection seller holds one from the broker.

A servicing loop collects each instalment when it’s due, splits the interest between the protection seller, the broker and the lenders, and hands that instalment’s escrow back to the seller. If an instalment is too late, the loan is declared in default and the broker claims the escrows still locked.

We ran the whole path, default included, end to end on the hackathon’s test network with a script, and kept the link to every transaction.

What holds

  • Every amount is read from the ledger, never from our own records.
  • Credentials are checked on the ledger before AYZE signs anything for a borrower or a protection seller.
  • The full path, including a default and the escrow claim, ran end to end on the test network.

What doesn’t, yet

From our own notes. It was built for a hackathon, on a test network.

  1. The credentials are enforced by our app, not by the ledger. The vault is public and the ledger’s loan transaction doesn’t check them, so going around the app would skip them. The ledger can enforce this, but it would also lock out every lender, and we couldn’t confirm it worked on the test network.
  2. The broker’s and borrower’s keys are held by the server, because every loan needs the broker’s co-signature and instalments are collected automatically. That’s a lot of trust in one place.
  3. Our own records are a single file with no real protection against two writes at once. Amounts never come from it, but it wouldn’t survive real traffic.
  4. On very short test loans, the grace period before a default can end up shorter than intended, because the ledger clamps it.

How a loan plays out

A loan’s life in AYZE, from the vault opening to repayment or default brokerlendersvaultborrowerprotection sellerescrow own money firstdepositsa fixed loanlocks part of each instalmentinterest, split three waysreleasedclaimed verified
Play it, or jump to an ending. Each step is drawn as it happens.

Built with

Ledger
XRP Ledger lending: vaults, loan brokers, loans, credentials, escrow
App
Next.js, React, xrpl.js
Wallets
Crossmark, GemWallet
Runs in
Docker