Logo
Learn
  • Explore Course
Build
  • Explore Buildathon
  • Project Archive
Hack
Hack Coming Soon
  • Explore IRL Hackhouse
  • How to Qualify
  • Past Events

CredStream

CredStream is a decentralized "RealFi" platform that bridges the $530B credit gap for MSMEs. By tokenizing invoices as Real World Assets (RWAs) and collateralizing them against Ondo Finance's USDy

Videos

Description

CredStream: Decentralized Invoice Factoring on Mantle

CredStream is a decentralized "RealFi" platform that bridges the $530B credit gap for MSMEs. By tokenizing invoices as Real World Assets (RWAs) and collateralizing them against Ondo Finance's USDy (Yield-bearing Stablecoin), we provide instant, permissionless liquidity to businesses while offering investors sustainable, institutional-grade yield.


🏗 Architectural Vision

CredStream leverages a Modular Architecture to solve the scalability and privacy issues of traditional factoring:

  1. Execution Layer (Mantle Network): High-throughput, low-fee processing of loan origination and repayment.

  2. Data Layer (IPFS/Pinata): Decentralized, immutable storage for invoice metadata and legal documents, ensuring data availability without clogging the execution layer.

  3. Intelligence Layer (AI Oracles): An AI Agent (OpenAI) analyzes invoice risk off-chain and cryptographically signs approvals, acting as a gatekeeper for the protocol.

  4. Privacy Layer (ZK-Proofs): (Beta) Integration for verifying sensitive tax data (GSTIN) without revealing raw business intelligence.


🚀 Key Features

  • 📄 Invoice-as-an-NFT: Each invoice is minted as a unique ERC-721 token containing the metadata link and loan terms.

  • 🤖 AI Risk Assessment: Automated credit scoring using LLMs. The smart contract validates the AI's cryptographic signature before allowing any minting.

  • 💰 USDy Integration: Collateralized lending using Ondo USDy, allowing the Vault to earn passive yield on idle capital while funding active loans.

  • 🔒 Gatekeeper Pattern: Smart contracts utilize recoverSigner logic to ensure only AI-verified invoices are funded.

  • 📂 Modular Storage: Invoice PDFs are pinned to IPFS, ensuring decentralization and permanence.

  • 🔐 Privacy-First Verification (ZK): We use a Groth16 ZK Proof flow. The user proves they have a valid, tax-compliant invoice locally in their browser, and only submits the proof to the chain.


Deployed Contracts (Mantle Sepolia)

Contract

Address

Description

CredStreamVault

0x18055bA594d4721D3c26D339e4e5db01c78A7d4d

Liquidity pool for USDy & Lending Logic

InvoiceFactory

0xa4BB9d7187bfC1Af0d9FD1E86D1b9910eC1cd9D2

Orchestrates AI verification & Minting

InvoiceNFT

0xe42aA6D6C1917A181BFe7a20D57ea1c7499BC80D

ERC-721 Standard for RWA Invoices

ComplianceModule

0x8E9cbA787DcB63776e590EbEEeA0Aa38135d2596

ZK-Proof Verification Logic

USDy Oracle

0xD3Fc9303d2999e6d9de464Cf36aF39BD6b74E756

Price feed for USDy/USD

Mock USDy

0xe533f14f36C58Ed745248F2A1e148405e484ce74

Yield-bearing stablecoin simulation


🛠 Tech Stack

  • Blockchain: Mantle Network (Sepolia Testnet)

  • Smart Contracts: Solidity, Hardhat

  • Frontend: Next.js 14, Tailwind CSS, Shadcn/UI

  • Web3 Integration: Thirdweb SDK v5

  • Storage: IPFS (via Pinata)

  • AI Engine: OpenAI GPT-3.5 Turbo + Ethers.js (Server-side Signing)


User Flow

For MSMEs (Borrowers)

  1. Upload: User uploads an invoice PDF via the Dashboard.

  2. Analyze: The backend uploads the file to IPFS and sends the text to the AI Agent.

  3. Sign: If the Risk Score > 70, the AI Agent signs the approval with its private key.

  4. Mint: User submits the transaction to Mantle. The InvoiceFactory verifies the signature and mints the RWA NFT.

  5. Get Loan: User calls financeInvoice() on the Vault, transferring the NFT as collateral and receiving USDy.

  6. Repay: When ready, user repays the loan to reclaim their NFT.

For Investors (Liquidity Providers)

  1. Connect: User connects wallet to the Vault page.

  2. Deposit: User approves USDy and deposits it into the pool, receiving LP shares.

  3. Earn: Investors earn a share of the interest paid by MSMEs + the native yield from USDy.

  4. Withdraw: Users can withdraw their share of the pool at any time.

Team Bios Abbas Bhanpura wala - Full Stack Blockchain Developer

Role: Smart Contracts, Frontend Architecture, ZK Integration.

GitHub: @Abbas-Dev-786

Email: abbasbhp787@gmail.com

⚖️ Compliance Declaration Regulated Assets Disclosure: This project utilizes concepts related to Real World Assets (Invoice Factoring).

Current Status: This is a Proof of Concept (PoC) built for the Mantle Hackathon.

Testnet Only: All "USDy" tokens used are Mock Tokens with no real-world value.

Regulation: In a mainnet deployment, this protocol would require integration with a KYC/AML provider (e.g., Ondo Finance's permissioned allowlist) to comply with securities regulations regarding RWA tokenization.

Privacy: We prioritize user privacy using Zero-Knowledge proofs to ensure sensitive business tax data is never exposed on the public ledger.


Built with ❤️ for the Mantle Network Hackathon.

Tech Stack

NextWeb3EthersSolidityThirdwebZKTLSAI Agents

Fundraising Status

N/A

Team Leader
AAbbas Bhanpura Wala
GitHub Link
github

GitHub

https://github.com/Abbas-Dev-786/cred-stream
Product Category
RWADeFiAI