Inspiration

Small and Medium Enterprises (SMEs) constantly face a "liquidity gap". They complete work today but often wait 30, 60, or even 90 days to get paid. Traditional invoice factoring is slow, paper-heavy, and accessible only to larger companies. We were inspired to democratize access to this liquidity by combining the speed of the XRP Ledger with the trust of AI-powered forensic verification. We wanted to build a system where an invoice is as liquid as a token, but as legally robust as a paper contract.

What it does

EULA is a decentralized invoice factoring platform that allows businesses to turn their outstanding invoices into liquid assets.

AI Verification: Sellers upload their Invoice, Purchase Order (PO), and Proof of Delivery (POD). Our code (docTR) extracts the data and performs a "3-Way Match" validation to ensure the documents are consistent and fraud-free. Tokenization: Verified invoices are minted as NFTs on the XRP Ledger. Identity Verification: We use XRPL's DIDSet to verify the business identity on-chain, creating a trust layer for buyers. Stablecoin Settlement: Invoices are listed and sold in RLUSD (Ripple USD), ensuring that businesses receive stable, predictable value without crypto volatility. Legal Compliance: The platform enforces the "Notice of Assignment," reminding buyers of the legal steps required to perfect the debt transfer.

How we built it

We built EULA using a hybrid architecture that leverages the best of Web2 AI and Web3 finance: XRPL Integration: Instead of writing complex smart contracts, we used XRPL's native primitives. We used NFTokenMint for tokenization, NFTokenCreateOffer for the decentralized exchange, and IssuedCurrency for RLUSD integration. Backend: We built a FastAPI service in Python that handles the heavy lifting of document processing. OCR: We integrated docTR (Document Text Recognition) to extract structured data (dates, line items, amounts) from PDF uploads. Frontend: A React application provides the user interface, integrating the Crossmark Wallet SDK for secure, direct transaction signing from the browser.

Challenges we ran into

Shifting our mental model to understand that XRPL's native transaction types (like NFTokenMint) are pre-compiled and highly efficient, removing the need for custom contract code for standard use cases.

OCR Reliability: Getting OCR to accurately read diverse invoice formats was difficult. We spent significant time refining our "3-way match" logic to handle OCR noise while still catching discrepancies between invoices and POs. Legal Engineering: We realized that just buying the NFT wasn't enough to legally transfer the debt. We had to research and implement a "Notice of Assignment" workflow to ensure the platform accommodates real-world legal requirements for debt discharge. Of course, this can be improved upon a lot more post-hackathon.

Accomplishments that we're proud of

Full RLUSD Integration: We successfully moved away from volatile assets and implemented pricing in RLUSD, making the platform commercially viable for real businesses.

Automated 3-Way Matching: We built a robust validation engine that protects buyers from fraud by ensuring every invoice is backed by a PO and proof of delivery.

Seamless UX: We integrated Crossmark so effectively that users just click "Sign" without needing to copy-paste keys or manage complex wallet states.

Real-World Utility: This isn't just a token swap; it's a financial instrument platform that solves a real $3T+ market problem.

What we learned

Native Primitives > Custom Code: We learned that using XRPL's native features reduces security risks and development time significantly compared to writing custom smart contracts.

Identity is Key: In DeFi for business, anonymity is a bug, not a feature. Implementing DID (Decentralized Identifiers) was crucial for creating a trusted marketplace.

Data vs. Trust: We learned the balance of what goes on-chain (the asset & ownership) versus what stays off-chain (the private document data and validation logic).

What's next for EULA

Mainnet Launch: Moving from Testnet to Mainnet to process real value.

Automated Notice of Assignment: Integrating email services (SendGrid) to automatically notify debtors when an invoice NFT is purchased.

Enhanced Duplicate Detection: Building a robust off-chain index to prevent the same invoice from being financed twice across different sessions. Privacy Rules: implementing zero-knowledge proofs so verification can be proven without revealing sensitive line-item details publically. (And more, detailed in our repo's README.md)

Built With

Share this project:

Updates