Borrow Assets
How Borrowing Works
After depositing collateral, call borrow(amount) on VarlaCore. The contract checks that your post-borrow health factor stays above 1.0, then transfers stablecoins from the VarlaPool to your wallet.
Borrow check
newDebt = currentDebt + borrowAmount
healthFactor = weightedCollateral / newDebt
if healthFactor >= 1.0:
✓ Transfer stablecoins to borrower
else:
✗ Revert — would make position unhealthy Maximum Borrow Amount
Your max borrow is determined by the weighted collateral value minus your current debt. Each position contributes based on its oracle price and risk tier LTV.
Max borrow calculation
maxBorrow = Σ(positionValue × tierLTV) - currentDebt
Example:
├── Position A: $5,000 × 80% = $4,000
├── Position B: $3,000 × 65% = $1,950
├── Current debt: $2,000
└── Max additional borrow: $3,950 ⚠ Don't max out
Borrowing to your maximum leaves zero margin. Any price drop in your collateral will trigger liquidation. A safe buffer is borrowing no more than 70-80% of your max capacity.
Interest
Interest begins accruing immediately on a per-second basis. Your debt grows continuously via the global borrow index. See Interest Rates for the full rate model.
Requirements
| Requirement | Details |
|---|---|
| Collateral deposited | At least one eligible PM position |
| Oracle fresh | Price data must not be stale (<15min) |
| Post-borrow HF ≥ 1.0 | Health factor must remain healthy |
| Pool liquidity | Pool must have enough available stablecoins |