Skip to content

Invoice-Liquidity-Network/Invoice-Liquidity-Network

Repository files navigation

Invoice Liquidity Network

CI E2E Nightly License: MIT

Turn unpaid invoices into instant liquidity on-chain, on Stellar.

Invoice Liquidity Network (ILN) is an open-source, decentralised invoice factoring protocol built on Stellar using Soroban smart contracts. Freelancers, creators, and SMEs unlock the value of outstanding invoices immediately, while DeFi liquidity providers earn yield by funding them at a discount.

No banks. No credit checks. No 60-day waits.


Organisation Repositories

Repository Description Language
Invoice-Liquidity-Network 🏠 This repo β€” org overview, shared docs, SDK, CLI, indexer, notifications TypeScript
ILN-Frontend πŸ–₯️ Next.js dApp β€” freelancer dashboard, LP analytics, governance UI TypeScript
ILN-Smart-Contract βš™οΈ Soroban smart contracts β€” invoice lifecycle, multi-token, reputation Rust

How It Works

Freelancer                  ILN Contract              Liquidity Provider
    |                            |                            |
    |--- submit_invoice() ------>|                            |
    |    (amount, payer,         |                            |
    |     due_date, discount)    |                            |
    |                            |<--- fund_invoice() --------|
    |                            |    (sends USDC at          |
    |<-- receives USDC -------   |     discounted amount)     |
    |   (amount - discount)      |                            |
    |                            |                            |
   ...    invoice due date       ...                          |
    |                            |                            |
  Payer --- mark_paid() -------->|                            |
                                 |--- releases full amount -->|
                                      (LP earns the spread)
  1. Submit β€” A freelancer calls submit_invoice() with amount, payer, due date, and discount rate
  2. Fund β€” A liquidity provider calls fund_invoice(), sending USDC. The freelancer receives funds immediately
  3. Pay β€” The payer settles the invoice, releasing the full amount to the LP
  4. Earn β€” The LP earns the discount spread as yield

Stellar Testnet Deployment

Contract Contract ID
ILN-Distribution CAQGPMT3EQK4AABMIR66JJXEOCNCLPTDNXMS5OHZXH4LI24UYAF25V5B
Invoice-Liquidity CCPASLHKRFBMVV5PZG3LKDGKFEDXZMB5U7DK42CVLUVWCMUCSRPVBIMO
ILN-Governance CD7GOIU3GNK7EZHG7XWBC7VI4NRVGMRCU7X2FOCAPQN6EGTSW46BY4EB

Mainnet deployment coming after audit. Do not use with real funds until then.


What's in This Repo

This is the organisation root β€” it contains shared infrastructure used across all ILN sub-projects:

SDK (sdk/)

A typed JavaScript/TypeScript SDK with browser Freighter signing and Node.js keypair support.

npm install @invoice-liquidity/sdk

See sdk/README.md for full API documentation.

CLI (cli/)

A command-line tool for interacting with the ILN contract on testnet and mainnet.

npm install -g @invoice-liquidity/cli
iln submit --payer G... --amount 100 --due 2025-12-31 --rate 300
iln fund --id 1
iln pay --id 1
iln status --id 1

See cli/README.md for setup and usage.

Indexer (indexer/)

A Node.js service that indexes contract events and exposes a REST API for the frontend.

Notifications (notifications/)

A webhook-based notification service for invoice lifecycle events.

See docs/notifications.md for setup.

Scripts (scripts/)

Deployment and development helper scripts.

Script Purpose
scripts/deploy.ts Deploy contract to testnet/mainnet
scripts/fund-wallets.sh Fund testnet wallets via Friendbot
scripts/seed.sh Seed test data
scripts/dev-setup.sh Set up a local dev environment

Repository Structure

.
β”œβ”€β”€ cli/                    # CLI package (@invoice-liquidity/cli)
β”œβ”€β”€ docs/                   # Shared protocol documentation
β”œβ”€β”€ indexer/                # On-chain event indexer service
β”œβ”€β”€ notifications/          # Webhook notification service
β”œβ”€β”€ scripts/                # Deployment & dev scripts
β”œβ”€β”€ sdk/                    # TypeScript SDK (@invoice-liquidity/sdk)
β”œβ”€β”€ tests/                  # E2E integration tests
β”œβ”€β”€ .github/workflows/      # CI/CD pipelines
β”œβ”€β”€ docker-compose.yml      # Local dev environment
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE
└── README.md               # You are here

Frontend and Smart Contract source code lives in their own dedicated repositories (linked above as git submodules).


Getting Started (Local Dev)

Prerequisites

Clone with Submodules

git clone --recurse-submodules https://github.com/Invoice-Liquidity-Network/Invoice-Liquidity-Network.git
cd Invoice-Liquidity-Network

# Or if already cloned:
git submodule update --init --recursive

Start Local Environment

docker-compose up -d          # Start local Stellar node
npm run test:e2e              # Run E2E integration tests

Roadmap

  • Core Soroban contract (submit, fund, mark_paid)
  • Testnet deployment
  • Frontend dApp for freelancers
  • LP dashboard with yield analytics
  • TypeScript SDK + CLI
  • Multi-token support (USDC, EURC, XLM)
  • Off-chain payer verification oracle
  • Formal security audit
  • Mainnet deployment
  • DAO governance for protocol parameters

Documentation

Doc Description
docs/index.md Protocol overview
docs/governance.md Governance guide
docs/multi-token.md Multi-token support
docs/notifications.md Notification system
docs/local-development.md Local dev setup
CONTRIBUTING.md How to contribute
SECURITY.md Security policy

Contributing

We welcome contributions of all kinds β€” smart contract improvements, documentation, frontend, tests, and research.

See CONTRIBUTING.md for the full process.


License

MIT β€” see LICENSE


Built on Stellar

Built on Stellar and Soroban.

This project is not affiliated with Stellar Development Foundation.

Releases

No releases published

Packages

 
 
 

Contributors