Skip to content
CrediTrust

CrediTrust

Autonomous Credit. Borderless Finance.

Created on 24th June 2025

β€’

CrediTrust

CrediTrust

Autonomous Credit. Borderless Finance.

The problem CrediTrust solves

🏦 Traditional Lending is Broken

Current financial systems exclude billions of people from accessing credit due to:

  • 🌍 Geographic barriers – No access to traditional banks
  • πŸ’° High collateral requirements – Need 150–200% over-collateralization
  • ⚠️ Credit score discrimination – No credit history = no loans
  • πŸ›οΈ Centralized control – Banks decide who gets loans and at what rates
  • 🐌 Slow processing – Days or weeks for loan approval
  • πŸ’Έ High fees – Multiple intermediaries take cuts

πŸ’‘ Our Solution: CrediTrust

CrediTrust is a decentralized peer-to-peer lending platform that redefines how people access and provide credit by using blockchain, smart contracts, and now, IPFS for immutable loan record storage.


πŸ‘€ For Borrowers

  • πŸ”“ Lower Collateral Requirements – Just 120% collateralization (vs 150–200%)
  • πŸ“Š Dynamic Interest Rates – Better scores = lower rates (as low as 5% APR)
  • ⚑ Instant Access – Get loans in minutes, not days
  • 🌍 Global Access – Anyone with crypto can participate
  • πŸ“ˆ Credit Building – Build on-chain credit history for better future rates
  • πŸ—‚οΈ Decentralized Loan Agreements – Each loan generates a verifiable IPFS agreement stored securely

πŸ§‘β€πŸ’Ό For Lenders

  • πŸ’° Higher Yields – Earn 8–15% APR (vs 1–3% in banks)
  • 🎯 Risk Selection – Choose borrowers based on credit scores and collateral
  • πŸ”’ Secured Lending – All loans are over-collateralized
  • πŸ“Š Transparent Analytics – Real-time tracking and risk metrics
  • πŸ€– Automated Matching – Fair lender assignment using Chainlink VRF
  • πŸ—ƒοΈ Verifiable Records – Immutable IPFS loan documents for every transaction

🌐 For the Ecosystem

  • πŸ—οΈ DeFi Infrastructure – Enables new financial products and services
  • πŸ’Ž Capital Efficiency – Better utilization of idle crypto assets
  • 🌐 Financial Inclusion – Banking the unbanked globally
  • πŸ“± User-Friendly – Simplified Web3 experience
  • πŸ” Decentralized Storage – Permanent, tamper-proof loan records using IPFS + Pinata

🎯 What People Can Use It For

1. πŸ’Ό Business Capital

  • Small Business Loans
  • Inventory Financing
  • Equipment Purchase
  • Cash Flow Management

2. πŸ’³ Personal Finance

  • Emergency Funds
  • Home Improvements
  • Education Expenses
  • Medical Bills

3. πŸ“ˆ Investment Opportunities

  • Crypto Trading
  • Arbitrage
  • DeFi Yield Farming
  • NFT Purchases

4. πŸͺ™ Yield Generation

  • Passive Income
  • Portfolio Diversification
  • Stable Returns
  • Compound Growth

πŸ›‘οΈ How It Makes Things Safer & Easier

βœ… Safety Improvements

  • πŸ”’ 120%+ Over-Collateralization
  • πŸ” Automatic Liquidation to prevent default losses
  • 🧠 Smart Contract Security – Audited and transparent
  • πŸ“‰ Real-Time Health Monitoring
  • 🧾 IPFS Loan Storage – Permanent, publicly verifiable loan agreements
  • 🌐 Decentralized Governance – No single point of failure

πŸš€ User Experience Improvements

  • πŸ–±οΈ One-Click Lending & Borrowing
  • πŸ“± Mobile-Responsive Interface
  • πŸ”— Wallet Integration – MetaMask, WalletConnect
  • πŸ“Š Live Portfolio Analytics
  • πŸ“‚ View Loan Agreements on IPFS – Clickable IPFS hash links
  • πŸ’¬ Jargon-Free UI – Friendly for all users

πŸ“’ Disclosure

This project was developed during the parallel timelines of the Coinbase Agents in Action Hackathon and Chromion: A Chainlink Hackathon.

The Chainlink-powered decentralized lending protocol was enhanced with Coinbase technologies such as:

  • πŸ›‘οΈ CDP Wallet – for secure, programmable wallet integration
  • πŸ’Έ x402pay – for monetization of on-chain credit-scoring agents

The project satisfies the unique requirements of both hackathons, and all development occurred within their official timeframes.

Challenges I ran into

🚨 Major Technical Hurdles


1. Chainlink VRF Integration Issues

Problem:
Chainlink VRF (Verifiable Random Function) for fair lender assignment kept failing on local Hardhat network.

Symptoms:

  • Repeated failures in randomness requests
  • VRF requests never fulfilled

Solution:

  • Created a fallback mechanism that checks if the VRF Coordinator address is the zero address
  • Implemented direct lender assignment for local testing
  • Added proper VRF request/fulfillment logic for mainnet deployment

2. Contract Deployment Persistence

Problem:
Deployment scripts claimed success, but contracts weren't properly deployed to the correct Hardhat network.

Symptoms:

  • Frontend displayed "undefined" for all contract addresses
  • CDP creation failed with "Internal JSON-RPC error"
  • Contract addresses existed but had no bytecode

Root Cause:
Deployment scripts were accidentally targeting a different network instance than the frontend.

Solution:

  • Used --network localhost explicitly in deployment commands
  • Verified bytecode presence post-deployment
  • Wrote test scripts to validate actual contract state
  • Synced frontend contract addresses after every deployment

3. BigInt Conversion Errors

Problem:
Frontend crashed with NaN cannot be converted to BigInt errors.

Solution:

  • Added enhanced input validation
  • Ensured all numeric user inputs were properly parsed to BigInt using BigInt(Number(...)) safely
  • Prevented empty or invalid fields from triggering logic prematurely

4. Dual Feature Conflict (Lending vs Borrowing)

Problem:
Either lending or borrowing worked β€” but not both at the same time.

Root Cause:

  • deploy.js script only minted tokens to user wallets β†’ Lending worked
  • test_cdp_flow.js script only funded the vault β†’ Borrowing worked

Solution:

  • Created a comprehensive deployment setup that:
    • Mints tokens to users
    • Funds the vault
    • Registers contracts correctly in both flows

5. Dynamic Dashboard Data

Problem:
Dashboard displayed static mock data instead of live on-chain info.

Challenge:

  • Fetch real-time values from multiple contracts
  • Handle asynchronous loading states
  • Generate responsive charts without blocking UX

Solution:

  • Built dynamic data fetching logic for:
    • Token balances
    • Vault states
    • APR and loan data
  • Used React state management to update graphs and cards in real-time
  • Handled edge cases and fallback gracefully

🧠 Learning & Problem-Solving Process


πŸ§ͺ Debugging Methodology

  • πŸ” Isolate the Problem – Reproduce issues with minimal code
  • πŸ” Check Each Layer – Contract β†’ Deployment β†’ Frontend β†’ UI
  • ❗ Verify Assumptions – Don’t blindly trust β€œsuccess” logs
  • 🧱 Test Incrementally – Build up from small working units
  • πŸ“ Document Solutions – Reuse fixes, avoid regressions

πŸ’‘ Key Insights Gained

  • Always confirm contract deployment by calling contract methods
  • Local environments behave differently than testnet/mainnet β€” use appropriate configurations
  • Input validation is critical in Web3 frontend interactions
  • Comprehensive testing prevents deep integration bugs
  • Clear logs and error messages = smoother development

Tracks Applied (4)

Best Use of x402pay + CDPWallet

CrediTrust is built from the ground up using both x402Pay and CDP Wallet, making it a perfect fit for this track. We us...Read More

Best Use of CDP Wallet

CrediTrust is built from the ground up using both x402Pay and CDP Wallet, making it a perfect fit for this track. We us...Read More

Best Use of x402pay

CrediTrust is built from the ground up using both x402Pay and CDP Wallet, making it a perfect fit for this track. We us...Read More

Best Agentic Use of Pinata

πŸ“„ Pinata CrediTrust seamlessly integrates Pinata/IPFS to store off-chain loan agreements and user metadata in a decent...Read More

Pinata

Discussion

Builders also viewed

See more projects on Devfolio