project screenshot 1
project screenshot 2
project screenshot 3

XChain Lend

A cross-chain lending and borrowing platform that helps users to lend and borrow tokens across different chains using Chianlink ccip.

XChain Lend

Created At

Superhack 2024

Project Description

The project aim is to create a unified lending and borrowing platform where users can lend tokens on one chain while having collaterals on different chain. The XChain Lend uses chain link ccip to achieve the cross chain interaction. A user who has ETH token in Optmism can use this token to borrow USDC in Base network. And also users from different chain can supply tokens to the protocol in order to get some interest. The protocol is mainly on Base network. but there are multiple contracts on different chains that users are going to interact with. For example a user who wants to lend his tokens in Optimism can interact with Optimism protocol and supply to token. The sub protocol then transfers the token and users data to the main base network contract using ccip.

How it's Made

The smart contract is written in foundry. Looking at the smart contract, The project uses chainlink CCIP to interact with different chains in order to recieve tokens and data from multiple chians. The main contract is LendProtocol.sol which stores all the users data with the tokens deposited and withdrawn. There are other contract like LendToken, DepositCollateral, PayBack contract. This contracts are sub contract that take data and token from the users and interact with the LendProtocol. so the Lendprotocol takes message and data only from the subcontracts only. The frontend is built using thirdweb starter react package. It has simple and easy to use UI.

background image mobile

Join the mailing list

Get the latest news and updates