Appearance
Loan Management
Managing active loans — viewing details, health monitoring, collateral top-up, repayment, and loan extension.
Available Actions by Loan Stage
1. My Loans List
| Route | /my-loan |
- Card view of all current and historical loans
- Filter tabs: All, Active, Completed, Cancelled
- Each card shows: loan amount, asset type, health status, due date
- Quick action buttons based on current stage (top-up, repay, extend)
Active stages: loan_active, collateral_deposited, close_to_matured, loan_matured, payment, late_payment, extension_requested
History stages: loan_cancel, loan_closed, liquidated, extended
2. Loan Detail
| Route | /my-loan/:id |
Comprehensive single-loan view:
- Loan Summary — amount, LTV, interest breakdown
- Collateral Card — asset type, volume, current value
- Health Gauge — visual meter with risk level colors
- Repayment Info — due dates, amounts
- Transaction History — loan-specific transactions
- Liquidation Warning — appears when health drops below thresholds
3. Top-up Collateral
| Route | /top-up/:id |
When loan health degrades (due to crypto price drops), the user can add more collateral to improve health and prevent liquidation.
Top-up Asset Options
The user can choose between two top-up types:
| Type | Description | Network |
|---|---|---|
| Same Asset | Top-up with the same cryptocurrency as the loan collateral (e.g., BTC loan → add more BTC) | Auto-locked to original loan network |
| USDT | Top-up with USDT as alternative collateral regardless of original loan asset | User selects network (ERC20, TRC20, BEP20) |
Bidirectional Calculator
Like the loan calculator, top-up supports two input directions:
| Direction | Input | Output |
|---|---|---|
| Volume → Amount | Enter crypto volume | Calculates THB value |
| Amount → Volume | Enter THB amount | Calculates crypto volume needed |
- Uses live price feed for the selected asset
- USDT price feed used separately for USDT top-ups
- Decimal places match the asset type configuration
Health Preview
Before confirming, the user sees:
| Metric | Description |
|---|---|
| Current Health | Current loan health % and risk level |
| Suggested Amount | System calculates the amount needed to restore health to 100% |
| After Top-up Health | Projected health % after adding the specified collateral |
| After Top-up Risk Level | Projected risk level (Healthy, Risk LV.1–3) |
Deposit Address & Confirmation
| Top-up Type | Address Source |
|---|---|
| Same Asset | Uses existing Kryptodian wallet address from the loan |
| USDT | Generates a new USDT deposit address via Kryptodian API |
After confirmation:
- Deposit address + QR code displayed in a dialog
- User sends crypto to the address from external wallet
- Deposit confirmed via Kryptodian webhook
- Collateral value updated on the loan
- Health recalculated
Top-up Locking
- Once a USDT top-up is initiated (address generated), the USDT network is locked for that loan
- Subsequent top-ups to the same loan will use the same USDT network
- Same-asset top-ups always use the original loan network (no selection needed)
Top-up Protection
A loan with an active top-up (topup_active_time is not null) is temporarily protected from both price-drop and late-payment liquidation. This gives the user time to complete the deposit.
4. Repayment
| Route | /repayment/:id |
Two-step repayment process:
Step 1 — Repay Loan
- Loan detail display with repayment amount
- Early payment fee shown if applicable (calculated by backend)
- Agreement acceptance required when early payment fee > 0 (scroll-to-end enforcement)
- Bank account details with copy buttons
- PromptPay QR code for easy payment
Step 2 — Upload Slip
- Drag-and-drop or file browser upload
- Supported formats: JPG, PNG, PDF
- File preview before submission
- Submit for admin verification
Payment Eligibility (14-Day Rule)
- Active loans: Must wait 14 days from
loan_startbefore payment is available - Matured loans: Immediate payment access (stages:
close_to_matured,loan_matured,payment,late_payment)
5. Extend Loan
| Route | /loan-extend/:id |
Extend the loan term when approaching maturity:
- Select extension duration
- View current vs. new terms side-by-side
- Extension fee calculation (processing fee + interest + late payment fee if applicable)
- Discount code support
- Submit extension request
Extension Eligibility: Available for close_to_matured, loan_matured, payment, late_payment stages (no 14-day restriction).
6. Extension Payment
| Route | /loan-extension-payment/:id |
- Extension fee breakdown display
- Bank transfer instructions with PromptPay QR
- Payment slip upload
- Status tracking
7. Extension Contract Signing
| Route | /loan-extension-sign-contract/:id |
- View extension contract document
- Term comparison (old vs. new)
- Digital signature pad
- OTP verification
- On success → extension activated, new loan dates applied
Next: Profile & Settings →