Turning invoices into yield generating vaults with cross chain DeFi access via 1inch Fusion+.
Vaultify is a decentralized invoice financing protocol. It enables Web3-native SMEs to tokenize their unpaid invoices as ERC-721 NFTs, representing real-world receivables. These tokenized invoices are made available to crypto investors, who can fund them using USD-pegged tokens (e.g., USDC) or other supported assets.
When an investor funds an invoice, the deposited amount is automatically swapped into the SME’s preferred token (e.g., USDT, wETH) and sent to their wallet on Monad. Vaultify uses smart contracts to store metadata such as invoice amount, due date, repayment terms, and investor address, ensuring transparency and verifiability.
The protocol tracks the funding and repayment lifecycle, and once the SME repays the loan, the NFT is either burned or marked as settled, optionally releasing rewards or yield to the investor.
Vaultify is a decentralized invoice financing protocol that allows Web3-native SMEs to tokenize unpaid invoices as NFTs and receive funding directly from investors in a trustless, transparent way. The project is fully deployed on the Sepolia testnet and integrates multiple technologies across smart contracts, frontend interfaces, off-chain parsing, and token pricing APIs.
Smart Contracts: We wrote our core contracts in Solidity and deployed them on Sepolia. The main contract, VaultManager.sol, implements the ERC-721 standard to tokenize invoices as NFTs. Each NFT holds structured metadata like customer name, invoice amount, due date, desired token, repayment terms, and investor address. The contract supports minting, funding, marking repayment, and burning upon settlement.
Frontend: Built with Next.js (App Router) and TypeScript, the frontend connects to Sepolia via MetaMask and WalletConnect using RainbowKit and Wagmi. The interface includes:
An SME dashboard where businesses upload invoices, extract details using OCR, select a preferred token, and mint the invoice as an NFT.
An Investor dashboard where users browse available invoices, fund them with stablecoins, and view repayment status.
OCR and Invoice Parsing: To automate invoice data extraction, we implemented a FastAPI backend integrated with Tesseract OCR. When a PDF invoice is uploaded, key fields like customer name, total amount, due date, and invoice number are extracted and returned to the frontend for review and confirmation before minting.
Off-chain Metadata Storage: We store invoice metadata and documents on IPFS using Pinata. The resulting content hash (CID) is embedded in the NFT’s tokenURI, making the invoice content verifiable and censorship-resistant.
Token Swaps and Pricing — 1inch API Integration: To allow flexible funding, we use multiple 1inch APIs:
Quote API: Fetches real-time token conversion rates to show investors the equivalent amount in their selected token.
Swap API: Builds a transaction for converting the investor's token (e.g., USDC) into the SME’s desired token.
Token List API: Retrieves supported tokens and their metadata, including token addresses and symbols. This allows the SME to request funding in a specific token, while the investor can fund in any supported token. The actual conversion logic is powered by 1inch's infrastructure, and we simply pass the prepared transaction to the investor's wallet for execution.
Notable Implementation Details: We implemented a hash-based validation system to detect tampering with off-chain invoice data. Before minting, a hash of the key invoice fields is generated and stored on-chain, which can later be used to verify the authenticity of the invoice against its IPFS-stored copy.
To streamline investor experience, we also built a silent funding-to-swap flow. The investor selects an invoice, chooses their input token, and the frontend calculates the swap path using the 1inch API. This is preloaded into a transaction and sent directly to their wallet for approval, minimizing steps and gas errors.