Pylend

DeFi lending protocol - lend PYUSD for yield or borrow against crypto collateralRetry

Pylend

Created At

ETHOnline 2025

Project Description

PyLend is a decentralized lending and borrowing protocol built on blockchain Here's what it does:

Core Functionality PyLend is a DeFi lending platform that enables:

Lending: Users can deposit PYUSD (PayPal's stablecoin) into lending pools to earn interest from borrowers. The protocol uses a dynamic interest rate model that adjusts rates based on pool utilization. Borrowing: Users can borrow PYUSD by providing other cryptocurrencies as collateral (like ETH, WBTC, etc.). The system requires over-collateralization - typically 150% or more of the loan value must be deposited as collateral. Liquidations: When loans become under-collateralized (due to collateral price drops), third-party liquidators can repay the debt and claim the collateral with a bonus, keeping the system solvent.

How it's Made

PyLend leverages a modern Web3 technology stack to create a robust decentralized lending platform. The smart contracts are developed and deployed using Hardhat, a comprehensive Ethereum development environment that provides essential tools for compiling, testing, and deploying the protocol's Solidity contracts. Through Hardhat's powerful testing framework and deployment scripts, the team ensures contract reliability and seamless deployment to Sepolia testnet, where the protocol is currently live for testing and development purposes. At the heart of PyLend's price discovery mechanism is Pyth Network, which serves a dual purpose in the architecture. On-chain, the smart contracts integrate directly with Pyth's price feeds to obtain real-time, accurate pricing data for collateral valuations and liquidation calculations. This ensures that loan-to-value ratios are constantly monitored with minimal latency and maximum accuracy. On the frontend, Pyth's price feeds are also utilized to display live market data to users, creating a unified pricing system that maintains consistency between what users see in the interface and what the smart contracts execute on-chain. This dual integration eliminates pricing discrepancies and provides users with transparent, real-time visibility into their positions. The user interface is built with Next.js, providing a performant and responsive frontend experience that seamlessly connects to the underlying smart contracts. Next.js's server-side rendering capabilities ensure fast load times and optimal SEO, while its React-based architecture enables dynamic, real-time updates of lending positions, interest rates, and collateral values. To enhance the user experience and provide efficient data querying, PyLend integrates Envio for blockchain indexing. Envio acts as a powerful indexing layer that processes and organizes on-chain events and data, making it significantly faster and more efficient to retrieve user positions, transaction history, and protocol statistics without repeatedly querying the blockchain. This indexing solution dramatically improves application performance, reduces RPC calls, and enables complex queries that would be impractical to perform directly on-chain, such as aggregating historical interest rates, tracking liquidation events, or analyzing user lending patterns over time.Retry

background image mobile

Join the mailing list

Get the latest news and updates