xycLoans Documentation

xycLoans is a safe (audited by OtterSec), 0-fees, efficient and completely decentralized flash loans-only protocol developed by the XyclooLabs team for the Soroban VM.

It has been among the very first pioneer Soroban protocols of the ecosystem with development starting as back as November 2022, and evolving along with Soroban's VM and Rust SDK.

Core principles

xycLoans is a flash loans pool standard that anyone can deploy and interact with. The pools are equipped with lending + borrowing functionality:

  • [Borrowers] borrowing a flash loan.

  • [Lenders] depositing/withdrawing into the pool.

  • [Lenders] updating/collecting the yield generated.

Another goal of xycLoans is to provide clear, efficient, concise and audited reusable code for other contracts in the ecosystem.

Why Flash Loans Only?

xycLoans only allows for flash loans for various reasons. Mainly:

  • Security: Relying on a very simple and audited architecture that doesn't rely on dependencies (think of oracles for instance) highly reduces any security risk in the protocol.

  • No Upgradability, No DAOs, No additional logic: The simplicity of the logical flows within xycLoans coupled with audited code makes it so an upgrade to the pool contract is very unlikely to happen. Thus, contracts are "static" and cannot be upgraded, meaning that they keep their decentralization without relying on additional DAO logic which can potentially be less efficient/lead to exploits.

  • 0-risk: Flash loan lending inherently means no risk for lenders as transactions get reverted when the pool isn't profiting. Keeping the protocol focused only on flash lending functionality ensures 0 risk for lenders.

  • Efficiency: The xycLoans pool contract is very small (~10 Kb) due to its simplicity and efficiency. Having feature-focused optimized contract benefits everyone: the ledger, borrowers and lenders (less instantiation costs, lower ttl costs). Of course, flash loans can also be useful when coupled with other services, but due to the above reasons this is not the case with xycLoans.


A dApp Standard

With xycLoans webapp we're also planning to establish dApp standards, especially around data retrieval. On this note, there are a few concepts to note:

  • Explorer tab. The xycLoans webapp offers an explorer tab with possibility to explore (it will be enhanced in the next versions) all the activity within the protocol. This is due to protocols having prior knowledge of the structure of the indexed data (related to their protocol), enabling protocols themselves to display a customizable explorer experience.

  • Protocol API. The protocol should provide an API or clear protocol-related data retrieval methods for other clients. As we're working with Zephyr we are soon launching xycLoans' specific API directly queriable through Mercury.

  • In-Depth & Aggregated Metrics Without Client Workload. The xycLoans API itself provides detailed data, which is aggregated ledger-by-ledger in order to provide the users with the best possible overview of a pool's activity and yield. For example, the API exposes each yield weighted by the current supply.

  • Quick, Fast, Simple Access. Exploring the webapp should not be slowed down by the data retrieval process.

Note that the webapp repository is an experimental work in progress and should currently not be used as a reference implementation for other projects.

Last updated