Documentation

Getting Started with Cylend

Welcome to Cylend! This guide will help you understand and start using our privacy-preserving credit infrastructure.

What is Cylend?

Cylend is a privacy-preserving credit infrastructure built on Mantle and Sapphire networks. It enables users to supply capital, borrow against collateral, and manage lending positions while keeping all sensitive details encrypted and private.

Key Features

  • Privacy-First: All action details (amount, token, counterparty) are encrypted using Sapphire's confidential computing
  • Cross-Chain: Seamless communication between Mantle (public deposits) and Sapphire (private computation)
  • Non-Custodial: You maintain full control of your funds at all times
  • Automated Processing: Backend service handles action processing automatically

How Does It Work?

Cylend operates across two blockchain networks:

Mantle Sepolia

Handles deposit creation and settlement. The PrivateLendingIngress contract manages:

  • • Deposit creation (native & ERC20)
  • • Action submission
  • • Fund releases

Sapphire Testnet

Performs private computation. The LendingCore contract handles:

  • • Encrypted action processing
  • • Lending logic & health factors
  • • Private position tracking
Note

Communication between networks is facilitated by Hyperlane, a cross-chain messaging protocol that ensures secure message relay.

Prerequisites

Before you begin, ensure you have the following:

Development Environment

  • • Node.js ≥ 18.14
  • • npm, yarn, pnpm, or bun
  • • Git

Wallets & Testnet Tokens

  • • Web3 wallet (MetaMask, Rainbow, WalletConnect compatible)
  • • Mantle Sepolia testnet MNT (for gas fees)
  • • Sapphire Testnet ROSE (for gas fees)
  • • Test tokens: USDC, USDT, WMNT (optional, for testing)
Tip

Get testnet tokens from faucets:

Architecture Overview

Cylend consists of three main components that work together:

1. Frontend (Next.js)

User interface for wallet connection, deposits, and lending operations. Built with Next.js, React, Wagmi, and RainbowKit.

2. Ponder Indexer

Indexes blockchain events from both Mantle and Sapphire, providing a GraphQL API for querying deposits, actions, and positions.

3. Backend Service (Optional)

Automated service that monitors pending actions and calls processAction()on the LendingCore contract. Required for production deployment.

Important

The backend service is required because processAction() on LendingCore is an owner-only function that can't be called directly from the frontend.

Next Steps

Now that you understand the basics, here's what to do next: