Paid before payday.
Turkish small businesses wait 60β120 days to get paid on their invoices. FaturaFi turns those invoices into real Solana NFTs, scores them with explainable AI, and connects them to global liquidity β so business owners get paid in seconds instead of months.
View the Solana program Β· Built for Colosseum Frontier 2026 β Superteam TΓΌrkiye
Every small business in TΓΌrkiye knows this story:
You ship goods or deliver a service. The buyer is reliable. The invoice gets accepted. And then you wait β 60 days, 90 days, sometimes 120 days β to actually get paid.
During that wait, you still have to pay your suppliers, your rent, and your employees. From a bank balance that's already shrinking.
The numbers behind this:
- 3.5 million small businesses operate in TΓΌrkiye
- They produce 56% of the country's GDP and employ 73% of the workforce
- At any given moment, βΊ2.3 trillion is trapped in unpaid invoices
- This cash-flow gap is the single biggest reason these businesses fail
Why existing solutions don't work for most of them:
| Option | The problem |
|---|---|
| Bank factoring | Requires collateral and credit history. Takes 3β5 days. Effective rates of 20β35% per year. |
| Credit cards | Limits are far too low for typical B2B invoice amounts. |
| Informal lenders | Predatory rates, no structure, no legal protection. |
| Doing nothing | The most common choice. Also the most common cause of failure. |
FaturaFi tokenizes unpaid invoices as Solana NFTs that anyone can fund with SOL.
Here's the flow, in five steps:
-
A business lists an invoice. They open the dApp, connect Phantom, and enter the invoice details: buyer name, amount, payment term, business history.
-
The AI scores it instantly. An XGBoost model trained on Turkish factoring market data returns a risk score (0β100), a letter grade (A through E), and a suggested discount rate. The whole thing takes under 2 seconds. The model also returns SHAP explanations β so the investor can see exactly which factors drove the score.
-
A real NFT mints on Solana. Phantom signs the transaction; an SPL Token NFT (decimals=0, supply=1) is minted on Solana devnet representing this specific receivable. Every mint produces a real transaction signature visible on Solana Explorer.
-
An investor funds the invoice. They browse the marketplace, filter by sector or risk grade, and fund it. The business owner gets discounted SOL in their wallet in about 400 milliseconds.
-
The buyer pays at maturity. When the original buyer pays the face value, the full amount goes to whoever holds the NFT. The investor's profit is the spread.
This isn't a "we picked Solana because it's popular" thing. The product is economically impossible on most other chains. Here's why:
| Requirement | Why we need it | Solana delivers |
|---|---|---|
| Per-transaction cost under 0.01% of invoice value | A 0.5 SOL invoice can't afford $5 in gas | ~$0.00025 |
| Settlement in seconds, not minutes | Business owners need cash now, not after 12 minutes of confirmations | ~400ms finality |
| Throughput at SME scale | 3.5M businesses Γ 12 invoices/year = 42M transactions/year minimum | 65,000 TPS |
| Native NFT primitives | Each invoice needs to be a transferable, unique on-chain asset | SPL Token with decimals=0 |
On Ethereum L1, gas fees would eat the entire investor spread. On most L2s, finality slows down during congestion β which is exactly when small businesses need their money the fastest. Solana is the only network where the numbers actually work.
βββββββββββββββββββββββ βββββββββββββββββββββββ
β Next.js frontend β βββββββΊ β FastAPI backend β
β + Phantom wallet β HTTPS β XGBoost + SHAP β
β hosted on Vercel β β hosted on Railway β
ββββββββββββ¬βββββββββββ ββββββββββββ¬βββββββββββ
β β
β Solana RPC β SQLite
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββ
β Solana devnet β β invoices table β
β β β risk drivers β
β β’ SPL Token mint β β portfolios β
β (NFT per inv.) β βββββββββββββββββββββββ
β β
β Anchor program β
β (deployed, for β
β full settlement β
β roadmap Q3 2026) β
βββββββββββββββββββββββ
faturafi/
βββ program/ Anchor program (Rust) β the on-chain protocol
β βββ programs/faturafi/src/lib.rs
β βββ tests/faturafi.ts
βββ backend/ FastAPI service (Python) β risk scoring + DB
β βββ ml/ XGBoost training pipeline
β βββ app/ API routes
βββ frontend/ Next.js 14 (TypeScript) β UI + Solana wallet
β βββ src/app/ Routes (marketplace, list, portfolio, invoice/[id])
β βββ src/components/ Header, InvoiceCard, FaturaFiLogo (custom SVG)
β βββ src/lib/solana/ Real SPL Token NFT minting helper
βββ docs/ Notes, X posts, additional docs
βββ scripts/ One-command setup script
The heart of FaturaFi is a real, trained machine learning model β not a chatbot wrapper.
| Property | Value |
|---|---|
| Algorithm | XGBoost (gradient-boosted trees) |
| Training data | 10,000 synthetic invoices calibrated to real Turkish factoring patterns |
| Features used | 22 (sector, buyer size, macroeconomic conditions, payment history, term length, amounts) |
| Test AUC | 0.72 |
| Brier score | 0.17 |
| Explainability | SHAP values per prediction, hashed and committed on-chain |
Based on actual feature importance from the trained model:
- Who the buyer is. An enterprise-level buyer (think Migros, LC Waikiki) is far safer than a micro-business buyer. This single factor matters more than anything else.
- What sector the business is in. Construction and agriculture carry higher historical default rates. Services and food businesses are safer.
- The macroeconomic environment. During currency shocks, default rates roughly double across the board.
- How long the payment term is. A 120-day invoice carries materially more risk than a 30-day one.
- The business's track record. A history of on-time payment significantly reduces risk, even for newer businesses.
Every invoice in the marketplace has a "Why this score?" button. Click it and you see the actual SHAP drivers behind that specific number β not a black box.
The Anchor program is deployed and live on Solana devnet:
CoM9J1UygQFBNwTbhK1AwT8vymCKL7dPM7KW76drNF36
View it on Solana Explorer β
| Instruction | Who calls it | What it does |
|---|---|---|
initialize |
Protocol authority (once) | Sets up the treasury and fee config |
list_invoice |
The business | Creates an Invoice account + mints a unique NFT for it |
fund_invoice |
The investor | Transfers discounted USDC to the business, takes a small protocol fee, marks the NFT as funded |
settle_invoice |
The buyer | Transfers the face value to the current NFT holder |
mark_defaulted |
Anyone (after a 7-day grace period) | Marks an invoice as defaulted, unlocking the recovery flow |
The program uses three PDAs (Program Derived Addresses):
["config"]β global protocol config["invoice", invoice_id]β state for each individual invoice["invoice_nft", invoice_id]β the NFT mint for each invoice
Every state change emits an on-chain event, so indexers or webhooks can power real-time dashboards.
For the current hackathon MVP, the frontend mints invoice NFTs through SPL Token directly instead of through the Anchor program. This is a deliberate scoping decision:
- The Anchor program is deployed and verifiable on-chain
- Direct SPL minting lets users see a real on-chain NFT in their Phantom wallet within seconds, with no protocol initialization, no USDC mint setup, no devnet token faucet
- Full Anchor integration (fund/settle/default through PDAs, escrow logic) is the Q3 2026 roadmap item once the pilot moves to mainnet
This gives the demo real on-chain proof today, while keeping the protocol's full lifecycle ready for the production phase.
You'll need:
- Node.js 20 or later
- Python 3.11 or later
- Rust + Solana CLI (install guide)
- Anchor 0.30.1 (
avm install 0.30.1 && avm use 0.30.1) - A Phantom wallet set to Devnet (Settings β Developer Settings β Testnet Mode β ON)
- A little devnet SOL β get some at faucet.solana.com
git clone https://github.com/mertcano/Fatura_Fi
cd Fatura_Fi
./scripts/setup.shThe setup script installs all dependencies, generates the synthetic training data, and trains the model. Takes about 5 minutes total.
You'll need three terminal windows:
# Terminal 1 β the backend
cd backend && source venv/bin/activate
uvicorn app.main:app --reload
# Terminal 2 β the frontend
cd frontend
npm run dev
# Terminal 3 β Anchor (only the first time)
cd program
anchor build --no-idl && anchor deploy --provider.cluster devnetThen open http://localhost:3000, connect your Phantom wallet (make sure it's on Devnet), and on the marketplace page click Load demo invoices to seed some data.
For step-by-step deployment instructions, see DEPLOY.md.
- β Live on-chain NFT minting β every listed invoice produces a real Solana NFT signed by the user's Phantom wallet
- β Live AI risk scoring with sub-second response times
- β SHAP-based explanations for every score
- β Next.js 14 frontend with Phantom and Solflare wallet support
- β Filterable marketplace (by sector, risk grade, amount)
- β SME invoice submission form with all 22 model inputs
- β Portfolio dashboard with two views: Investments and My listings (open / funded / settled)
- β FastAPI backend with database persistence
- β Anchor program covering the full invoice lifecycle, deployed on devnet
- β End-to-end TypeScript integration tests for the program
- β Production frontend on Vercel + backend on Railway
- β Earth + Mint design system with custom SVG logo and Geist typography
Q3 2026 β A pilot with 5 Turkish SMEs (we have early conversations going with textile workshops in Bursa and electronics suppliers in Konya) and 2 family-office investors. The synthetic training data gets replaced with real anonymized invoice data. The frontend migrates from direct SPL minting to full Anchor program integration with USDC escrow.
Q4 2026 β A KVKK (Turkish GDPR) compliance audit. Pyth oracle integration for live TRY/USD pricing. A buyer verification flow using e-signature attestations recorded on-chain.
Q1 2027 β Tranching: pooling similar-risk invoices into senior and junior tranches so institutional capital can participate at the risk level they want.
Q2 2027 β Expanding the protocol to other emerging markets with similar SME cash-flow problems β Brazil, Indonesia, Egypt.
| Layer | Technology |
|---|---|
| On-chain | Solana, Anchor 0.30.1, SPL Token (@solana/spl-token) |
| Risk model | XGBoost, scikit-learn, SHAP via XGBoost's pred_contribs |
| Backend | FastAPI, SQLAlchemy, Pydantic, SQLite |
| Frontend | Next.js 14 (App Router), TypeScript, Tailwind CSS, Geist font |
| Wallets | @solana/wallet-adapter (Phantom + Solflare) |
| Deployment | Vercel (frontend), Railway (backend), Solana devnet (program) |
MIT β see LICENSE. Use it, fork it, build on it.
Built for Colosseum Frontier 2026 Β· Superteam TΓΌrkiye Track
Paid before payday.