All projects

InvoiceGuard

Decentralized credit risk automation for tokenized private debt using Chainlink CRE.

CRE & AI Risk & Compliance

What it is

InvoiceGuard is a decentralized credit risk and liquidation engine for tokenized private debt markets.
Private credit and invoice financing systems rely on static underwriting. Once capital is deployed, risk is rarely reassessed in real time. If a debtor deteriorates, investors remain exposed until manual intervention.
InvoiceGuard eliminates this lag by using Chainlink’s Compute Runtime Environment (CRE) to continuously reassess risk and enforce deterministic liquidation logic on-chain.

The system works as follows:

  1. Invoices are tokenized via a CRE HTTP trigger, which assigns a consensus-verified risk score using off-chain computation.
  2. Investors fund invoices based on that risk-adjusted advance rate.
  3. A CRE CRON trigger continuously reassesses unpaid invoices.
  4. If the risk score crosses a defined threshold (≥ 80), the smart contract automatically transitions the invoice into liquidation state.
  5. Investors can claim their position at a predefined discount, enforced entirely on-chain.

InvoiceGuard is not a marketplace. It is an infrastructure layer that transforms off-chain credit intelligence into deterministic on-chain capital protection using Chainlink CRE.

How it Works

InvoiceGuard consists of three core layers:

  1. Smart Contract Layer (Solidity + Foundry)
  • InvoiceToken.sol
  • Prefix-based onReport() routing:
    • 0x00 → Tokenize invoice
    • 0x01 → Release settlement
    • 0x02 → Update risk score
  • Liquidation threshold enforcement (≥ 80)
  • Basis-point discount logic (15%)
  • Deterministic state transitions
  • Event-driven lifecycle
  1. Chainlink CRE Workflow (TypeScript)

Uses all three trigger types:

  • HTTP Trigger → Tokenizes invoices and assigns risk
  • CRON Trigger → Reassesses unpaid invoices
  • Log Trigger → Processes settlement events

The workflow:

  • Integrates with an external LLM (Gemini API)
  • Uses DON consensus median aggregation
  • Submits authenticated reports to the contract
  • Demonstrates successful simulation via cre workflow simulate
  1. Frontend (React + Vite + Wagmi + Viem)
  • Wallet connection (Sepolia)
  • Invoice dashboard
  • Risk monitoring view
  • Liquidation claim interface
  • Live on-chain reads

Everything runs on Sepolia testnet.

Links

Created by

  • Anubrat Sahoo