About
## Wave 1 submission
For this Wave, we launched the initial functional prototype of Factra, a B2B invoice financing protocol built on Citrea zkRollup (Bitcoin Layer 2). Major updates include:
✅ Deployed Factra.sol smart contract on Citrea testnet to manage invoice lifecycle ✅ Integrated wallet connection (RainbowKit + Wagmi) for user auth via cBTC ✅ Enabled real-time on-chain invoice creation and funding ✅ Designed and implemented a clean, finance-native UI using shadcn/ui ✅ Built an invoice marketplace with mock data to simulate browsing and funding behavior ✅ All contract calls (create, fund, mark paid) are connected on-chain using Wagmi and Viem ✅ Created end-to-end demo workflow with test cBTC
🔗 View working demo: https://factra-three.vercel.app
This wave demonstrates the full loop: connecting wallet → creating invoice → funding → smart contract state updates.
## Wave 2 submission
In Wave 3, we focused on bringing Factra’s core product closer to a live DeFi marketplace for Bitcoin invoices. Our emphasis was on replacing placeholders with actual data, improving contract structure, surfacing real-time metrics, and connecting everything through clean, trustless on-chain flows.
✅ Smart Contract Improvements & Invoice Structuring We extended the Factra smart contract to include: - A structured Invoice type with fields for: - Business name - Sector - Credit rating - Discount rate - Enum-based status tracking (Created / Funded / Paid) - New view methods: getInvoice, getInvoiceCount
Each invoice is fully on-chain and verifiable. The contract now acts as the single source of truth for all invoices and their life cycle stages.
🧾 Invoice Creation: Form → Contract Flow We built a full invoice creation flow with: - Dynamic form to collect real business data - Clean conversion of form fields (e.g., ratings → x10, due dates → Unix, BTC → wei) - Wallet interaction via RainbowKit and wagmi ✅ Successful transaction feedback + tx hash display on confirmation This was wired to the actual smart contract, replacing all previously hardcoded or mocked behavior.
🛒 Marketplace: Live Invoice Discovery
We fully replaced the dummy marketplace with a live smart-contract-backed interface. It pulls invoices directly from getInvoiceCount + getInvoice(i) Filters to show only open (unfunded) invoices Displays: - Business metadata - Discount rate - Maturity (days left) - Calculated yield (APY based on discount + days) This is now a real investment surface for funders using cBTC on testnet.
📊 Dashboard: Real-time Metrics From-Chain We implemented a new dashboard with actual on-chain stats, replacing placeholder values: 🧾 Outstanding Invoices: live count + BTC value 💰 Purchased Invoices: funded count + amount 🪙 Expected Payouts: invoices maturing in next 30 days 💳 Wallet Balance: pulled via useBalance hook from wagmi + RainbowKit All values are calculated from the contract state and update reactively.
⚠️ Note on Limitations
Due to ongoing health challenges and a very packed workload, we weren’t able to go as deep into UI polish or ERC721 invoice tokenization as originally intended. That said, we prioritized getting the real contract + data pipeline live, and laid solid groundwork. We’ll be compensating for this in next waves by building more investor tooling, funding analytics, and possibly a secondary invoice marketplace.
🔗 View Progress
🌐 Live (testnet): https://factra-three.vercel.app Smart contract address: 0x74B95749789B43577a7a4D57dfc425d3Fa84624a Sample tx: 0xb1cf091c71ca7e1930527fdd1e918153a99d8c13cd3f4a704976ec6bd0dd8b44
## Wave 3 submission
In Wave 3, we focused on refining the overall experience for issuers and buyers, transforming Factra into a cleaner, more scalable, and modular Bitcoin-native invoicing solution. Here’s a breakdown of what we accomplished this wave:
🔧 1. Dynamic Invoice Explorer & Buyer View - Implemented a dynamic, data-driven Invoice Explorer to showcase all invoices with real-time status and metadata. - Designed and built the Buyer Dashboard, where users can browse verified invoices, assess risk metrics (ratings, discounts, sectors), and select invoices to pay.
🧠 2. Better Invoice Parsing & Typing
Defined and used a clear RawInvoice type structure: bigint, // id string, // issuer string, // buyer bigint, // amount bigint, // dueDate number, // status string, // businessName string, // sector number, // rating number // discountRate Streamlined the backend-to-frontend invoice transformation pipeline, ensuring accurate, readable data across components.
📊 3. Smart Stats & Metrics UI
- Created a modular dashboard with live metrics: - Number of active invoices - Total value in BTC - Sector insights and average discount rates - Real-time trends like % growth in invoice listings - Introduced a cardStats system that allows flexible additions of future stats.
🧩 4. Reusable Component Architecture
-Refactored card components, table views, and invoice lists to be props-driven and reusable, enabling scalable UI as the platform grows. - Integrated click actions and selection logic for buyers to inspect invoice details and prepare for funding.
✨ 5. Design Consistency & Contextual Headings - Added contextual headers and copy (e.g., "Dashboard Overview") to enhance user understanding and narrative clarity. - Ensured the layout scales cleanly across mobile, tablet, and desktop.
🪙 Why This Matters
- These improvements make Factra not just a Bitcoin invoicing tool but a trust-first, insight-driven credit marketplace. - Buyers can now clearly evaluate invoices before paying, and issuers benefit from better exposure and trust signals.
## Wave 4 submission
Factra – Wave 3 Updates
1. Successful Contract Deployment
-- InvoiceNFT contract and the main Factra protocol contract are now deployed and connected, enabling the NFT-based invoice flow to work end-to-end. -- Deployed addresses: InvoiceNFT: 0x80b98aF757FFc9a03B43EDA796E286FcbBF25BC3 Factra: 0xbe75072F49c8F8E6Ca588Ae90234fDF569bd05B0
2. Turning Invoices Into NFTs
-- Every invoice created on Factra can now be “tokenized” as an NFT. -- This means an invoice is no longer just a document or a database entry — it becomes a tradable digital asset that lives on-chain
3. Enabling a Secondary Market
-- Once tokenized, these invoice NFTs can be sold or transferred. -- This opens the door for a secondary market where others can buy an invoice’s rights and get paid when the invoice is settled. -- It’s similar to how people trade music royalties or receivables, but now it’s transparent, automated, and globally accessible.
4. End-to-End Invoice Flow
-- Issuers can create invoices and immediately receive early liquidity by selling the NFT to a funder. -- Funders can hold the NFT until the invoice is paid, earning yield in the process.
5. Marketplace Foundation
-- Our marketplace interface is now connected to live contract data, showing available invoices for funding. -- Buyers see real, on-chain NFTs representing invoice claims.
6. New “My NFTs” Section
-- Users can now view all invoice NFTs they own in one place. -- This gives a clear, portfolio-style overview of all claims a user holds, ready for resale or collection upon maturity.
7. Bigger Vision in Action
-- Factra is moving invoice financing from a closed, slow, bank-driven process to an open, liquid, and transparent on-chain ecosystem. -- Any small business can get funding quickly. -- Any individual or institution can become an invoice investor. -- All of it runs on open smart contracts, without hidden middlemen.
## Wave 5 submission
Updates in this Wave In this Wave, we enhanced the Factra platform by integrating on-chain invoice NFTs directly into the Invoice Marketplace and improved the user experience with a more visual, intuitive layout.
// Key Updates:
# NFT Integration in Marketplace - Each invoice now displays its associated NFT image beside the invoice details, providing visual verification of on-chain assets. - Users can easily identify invoices with their NFT representation, improving trust and transparency.
# Secondary Marketplace
- Introduced a secondary marketplace allowing users to explore and trade previously issued invoices. - This marketplace supports seamless discovery, filtering, and comparison of available invoices, fostering liquidity and engagement among participants.
# UI Enhancements
- Marketplace layout supports two invoices per row, improving readability and efficiency. - NFT images are consistently displayed with fixed height and aspect ratio for a polished, professional look. - Invoice cards highlight key information such as amount, yield, sector, discount, and maturity at a glance.
# User Interaction Improvements
- Users can now fund invoices directly from the marketplace with a clear view of discounted and maturity amounts. - The interface provides smooth interactions for searching, sorting, and filtering invoices across both primary and secondary markets.
# Bug Fix – Invoice Duplication
- Fixed an issue where invoices were being created twice, ensuring data integrity and avoiding duplicate entries.
# Deployment & Live Access
Updated smart contracts: - FACTRA_ADDRESS = 0x1e972B57C4B7Be0E97607A9c41c1179a0ca3f76D - INVOICE_NFT_ADDRESS = 0x8FF14d91fd6B82130D2634bE82825D6B70F1Eed7 - SEC_MARKET_ADDRESS = 0x7F28bf6b6045aa6E0c38dc8D6bFf037174233357 - The updated marketplace is live at https://factra-three.vercel.app - Demo Video (Youtube) of new updates: https://youtu.be/UV7dz-4E4QY
// Impact:
These updates enhance market visibility, improve user confidence, and enable NFT-backed invoice trading, bridging primary issuance and secondary trading in a single, unified platform.
A big thank you to team at Citrea for supporting us throughout this journey. Your guidance and encouragement have been invaluable, especially as we wrap up the final Wave!
Prizes
- Wave 1 grant · 258.14 USDT
- Wave 2 grant · 351.48 USDT
- Wave 3 grant · 300 USDT
- Wave 4 grant · 251.16 USDT
- Wave 5 grant · 315 USDT
From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.





