๐Ÿš€ Welcome, Market Owner!

As a market owner in Lendefi Markets, you have the power to create and manage isolated lending markets for any ERC-20 asset. This guide will walk you through the complete process from creation to launch.

๐Ÿ”ฅ New Feature: Market owners now automatically receive MANAGER_ROLE during market creation, enabling immediate configuration without waiting for DAO governance!

1Create Your Market

The first step is to create your lending market through the factory contract. This establishes your isolated liquidity pool.

What happens during creation:

  • โœ… Core contract deployed for borrower position management
  • โœ… ERC-4626 vault deployed for lender deposits and withdrawals
  • โœ… Position vault deployed for borrower collateral isolation
  • โœ… Assets module cloned with your configuration permissions
  • โœ… PoR feed deployed for proof-of-reserves tracking
  • โœ… MANAGER_ROLE granted to you automatically
Required Information:
  • Base Asset: Contract address of the token to be lent (must be whitelisted)
  • Market Name: Name for your yield token (e.g., "Lendefi Yield Token USDC")
    โ†’ This becomes your market's identifier and the ERC-4626 yield token name
  • Market Symbol: Symbol for your yield token (e.g., "LYTUSDC")
    โ†’ Lenders receive these tokens representing their supplied assets + earned interest

2Configure Your Assets Module

This is the most critical step! You must configure ALL assets in your market - both your base asset (the token lenders supply and borrowers receive) and every collateral asset that borrowers can deposit to secure their loans. Each asset needs proper risk parameters and oracle configuration.

๐Ÿ”ง Required Configurations
  • Base Asset: The token lenders supply and borrowers borrow (e.g., USDC in a USDC market)
  • Collateral Assets: Tokens borrowers deposit as security to borrow the base asset (e.g., ETH, WBTC, DAI)
  • Testing: Always test with getAssetPrice() and getAssetInfo() after configuration

๐Ÿ”„ Configuration Workflow

  1. Configure Base Asset - The token that will be supplied and borrowed (e.g., USDC)
  2. Configure Each Collateral Asset - All tokens borrowers can pledge as security
  3. Test Each Configuration - Use getAssetPrice(address) to verify oracles work
  4. Verify Settings - Use getAssetInfo(address) to confirm all parameters
  5. Check Oracle Count - Ensure you have enough active oracles per asset

๐Ÿ“‹ Configuration Examples

// Sample configuration for USDC as base asset
Asset Address: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
// Asset Configuration:
active: 1 // Enable the asset
decimals: 6 // USDC has 6 decimals
borrowThreshold: 950 // 95% LTV for stablecoin
liquidationThreshold: 980 // 98% liquidation threshold
maxSupplyThreshold: 1000000000e6 // 1B USDC (1B * 10^6)
isolationDebtCap: 0 // No isolation for base asset
assetMinimumOracles: 1 // Require at least 1 oracle
primaryOracleType: CHAINLINK // Use Chainlink as primary
tier: STABLE // Tier 0 = STABLE (lowest risk)
// Chainlink Oracle Configuration:
oracleUSD: 0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6 // USDC/USD feed
active: 1 // Enable Chainlink oracle
// Uniswap Pool Configuration (disabled for stablecoin):
pool: 0x0000000000000000000000000000000000000000 // Not using Uniswap
twapPeriod: 0
active: 0 // Disabled
๐ŸŽฏ Risk Tiers
  • STABLE (0): USDC, USDT, DAI - 95% LTV
  • CROSS_A (1): WETH, WBTC - 80% LTV
  • CROSS_B (2): UNI, LINK - 70% LTV
  • ISOLATED (3): Other tokens - 60% LTV
โšก Oracle Setup Guide
  • Single Oracle: Chainlink for stablecoins
  • Dual Oracle: Chainlink + Uniswap for volatile assets
  • Median Price: Protocol uses median when both active
  • TWAP Period: 1800s (30min) recommended
๐Ÿงช Testing Your Configuration

After configuring each asset, always test with these functions:

getAssetPrice(0xAssetAddress) - Returns price with 6 decimals
getAssetInfo(0xAssetAddress) - Returns full config
getOracleCount(0xAssetAddress) - Returns active oracles

๐Ÿ’ก Use the Asset Management tab in your market dashboard to test these functions!

โš ๏ธ Important Notes
  • Configure ALL assets (base + collateral) before launching
  • Always test with small amounts first
  • Ensure oracle feeds are active and up-to-date
  • Conservative LTV ratios reduce liquidation risk
  • Monitor your market regularly after launch

3Deposit Initial Liquidity

Bootstrap your market by supplying the initial liquidity. This provides the base asset pool that borrowers can draw from when they deposit collateral.

โœ… Best Practices
  • Supply meaningful initial liquidity (e.g., $10K+)
  • Monitor utilization rate (borrowed/supplied)
  • Watch borrow/supply APY spread
  • Consider LP incentives to attract lenders
๐Ÿ“Š What to Monitor
  • Total Value Locked (TVL)
  • Utilization rate
  • Supply and borrow APY
  • Number of active positions
๐Ÿ’ก Pro Tip: You earn fees as the market owner! Your market generates revenue through:
  • Interest rate spreads (borrowers pay more than lenders receive)
  • Liquidation penalties (when under-collateralized positions are liquidated)
  • Flash loan fees (0.09% per transaction)

๐Ÿ”ง Quick Configuration Reference

Common LTV Ratios
Stablecoins: 80-90%
Blue Chips: 70-80%
Mid Caps: 60-70%
Long Tail: 40-60%
Asset Decimals Reference
USDC, USDT: 6 decimals
WBTC: 8 decimals
ETH, DAI, most ERC-20: 18 decimals

๐Ÿค Need Help?

Our community and documentation are here to support you in building successful lending markets.