- Event: Mantle Hackathon 2026
- Tracks: RWA/RealFi, DeFi & Composability, AI & Oracles, UX/Demo
TokenLend is a decentralized, AI-driven lending platform enabling SMEs to unlock liquidity using their real-world assets (RWA) as collateral. Borrowers can access stablecoin loans backed by tokenized assets, while lenders gain secure, verifiable exposure to vetted collateral. TokenLend supports global stablecoins, off-ramp to local fiat, and uses AI underwriting to assess borrower reliability and asset value.
- SMEs in emerging markets struggle to access affordable credit
- Banks require formal collateral and cumbersome documentation
- Physical assets are underutilized for liquidity
- Traditional lending lacks transparency, risk scoring, and global reach
- Collateralize real-world assets (phones, cars, inventory, machinery)
- AI underwriting evaluates asset and borrower data to calculate maximum safe Loan-to-Value (LTV)
- Tokenized assets issued as proof of collateral for tracking and locking
- Stablecoin lending (USDT/MNT) with optional NGN off-ramp
- Smart contracts manage collateral lock/unlock and liquidation on default
- Transparent AI risk scoring for lenders
- SME Onboarding & KYC
- Asset Upload & AI Valuation
- Tokenized Collateral (ERC-721)
- Loan Request & LTV Calculation
- Lending & Interest Management
- Repayment Flow & Collateral Unlock
- On/Off Ramp Integration
- Borrower data: revenue, POS settlements, transaction history
- Asset data: photos, market APIs, depreciation, serial numbers
- Output: LTV recommendation and risk score
- Ensures: safe borrowing limits
- Web/Mobile app, asset upload, loan dashboard, repayment tracking
- AI valuation engine
- Borrower/asset database
- LTV/interest calculator
- Loan management API
- Tokenized collateral
- Collateral locking/unlocking
- Loan settlement & liquidation
- Stablecoin transfers
- Stablecoin wallets (USDT/MNT)
- Optional NGN off-ramp
- Notifications
- Borrower uploads asset → AI valuation → token generated
- Borrower requests loan ≤ LTV limit
- Lender funds loan → smart contract locks collateral
- Borrower repays principal + interest → collateral token released
- Default → collateral token liquidated → proceeds to lender
-
AssetToken.sol - ERC-721 NFT for RWA collateral
- Asset metadata (type, AI valuation, max LTV)
- Lock/unlock mechanism
- Transfer prevention for locked assets
- Authorized manager pattern
-
LoanManager.sol - Core lending logic
- Loan creation with asset collateral
- Loan funding by lenders
- Repayment with interest calculation
- Liquidation mechanism
- Multi-stablecoin support
- Platform fee system
- Grace period before liquidation
-
MockStablecoin.sol - Testing token
-
AssetToken.test.js - Comprehensive test suite
- Minting tests
- Lock/unlock tests
- Transfer prevention tests
- Max loan amount calculation
-
LoanManager Tests - Complete test coverage for loan lifecycle
- Loan creation tests
- Funding tests
- Repayment tests
- Liquidation tests
- Edge cases and security tests
-
AI Oracle Integration (if needed on-chain)
- Chainlink oracle for asset valuation
- Price feeds for stablecoins
-
Security Audit Prep
- Reentrancy protection review
- Access control review
- Edge case handling
-
Deployment Scripts
- Hardhat deployment scripts
- Mantle testnet deployment
- Contract verification
- Asset classification model
- Price estimation model
- Risk scoring model
- API endpoints for valuation
- Integration with smart contracts
- User authentication & KYC
- Asset upload and storage (IPFS)
- AI valuation service integration
- Loan management endpoints
- Notification service
- Off-ramp integration (NGN)
- Landing page
- User registration/login
- Asset upload flow
- Loan request interface
- Lender dashboard
- Borrower dashboard
- Repayment tracking
- Wallet integration (MetaMask, etc.)
- Integration testing
- User acceptance testing
- Security audit
- Mantle mainnet deployment
- Demo preparation
Type: ERC-721 NFT Contract Purpose: Tokenize real-world assets as collateral
Key Functions:
mintAsset()- Create NFT for asset with AI valuationlockAsset()- Lock asset when loan is createdunlockAsset()- Unlock asset when loan is repaidgetMaxLoanAmount()- Calculate max borrowable amount based on LTVsetAuthorizedManager()- Authorize LoanManager contract
Asset Struct:
struct Asset {
string assetType; // "phone", "car", "machinery"
uint256 aiValuation; // USD value (scaled by 1e18)
uint256 maxLTV; // Max LTV ratio (basis points)
uint256 createdAt; // Timestamp
address borrower; // Asset owner
bool isLocked; // Collateral status
uint256 loanId; // Associated loan ID
}Type: Loan Management Contract Purpose: Handle loan lifecycle from creation to repayment/liquidation
Key Functions:
createLoan()- Borrower creates loan requestfundLoan()- Lender funds the loanmakeRepayment()- Borrower makes paymentliquidateLoan()- Liquidate defaulted loanaddSupportedStablecoin()- Add accepted stablecoins
Loan Struct:
struct Loan {
uint256 loanId;
address borrower;
address lender;
uint256 assetTokenId; // Collateral NFT
uint256 principal; // Loan amount
uint256 interestRate; // Annual rate (basis points)
uint256 duration; // Loan term (seconds)
uint256 startTime; // When funded
uint256 totalRepayment; // Principal + interest
uint256 amountRepaid; // Paid so far
LoanStatus status; // Active/Repaid/Liquidated
address stablecoin; // USDT/MNT/etc.
}Loan Statuses:
Active- Loan is ongoingRepaid- Fully paid backLiquidated- Collateral seizedDefaulted- Past due (unused currently)
- Primary: USDT, USDC, MNT (Mantle native)
- Flexible multi-stablecoin architecture
- MockStablecoin for testing only
- Simple interest model:
(principal * rate * duration) / (10000 * 365 days) - Rate in basis points (1000 = 10%)
- Pro-rata for custom durations
- 7-day grace period after loan expiry
- Lender receives collateral NFT
- No partial liquidation (full seizure)
- Platform fee: up to 10% (configurable)
- Fee deducted from principal at funding
- Fee goes to designated recipient
- ReentrancyGuard on all financial functions
- Ownable for admin functions
- SafeERC20 for token transfers
- Transfer prevention on locked assets
- Write comprehensive LoanManager tests
- Test full loan lifecycle end-to-end
- Test liquidation scenarios
- Test multi-stablecoin support
- Consider partial repayments
- Add loan extension mechanism
- Add early repayment discount
- Add borrower/lender reputation system
- Write deployment scripts
- Configure for Mantle testnet
- Verify contracts on block explorer
- Document deployed addresses
- Testnet RPC: https://rpc.testnet.mantle.xyz
- Mainnet RPC: https://rpc.mantle.xyz
- Explorer: https://explorer.mantle.xyz
- Faucet: https://faucet.testnet.mantle.xyz
- USDT: [To be added]
- USDC: [To be added]
- MNT: Native token
- Hardhat
- OpenZeppelin Contracts
- Ethers.js
- Chai (testing)