# Optional: Use beta market for testing
NEXT_PUBLIC_SUILEND_USE_BETA_MARKET=false
# Your Sui RPC endpoint (optional, defaults to mainnet)
SUI_RPC_URL=https://fullnode.mainnet.sui.io
Basic Setup
1. Initialize the Client
2. Check Your Existing Obligations
Before performing any operations, check if you already have obligations:
Tutorial 1: Your First Deposit
Let's start by depositing SUI tokens to earn interest:
Tutorial 2: Borrowing Against Your Collateral
Now let's borrow USDC against your SUI collateral:
Tutorial 3: Claiming Rewards
Claim rewards from liquidity mining programs:
Tutorial 4: Repaying Your Loan
Repay borrowed tokens to reduce your debt:
Tutorial 5: Withdrawing Your Collateral
Withdraw your deposited collateral:
Complete Example: Full Lending Flow
Here's a complete example that demonstrates the full lending lifecycle:
Best Practices
1. Error Handling
Always wrap SDK calls in try-catch blocks and handle specific error cases:
2. Gas Management
Set appropriate gas budgets for complex transactions:
3. State Refreshing
Always refresh obligation state before operations that depend on current prices:
4. Batching Operations
Combine multiple operations in a single transaction for better gas efficiency:
Next Steps
Read the [API Reference] for detailed method documentation
Explore the [main README] for advanced features
Check out the admin functions for protocol management