Overview
The Credit feature enables you to access liquidity without selling your cryptocurrency holdings. Take out over-collateralized loans by pledging crypto assets as collateral, with flexible terms, competitive rates, and real-time liquidation price monitoring.What You Can Do
Collateralized Loans
Borrow stablecoins and other assets using your crypto as collateral
Flexible Terms
Choose loan duration, over-collateralization ratio, and repayment schedule
Liquidation Protection
Monitor liquidation prices in real-time to manage risk
Debt Management
Adjust collateral or repay debt anytime to improve loan health
Key Capabilities
Loan Types
TheLoanComponent supports various loan models:
- Short-Term: 7-30 day loans with lower origination fees
- Medium-Term: 30-90 day loans balanced for rate and flexibility
- Long-Term: 90+ day loans with predictable long-term rates
- APR (Annual Percentage Rate)
- Over-collateralization requirements
- Origination fee percentages
- Minimum/maximum loan sizes
Loan Interface
The main credit interface (LoanComponent) provides:
- Loan Asset Selection: Choose what you want to borrow (e.g., USDC, USDT)
- Collateral Selection: Pick which crypto to pledge (e.g., BTC, ETH)
-
Quantity Input:
- Enter loan amount in the borrowed asset
- System auto-calculates required collateral
- Real-time conversion using
useTokenSwaphook - Min/Max buttons for quick selection
- Loan Type Tabs: Switch between available loan models
-
Loan Calculator: Displays critical metrics:
- APY: Interest rate for the loan
- Over-collateralization: Required collateral ratio (e.g., 150%)
- Origination Fee: Upfront cost as percentage
- Origination Cost: Fee amount in borrowed asset
- Over-collateralization Cost: Extra collateral required
- Loan Total Cost: Principal + origination + over-collateralization
- Collateral: Total collateral amount needed
- Liquidation Price: Price at which loan gets liquidated
- Daily Cost: Interest accrued per day
Loan Calculation
TheuseLoanSelectedData hook computes all loan metrics:
Loan History
TheLoanHistoryTable component shows:
- All active loans with current health status
- Historical loan records
- Filterable by:
- Loan type
- Collateral asset
- Borrowed asset
- Status (Active, Repaid, Liquidated)
- Date range via
useLoanHistoryFilters
Manage Existing Loans
For active loans, you can:- Manage Debt
- Manage Collateral
Use
ManageDebtModal to:- Repay partial or full loan amount
- View current debt balance
- See interest accrued
- Check remaining term
How to Take Out a Loan
Navigate to Credit
Go to the Credit page from the main menu. You’ll see the loan interface and your loan history.
Select Borrow Asset
Choose what you want to borrow from the “Asset” dropdown. Typically stablecoins like USDC or USDT for accessing USD liquidity.
Select Collateral
Choose which cryptocurrency to pledge as collateral. Higher-value, less volatile assets often get better terms.
Choose Loan Type
Review the loan type tabs:
- Compare APY rates
- Check over-collateralization requirements
- Consider origination fees
- Match duration to your needs
Enter Loan Amount
Input how much you want to borrow:
- Type the quantity directly
- Use “MIN” for minimum loan amount
- Use “MAX” for maximum based on available collateral
- System auto-calculates required collateral
Review Loan Terms
Carefully review all displayed metrics:
- Total collateral required
- Liquidation price
- Daily interest cost
- Origination fee
- Total loan cost
Loan Workflow
The loan creation process:Loan Health Monitoring
For active loans, monitor these key indicators:-
Collateral Ratio: Current collateral value ÷ loan value
- Should stay above over-collateralization requirement
- Warning if approaching liquidation threshold
-
Liquidation Price: Critical price level for collateral
- Loan liquidates if collateral price hits this level
- Calculated based on required ratio
-
Accrued Interest: Daily interest adding to loan balance
- Compounds based on APY
- Added to total debt owed
The
LoanInfo component displays real-time loan health metrics for all active positions.Data Components
Key hooks used by the credit feature:- useLoanData: Fetches available loan types and user’s eligible assets
- useLoanSelectedData: Computes all loan metrics (liquidation price, costs, etc.)
- useTokenSwap: Handles collateral ↔ loan asset conversions
- useValueVerifier: Validates loan and collateral amounts
- usePostLoan: Mutation hook for creating loans
- useLoanHistoryData: Retrieves user’s loan history
- useLoanHistoryFilters: Manages history table filters
- useLoanEventsData: Tracks loan-related events (repayments, liquidations)
Risk Management
Loan Examples
Conservative Loan
- Borrow: 5,000 USDC
- Collateral: 2 ETH (@ 5,000)
- Over-collateralization: 200% (conservative)
- Required Collateral: 10,000 ÷ 2,500 = 4 ETH
- Liquidation Price: ~$1,250 per ETH
- APY: 6.5%
- Daily Cost: 0.89 USDC
Aggressive Loan
- Borrow: 10,000 USDC
- Collateral: 3 BTC (@ 150,000)
- Over-collateralization: 150% (minimum)
- Required Collateral: 15,000 ÷ 50,000 = 0.3 BTC
- Liquidation Price: ~$40,000 per BTC
- APY: 8.2%
- Daily Cost: 2.25 USDC
Session Modes
In mock/demo mode, loan simulations are available but actual loan creation is restricted. The interface will show “isSessionModeMock” warnings.
Troubleshooting
Loan button is disabled:- Check you have sufficient collateral balance
- Verify loan amount is within min/max bounds
- Ensure both asset and collateral are selected
- Confirm collateral value meets over-collateralization requirement
- Wait for
useTokenSwaphook to fetch conversion rates - Verify both assets have valid market prices
- Check network connection
- Review error message from
getDisplayMessage - Check if assets are supported for loans
- Verify account has borrowing permissions
- Ensure no existing loan limits are exceeded
Related Features
- Portfolio - View total loan obligations
- Activity - Track loan events and repayments
- Governance - Loan policies and approval workflows
