The Operating System for Circular Finance. Digital ledger for multi-asset payments, ESG tokenization, staking mechanisms, and automated settlement.
NovaFin is the Horizontal Enabler responsible for the Capital Layer. While NovaTrade manages the marketplace (matching buyers and sellers), NovaFin manages the ledger (movement of value).
It acts as the Central Bank of the ecosystem. It abstracts the complexity of trading diverse assetsβEuros, Carbon Tons, Biodiversity Credits, and Deposit Tokensβinto a unified, programmable interface compliant with the EU Sustainable Finance Disclosure Regulation (SFDR).
The circular economy requires new types of financial instruments that traditional banks do not support. NovaFin fills this gap:
- Multi-Asset Settlement: Seamlessly settling a transaction where a company pays 70% in Euros and 30% in Carbon Credits.
- Programmatic Escrow: Holding funds for "Deposit Return Schemes" (
NovaPack) or "Performance-Based Contracts" (NovaChem) and releasing them only when IoT data proves the outcome. - Incentive Staking: Allowing actors to stake tokens to prove "Skin in the Game" (e.g., a recycler staking funds to guarantee they won't illegal dump waste).
NovaFin is a double-entry bookkeeping engine wrapped in an API. It relies on the novafin-worker-trade-settlement for high-volume batch processing.
graph TD
User((CFO / User)) -->|HTTPS| UI[NovaFin Wallet]
UI -->|REST| API[NovaFin API]
subgraph "The Ledger Layer"
API -->|Query Balance| DB[(Ledger DB)]
API -->|Freeze Funds| DB
end
subgraph "The Settlement Layer"
Trade[NovaTrade] -->|1. Trade Executed| Worker[Worker-TradeSettlement]
Worker -->|2. Atomic Transfer| DB
end
subgraph "The Asset Layer"
Nature[NovaNature] -->|Mint Bio-Credit| API
Air[NovaAir] -->|Mint Carbon-Credit| API
Pack[NovaPack] -->|Refund Deposit| API
end
- NovaTrade: The trigger. When a trade occurs, NovaTrade sends a "Settlement Request" to NovaFin. NovaFin executes the payment.
- Worker-TradeSettlement: The processor. A dedicated worker that batches thousands of micro-transactions (e.g., bottle returns) into efficient ledger commits.
- NovaPack: The depositor. Tells NovaFin to "Lock β¬0.25" when a bottle is sold and "Unlock β¬0.25" when it is returned.
- NovaNature: The minter. When a forest is verified, NovaNature tells NovaFin to issue 100 "Biodiversity Tokens" to the landowner's wallet.
A single dashboard for all circular assets.
- Balances: Shows EUR, USD, CO2 Tons, and Water Credits side-by-side.
- History: Immutable audit trail of every transfer, linked to the
NovaMaterialPassport ID that generated the value.
Replaces lawyers with code.
- Chemical Leasing:
NovaChemreports "1000 parts cleaned." NovaFin automatically releases payment from the Factory to the Solvent Supplier. - Dispute Resolution: If
NovaQualityflags a shipment as "Contaminated," NovaFin automatically freezes the payment and refunds the buyer.
Financing the transition.
- Allows cities to issue "Green Micro-Bonds" to fund
NovaInfraupgrades (e.g., new recycling centers). - Investors (citizens) buy bonds directly via the wallet and receive interest payouts from the facility's recycling revenue.
The backend for environmental credits.
- Minting: Converting scientific data (from
NovaBalanceorNovaAir) into tradeable financial assets. - Retirement: "Burning" a credit when a company uses it to offset their footprint, ensuring it cannot be sold twice (Double Counting Prevention).
We use DevContainers to provide a consistent development environment.
- Docker Desktop
- VS Code (with Remote Containers extension)
- PostgreSQL (Local container provided)
- Clone the repo:
git clone https://github.com/novaeco-tech/novafin.git cd novafin - Open in VS Code:
- Run
code . - Click "Reopen in Container" when prompted.
- Run
- Start the Enabler:
make dev
- Wallet UI: http://localhost:3000
- Ledger API: http://localhost:8000/docs
# Ledger Settings
BASE_CURRENCY=EUR
ALLOW_NEGATIVE_BALANCE=false
# External Gateways
STRIPE_API_KEY=sk_test_...
BANK_API_ENDPOINT=https://openbanking.api/
# Integrations
NOVATRADE_URL=http://novatrade-api:8000This is a Monorepo containing the enabler's specific logic.
novafin/
βββ api/ # Python/FastAPI (Domain Logic)
β βββ src/
β β βββ ledger/ # Double-entry accounting logic
β β βββ tokens/ # ERC-20 style token logic (Database backed)
β β βββ escrow/ # Smart contract conditions
βββ app/ # React/Next.js Frontend (Wallet UI)
β βββ src/
β β βββ portfolio/ # Asset charts
β β βββ transfer/ # Payment forms
βββ website/ # Documentation (Docusaurus)
βββ tests/ # Integration tests
We use Financial Integrity Testing.
- Accounting Test:
make test-ledger- Simulates 1,000 random transfers between A, B, and C. Asserts that
Sum(Balances)is constant (Zero-Sum Verification).
- Simulates 1,000 random transfers between A, B, and C. Asserts that
- Race Condition Test:
make test-concurrency- Attempts to spend the same β¬100 from two different threads simultaneously. Asserts that only one transaction succeeds.
Security Warning: This repository handles value. Code reviews are strict. All math must use Decimal types (never float) to prevent rounding errors.
See CONTRIBUTING.md for details.
Maintainers: @novaeco-tech/maintainers-enabler-novafin