Autonomous, real-time, revenue-based credit on Rialo.
A business connects a revenue source and receives a live credit line. The on-chain program reads that revenue itself, sizes the limit, screens for compliance, and keeps the line in sync as revenue changes. There is no oracle to babysit, no keeper bot, and no back office. Underwriting, monitoring, draws, repayments, and freezes all happen inside one program on Rialo.
Most chains cannot see the outside world. A credit product on them needs an off-chain oracle to push revenue data in and a keeper to trigger the next step. Both are trusted middlemen, and both are where these systems break.
Rialo removes the middlemen:
- Native web calls (REX). The program fetches a revenue API over HTTPS from inside the chain. Validators perform the call in a TEE, so the result is verifiable and the API key never touches the chain.
- Reactive transactions. When a REX result returns, it triggers the next step of the workflow automatically. The revenue check chains directly into a sanctions screen with no external scheduler.
- Confidential execution. Sensitive inputs are encrypted to the REX program, so underwriting can use private data without exposing it on-chain.
The result is a credit engine that is fully autonomous: the program is the oracle, the keeper, and the ledger at once.
- Originate. A borrower opens a line. The program issues a REX call to the revenue endpoint.
- Underwrite (REX #1). Validators fetch trailing monthly revenue. The limit is set to a configured share of that revenue. A fraud flag freezes the line.
- Comply (REX #2). Approval chains into a second REX call that screens sanctions. A
hit freezes the line with reason
sanctioned. - Use. The borrower draws and repays natively against the limit. Re-running underwriting resizes the limit as revenue grows, preserving the drawn balance.
Every result is written to the borrower's CreditLine account (a PDA), which the
dashboard decodes live.
Everything below is real and deployed on Rialo devnet. Nothing in the dashboard is mocked; every value is decoded from these accounts on each request.
| Item | Address |
|---|---|
| Program | 6ctqATQJNqNnPUopim57bErJnHxxr4CHwxsHCoHDdvRA |
| Credit line A (active) | 6RJ4qMBvyqtMdNBgC4TqnN1HZknmcQW5KF5Y1PkFottK |
| Credit line B (frozen, sanctioned) | 8qKKAMovdFAQav3pYonsMFr9xSozP83ANRxNTyGJzALs |
| RPC | http://devnet.rialo.io:4100 |
Read a line account directly from the network:
curl -s http://devnet.rialo.io:4100 \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":[{"version":0,"address":"6RJ4qMBvyqtMdNBgC4TqnN1HZknmcQW5KF5Y1PkFottK","config":{}}]}'The CreditLine layout (little-endian): [0:32] borrower, [32:40] advance bps,
[40:48] credit limit, [48:56] drawn, [56:64] last revenue, [64] status
(0 pending, 1 active, 2 frozen), [65] reason (1 fraud, 2 sanctioned).
program/- the on-chain program, written in Rialo's Venus DSL.originateissues the REX revenue call and chains into the sanctions screen; native instructions (init_line,draw,repay) operate on the per-borrowerCreditLinePDA.frontend/- the live dashboard (React + Vite). Reads decoded portfolio state and lets a borrower connect with email (Privy embedded Ed25519 wallet) to airdrop, create a line, run underwriting, draw, and repay with their own signature.landing/- the marketing site (Astro).server/- a zero-dependency Node server that decodes on-chain state for the portfolio API and proxies signed transactions to the RPC.cloudflare/- Pages Functions for the production deploy: the same on-chain reader plus a revenue oracle backed by real Stripe data.invoke-test/,client/,generated-client/- Rust clients and the generated ABI client used to deploy and exercise the program.
Rialo Venus DSL and rialo-s-program (on-chain), @rialo/ts-cdk and
@rialo/wallet-standard (browser signing), Privy (email to embedded wallet), React,
Vite, Astro, Node, and Cloudflare Pages.
# dashboard
cd frontend && npm install && npm run build
# landing
cd landing && npm install && npm run build
# serve both + the on-chain API
node server/server.mjsThe program is built and deployed with the Rialo toolchain; see program/README.md.
The landing page, dashboard, and the Stripe-backed revenue oracle deploy to Cloudflare
Pages. See cloudflare/README.md for the exact build settings, the Pages Functions, and
the secret handling for the revenue API key.
- No private keys,
.envfiles, or API keys are committed. Revenue API keys live as Cloudflare Pages secrets and are read only inside the REX call. - Borrower draws and repays are signed client-side by the borrower's own wallet.
- The program enforces ownership: a draw only succeeds for the account that owns the line.