Documentation

LiquiFact docs

LiquiFact is an invoice liquidity network on Stellar. Small and medium enterprises (SMEs) list unpaid invoices; investors fund them; a Soroban escrow contract holds the money until the debtor pays, then releases principal plus yield to investors.

For SMEs

Unlock cash tied up in 30–90 day payment terms without taking on debt.

For investors

Short-duration, real-economy yield with on-chain transparency.

For partners

Originate invoices through the REST API and settle on Stellar.

Architecture

The stack has three parts, each in its own repository:

  • Frontend (repo) — marketplace, invoice detail, submission flow and these docs. Talks to the API over HTTPS.
  • Backend API (repo) — REST endpoints for invoices and stats, OpenAPI docs, and a live read of the escrow contract through Soroban RPC. Base URL: https://liquifact-backend.vercel.app.
  • Escrow contract (repo) — a Soroban smart contract per invoice that holds investor funds, enforces caps, holds and maturity, and pays out on settlement.

How to use

As an SME

  1. Open Submit invoice and enter your company, the debtor, amount, currency, due date and the yield you offer.
  2. Your invoice appears in the Marketplace with status open.
  3. When investors reach the funding target the status becomes funded and you can withdraw liquidity from the escrow.
  4. At maturity the debtor pays; the escrow is settled and investors are repaid.

As an investor

  1. Browse the Marketplace and filter by status.
  2. Open an invoice to review face value, yield, due date and funding progress.
  3. Enter an amount and choose Fund invoice. On-chain, this maps to the escrow's fund entrypoint.
  4. After settlement, claim your payout (claim_investor_payout).
This public deployment runs in demo mode on Stellar testnet: invoice data lives in the API's in-memory store, while invoice INV_0001 is backed by the real escrow contract below.

Invoice lifecycle

StatusCodeMeaning
open0Accepting investor contributions.
funded1Target reached; SME may withdraw.
settled2Debtor paid; investors can claim principal + yield.
withdrawn / cancelled3 / 4Terminal states.

API

Interactive reference (Swagger UI): https://liquifact-backend.vercel.app/docs · OpenAPI document: /openapi.json

MethodPathDescription
GET/healthLiveness probe
GET/api/statsMarketplace totals
GET/api/invoicesList invoices (?status=open|funded|settled|cancelled)
GET/api/invoices/:idGet one invoice
POST/api/invoicesSubmit an invoice
POST/api/invoices/:id/fundRecord an investor contribution
GET/api/escrowEscrow contract metadata
GET/api/escrow/liveLive escrow state via Soroban RPC
curl https://liquifact-backend.vercel.app/api/invoices?status=open

curl -X POST https://liquifact-backend.vercel.app/api/invoices \
  -H 'Content-Type: application/json' \
  -d '{"sme":"Acme","debtor":"Globex","amount":5000,"dueDate":"2027-01-31","yieldBps":750}'

Smart contract

The escrow is deployed on Stellar testnet as CDQCKR2YU6IVQ4GYPBMXBPZ4FGFQB5H25AI7ZSETHS2CZ5ZRCWQDSO6P.

Soroban escrow · testnet

Deployed escrow contract

Investor funds are held by this contract until the invoice settles.

CDQCKR2YU6IVQ4GYPBMXBPZ4FGFQB5H25AI7ZSETHS2CZ5ZRCWQDSO6P
EntrypointPurpose
initAdmin creates the escrow for one invoice: SME, amount, yield, maturity, funding token, treasury.
fundInvestor deposits funding tokens; status moves to funded (1) when the target is reached.
withdrawSME withdraws the funded liquidity once the escrow is funded.
settleMarks the invoice settled (2) after the debtor pays.
claim_investor_payoutInvestors claim principal plus yield after settlement and maturity.
set_legal_hold / clear_legal_holdCompliance freeze that blocks risky transitions.
get_escrowRead the full escrow state (used by the API's live endpoint).
stellar contract invoke --id CDQCKR2YU6IVQ4GYPBMXBPZ4FGFQB5H25AI7ZSETHS2CZ5ZRCWQDSO6P \
  --network testnet --source <your-key> --send=no -- get_escrow

Run locally

git clone https://github.com/Liquifact/Liquifact-frontend
cd Liquifact-frontend
npm ci
NEXT_PUBLIC_API_URL=http://localhost:3001 npm run dev

Environment variables (all optional): NEXT_PUBLIC_API_URL, NEXT_PUBLIC_CONTRACT_ID, NEXT_PUBLIC_STELLAR_NETWORK.