Unlock cash flow from unpaid invoices — instantly, on-chain.
PayVault is a decentralized invoice factoring protocol that lets small and medium businesses tokenize their unpaid invoices and sell them to global liquidity providers at a discount. Built on Soroban smart contracts, PayVault removes banks from the equation and gives African SMEs direct access to working capital.
Small businesses across emerging markets are owed billions in unpaid invoices at any given time. Traditional invoice factoring is slow, expensive, and gatekept by banks that charge 5–15% fees with weeks of processing. For a business in Lagos waiting on payment from a client in Nairobi, this delay can be fatal.
Supplier creates invoice → Invoice is tokenized on-chain → Liquidity providers bid on the invoice
→ Supplier receives discounted payment instantly → Buyer pays the original amount at maturity
→ Liquidity provider earns the spread
- Invoice Submission — A supplier uploads invoice details (amount, due date, buyer info) and mints a tokenized representation on the Soroban contract.
- Risk Assessment — On-chain reputation scores and historical payment data determine a risk tier for the invoice.
- Marketplace Auction — Liquidity providers browse available invoices and place bids, competing on discount rates.
- Instant Settlement — Once a bid is accepted, the supplier receives USDC immediately. The smart contract holds the invoice token until the buyer pays at maturity.
- Maturity & Payout — When the buyer settles, the liquidity provider receives the full invoice amount. The spread between the discounted price and the face value is their profit.
┌─────────────────────────────────────────────────────┐
│ Frontend (Next.js) │
│ Dashboard · Invoice Upload · Marketplace │
└──────────────────────┬──────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Backend API (NestJS) │
│ Auth · Invoice Validation · Risk Engine · KYB │
└──────────────────────┬──────────────────────────────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌────────────┐ ┌─────────┐ ┌──────────────┐
│ Soroban │ │ PostgreSQL│ │ Anchor │
│ Contracts │ │ Database │ │ Integration │
│ │ │ │ │ (On/Off │
│ • Invoice │ │ • Users │ │ Ramp) │
│ Token │ │ • KYB │ │ │
│ • Escrow │ │ • History│ │ │
│ • Auction │ │ │ │ │
│ • Reputation│ │ │ │ │
└────────────┘ └─────────┘ └──────────────┘
| Contract | Purpose |
|---|---|
invoice_token |
Mints a unique token representing each invoice with metadata (amount, due date, buyer, risk tier) |
escrow_vault |
Holds USDC from liquidity providers until invoice maturity or default resolution |
auction_engine |
Manages the bidding process with time-weighted Dutch auction mechanics |
reputation_registry |
Tracks on-chain payment history for buyers and suppliers to compute trust scores |
- Smart Contracts — Rust / Soroban SDK
- Frontend — Next.js 14, TypeScript, Tailwind CSS
- Backend — NestJS, TypeORM, PostgreSQL
- Authentication — JWT with wallet signature verification
- Payments — USDC on Stellar, Anchor protocol for fiat on/off-ramps
- Instant Liquidity — Suppliers get paid in minutes, not weeks
- Competitive Rates — Open marketplace drives discount rates down vs. traditional factoring
- Transparent Risk — On-chain reputation scores visible to all participants
- Multi-Currency Settlement — Accept invoices in local currencies, settle in USDC
- Non-Custodial — Funds are held in smart contracts, not by PayVault
- Compliance Ready — Built-in KYB verification for businesses
- Rust 1.77+ with
wasm32-unknown-unknowntarget - Node.js 20+
- PostgreSQL 15+
- Soroban CLI
# Clone the repository
git clone https://github.com/your-org/payvault.git
cd payvault
# Install contract dependencies
cd contracts
cargo build --target wasm32-unknown-unknown --release
# Install frontend dependencies
cd ../frontend
npm install
# Install backend dependencies
cd ../backend
npm install
# Set up environment variables
cp .env.example .env
# Run database migrations
npm run migration:run
# Start development servers
npm run devDATABASE_URL=postgresql://user:pass@localhost:5432/payvault
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
SOROBAN_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
JWT_SECRET=your-secret-key
ANCHOR_API_URL=https://anchor.example.compayvault/
├── contracts/
│ ├── invoice_token/ # Invoice NFT minting
│ ├── escrow_vault/ # Payment escrow logic
│ ├── auction_engine/ # Bidding mechanics
│ └── reputation_registry/ # Trust score tracking
├── frontend/
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ ├── hooks/ # Custom hooks for contract interaction
│ └── lib/ # Utilities and API clients
├── backend/
│ ├── src/
│ │ ├── modules/ # NestJS feature modules
│ │ ├── entities/ # TypeORM entities
│ │ └── services/ # Business logic
│ └── migrations/ # Database migrations
└── docs/ # Documentation
- Core smart contract architecture
- Invoice tokenization contract
- Escrow and auction contracts
- Frontend dashboard MVP
- Backend API and risk engine
- Testnet deployment
- KYB integration
- Anchor on/off-ramp integration
- Mainnet launch
- Mobile app
We welcome contributions from the community. Please read our CONTRIBUTING.md for guidelines on how to get started.
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'add: your feature description') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
PayVault — Because your invoices shouldn't be IOUs.