CrediTrust
Autonomous Credit. Borderless Finance.
Created on 24th June 2025
β’
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 localhostexplicitly 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.jsscript only minted tokens to user wallets β Lending workedtest_cdp_flow.jsscript 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
Best Use of CDP Wallet
Best Use of x402pay
Best Agentic Use of Pinata
Pinata
