# CrossDeFi: A Novel Cross-Chain Communication Protocol
## 7 DeFi Lending and Borrowing Use Case  
For a clear understanding of the design of CrossDeFi, this section explores a use case involving DeFi lending and borrowing. This use case enables users to lend and borrow crypto-assets across two DeFi networks. The CrossDeFi framework can enhance lending and borrowing by permitting users to exchange their assets across various blockchain networks, thereby achieving seamless interoperability.  
Consider a real-world lending scenario in which two DeFi networks, DeFi X and DeFi Y, are available. DeFi X utilizes the Cosmos network, and DeFi Y uses the Polkadot network, as illustrated in Figure 6.  
The user in DeFi X holds ATOM tokens within the Cosmos network and wants to obtain USDC tokens based on the Polkadot network. The first step involves burning the ATOM tokens in the Cosmos network and recreating them in the Polkadot network as USDC. The CrossDeFi framework facilitates this cross-chain transaction by ensuring  
Figure 6: Illustration of the lending scenario between DeFi X and DeFi Y.  
security, speed, and cost-efficiency. Here, both DeFi X and DeFi Y are heterogeneous, utilizing various blockchains with different tokens and assets.  
Initially, the user in DeFi X initiates a borrowing request. As per the CrossDeFi design, the following steps are followed:  
1. The user in DeFi X initiates the transfer process by defining the amount according to the ATOM value.
2. CrossDeFi selects one miner from the MiX using Equation (5). Consider that the reliability, transaction fees, liquidity depth, and security level of a miner in a mining pool are 99%, $0.20, $750 million, and 1, respectively. BMiX has a high reliability value of 99%, based on its historical performance. The Polkadot network charges $0.20 transaction fees for ATOM transfers, and its liquidity pool value is $750 million. The security level assumption is made in the system model. Applying these values and using Algorithm 1, CrossDeFi selects the best miner node BMiX.
3. The miner sends the burning information of asset \(A\) as proof through the cross-chain bridge. It performs a bridge selection process using Equation (6). The bridge hub in CrossDeFi includes the following bridges: Acala, Snowfork, Peggy, Interlay or InterBTC, Darwinia, Thorchain, Multichain, Renbridge, Chainbridge, and Gravity Bridge. By applying the bridge-related parameters, BMiX selects the Peggy bridge as the most suitable bridge for asset \(A\) transfer.
4. In this step, BMiX forwards the asset through the Peggy Bridge to the Polkadot system. The Polkadot network converts the ATOM into USDC through a collateral process. The asset \(A\) is recreated as USDC in the Polkadot-enabled receiver DeFi. Further, the miner BMiY sends a transfer confirmation proof via smart contracts to DeFi X.  
The CrossDeFi framework streamlines the lending process across heterogeneous DeFi networks that employ Cosmos and Polkadot by leveraging different strategies. By dynamically choosing the best nodes as miners and selecting the most suitable cross-chain bridges for asset transfer, CrossDeFi enhances the overall functionality and user experience in DeFi lending and borrowing scenarios.