Documentation

Quick Start

Get up and running with Cylend in 5 minutes. This guide walks you through starting all services and making your first deposit.

Note

Before starting, make sure you've completed the Installation and Configuration steps.

Step 1: Start Ponder Indexer

Open your first terminal and start the Ponder indexer:

Terminal 1
cd cylend-indexer npm run dev

You should see output indicating that Ponder is:

  • Connecting to Mantle Sepolia and Sapphire Testnet RPCs
  • Indexing events from smart contracts
  • Starting GraphQL server at http://localhost:42069/graphql
Tip

Visit http://localhost:42069/graphql in your browser to access the GraphQL playground and explore the available queries and subscriptions.

Step 2: Start Backend Service (Optional)

Open your second terminal and start the backend service (optional for testing, but required for production):

Terminal 2
cd cylend-service npm run dev

The service will:

  • Monitor for new encrypted actions on Sapphire
  • Automatically call processAction() when actions are submitted
  • Update token prices from ROFL Oracle when needed
Caution

The backend service requires the OWNER_PRIVATE_KEY environment variable. Without it, actions won't be processed automatically and will remain pending.

Step 3: Start Frontend

Open your third terminal and start the Next.js frontend:

Terminal 3
npm run dev

Open http://localhost:3000 in your browser.

Step 4: Connect Your Wallet

On the frontend:

  1. 1
    Click the "Connect Wallet" button
  2. 2
    Select your wallet (MetaMask, Rainbow, WalletConnect, etc.)
  3. 3
    Approve the connection in your wallet
  4. 4
    Switch to Mantle Sepolia network if prompted
Note

Make sure you have testnet MNT in your wallet for gas fees. Get it from the Mantle Sepolia Faucet.

Step 5: Create Your First Deposit

Navigate to the Deposit page and create your first deposit:

  1. 1
    Go to the Deposit page
  2. 2
    Select token type (Native MNT or ERC20)
  3. 3
    Enter the amount (e.g., 0.1 MNT for testing)
  4. 4
    Click "Create Deposit" and confirm the transaction
  5. 5
    Wait for transaction confirmation
  6. 6
    Note your depositId from the success message
Tip

The depositId is your "bucket" that holds funds. You can use it for multiple actions (supply, borrow, repay, withdraw) until it's fully spent.

Step 6: Supply (Allocate) Capital

Now let's supply capital to the lending pool:

  1. 1
    Navigate to the Allocate (Supply) page
  2. 2
    Select the deposit you created (or create a new one)
  3. 3
    Enter the amount to supply (must be ≤ remaining deposit amount)
  4. 4
    The frontend encrypts your action payload client-side
  5. 5
    Submit the action and confirm the transaction
  6. 6
    Monitor the action status: Pending → Processing → Processed
Note

The action goes through multiple steps:

  • 1. Submitted to Mantle (Ingress contract)
  • 2. Relayed to Sapphire via Hyperlane
  • 3. Stored encrypted in LendingCore
  • 4. Processed by backend service
  • 5. Position updated on Sapphire

Step 7: Check Your Position

After your supply action is processed, you can check your position:

  • View the Dashboard to see your total allocated capital
  • Check the Pools page to see liquidity metrics
  • Visit the Records page to view your action history
  • Query the Ponder GraphQL API for detailed position data

Congratulations! 🎉

You've successfully:

  • Set up all Cylend components
  • Created a deposit bucket
  • Supplied capital to the lending pool
  • Experienced cross-chain privacy-preserving lending!

Next Steps

Continue exploring Cylend: