# Yelay's Mission

Yelay reimagines the potential of idle digital assets, pioneering the concept of "**Yield as a Carrier of Value.**"

### Our Mission

Yelay's mission is to unlock the full potential of idle digital assets by providing a robust, multi-chain infrastructure that empowers businesses to create innovative, yield-driven products and experiences for their customers.

### Our Vision

We envision a future where yield generation is seamlessly integrated into everyday digital experiences. A world where businesses can offer self-sustaining rewards and services and users can effortlessly put their assets to work in easy-to-use ways with businesses they trust, all without sacrificing security or control.

<figure><img src="/files/IpL2XgMV8j6F3YUhMk1G" alt=""><figcaption></figcaption></figure>

### Yield as a Carrier of Value

At Yelay, we're redefining the concept of yield. Instead of viewing yield as a byproduct of holding digital assets, we see it as a powerful carrier of value in itself. This approach to the latent value of digital assets opens up a world of possibilities:

* Businesses can create self-funding loyalty programs and innovative financial products.
* Users can access services and experiences funded entirely by the yield on their assets.
* The line between saving and spending blurs, as idle assets continuously generate value.

### The Yield Layer

Yelay is the crucial middleware that scales DeFi - The Yield Layer. We provide the infrastructure and tools that allow businesses to easily integrate yield-generating capabilities into their applications, without the need for deep DeFi expertise or significant resource investment.

### Key Features

* Multi-chain support for maximum flexibility and opportunity
* Customizable yield vaults for tailored strategies
* Non-custodial design ensuring user asset security
* Partner token emissions for portfolio diversification

In the following pages, you'll discover how Yelay is transforming the DeFi landscape, the mechanics of our innovative system, and the vast potential it holds for businesses and users alike. Whether you're a developer looking to integrate yield features, a business seeking new ways to engage customers, or simply curious about the future of finance, Yelay offers a glimpse into a world where idle assets become engines of continuous value creation.

## Welcome to the future of yield. Welcome to Yelay.


# DeFi Yield Challenges

Imagine a world where managing your digital assets feels like navigating a maze blindfolded. For many, that's the reality of DeFi (Decentralized Finance) today. It's a landscape fraught with complexity, time-consuming processes, and hidden risks.

For the average user, maximizing returns on their assets is like playing a high-stakes game of whack-a-mole. New yield opportunities appear daily, each promising better returns. However, understanding and accessing these opportunities requires near-expert knowledge.&#x20;

This complexity means businesses looking to offer yield-generating products to their customers face significant technical challenges, often requiring teams of specialists and significant resources just to get started.

This inefficient system is a bottleneck for DeFi adoption, limiting who can participate in yield opportunities and hampering innovation.&#x20;

DeFi yield needs to simplify the complex, automate the time-consuming, and mitigate the risks inherent in yield generation. That's where Yelay comes in.&#x20;

<figure><img src="/files/oFTtpb75lGlhMywxxuGo" alt=""><figcaption></figcaption></figure>

### **Complex**

DeFi's diverse landscape of yield-generating protocols across multiple blockchains overwhelms users with intricate options, from lending platforms to exotic derivatives. Understanding each protocol's nuances, interactions, and investment suitability creates a significant barrier for newcomers and challenges experienced users to keep pace with rapid innovations.

### **Time-Consuming**

DeFi's volatile yields necessitate constant portfolio monitoring and adjustment across multiple platforms. This demands frequent assessments, yield tracking, and strategic decisions, incurring time costs and gas fees. The resulting "time-crunch" problem hinders widespread adoption and sustainable engagement in the ecosystem.

### **Risky**&#x20;

DeFi's high yields come with multifaceted risks that are difficult to assess, including smart contract vulnerabilities, liquidity issues, and regulatory uncertainties. Calculating risk-adjusted returns requires deep understanding of complex, interrelated factors, often beyond individual investors' capabilities. This can lead to capital misallocation and exposure to hidden risks.


# Integration Challenges for Businesses

Businesses are increasingly looking to incorporate new technical solutions to enhance their existing product and service offerings. DeFi is no exception, and the prospect of incorporating yield-generating features into its products is attractive.&#x20;

However, this integration process is fraught with challenges that can be daunting, even for well-established companies with significant resources. &#x20;

### Technical Barriers

Integrating DeFi yield features requires deep blockchain and smart contract expertise. Businesses must navigate complex multi-chain interactions, prioritizing security to prevent financial losses. This specialized knowledge creates a high entry barrier, making safe DeFi incorporation challenging for many.

### Resource Intensive&#x20;

DeFi integration demands substantial time and capital investment. The evolving landscape requires dedicated teams for development, security, and maintenance. Constant updates are necessary to address vulnerabilities and new opportunities, straining resources, especially for smaller businesses and startups.

### Unscalable&#x20;

Operating across multiple blockchains complicates DeFi integration, requiring the management of diverse wallet integrations and cross-chain transfers. The pressure to quickly adapt to new protocols and maintain competitive yields stretches resources and technical capabilities, making it difficult for businesses to scale their DeFi offerings effectively.


# DeFi Yield Made Simple

<figure><img src="/files/BGSHltzaalbZruhC3Rkf" alt=""><figcaption></figcaption></figure>

Yelay is a game-changing solution for DeFi accessibility, transforming complex yield generation into a streamlined, efficient process. By addressing the key pain points individuals and businesses face, Yelay simplifies DeFi yield, making it accessible to a broader audience while unlocking new possibilities for innovation.

Yelay provides a clear path through the maze of options and technical hurdles. It automates the intricate processes of yield optimization, reducing the time and expertise required to take advantage of DeFi yield.

Yelay's plug-and-play solution for businesses significantly lowers the barriers to entry for offering yield-generating products.

By succinctly addressing the challenges that currently define the DeFi landscape, Yelay paves the way for wider industry adoption. It empowers users to maximize their returns without the need for expert knowledge, and enables businesses to innovate freely without being bogged down by technical limitations.

### Smart Yield

Yelay's Smart Yield feature simplifies DeFi navigation by using intelligent algorithms to automatically allocate assets to blue-chip yield opportunities. It continuously analyzes and routes assets across protocols, optimizing returns while balancing profitability and security. This eliminates the need for users to become experts in every new protocol or strategy.

### Comprehensive Coverage

Yelay offers broad access to curated, high-quality yield strategies across various sectors and blockchain ecosystems, including RWAs, DeFi lending, LSDs, and restaking. This eliminates the need for users to manage multiple platforms or constantly search for new opportunities, saving time on research and due diligence.

### Automated Management

Yelay's system continuously monitors market conditions, yield rates, and risk factors, automatically rebalancing user portfolios to maintain optimal positioning. It includes sophisticated risk assessment models that consider factors beyond APY, providing users with a comprehensive view of risk-adjusted returns and saving time on constant portfolio management.


# Plug-and-Play Integration

Yelay's plug-and-play solution redefines how businesses can integrate DeFi yield features into their products. By addressing the major pain points of technical complexity, resource intensity, and scalability, Yelay empowers businesses of all sizes to innovate in the DeFi space without the traditional barriers.

<figure><img src="/files/0pudRXBqgKi3JWe1rADT" alt=""><figcaption></figcaption></figure>

### Easy Implementation

Yelay's SDK simplifies DeFi integration, abstracting complex blockchain interactions into easy-to-use APIs. This reduces the need for specialized knowledge, allowing even non-technical teams to implement yield-generating features quickly and safely while focusing on their core competencies.

### Multi-Chain Support

Yelay provides uniform access to yield sources across major blockchain networks, handling cross-chain operations and wallet integrations. This unified approach ensures consistent user experience and simplifies backend management, allowing businesses to easily expand their offerings as new blockchains emerge.

### Scalable and Secure

Yelay's infrastructure is designed for scalability and security and is suitable for businesses of all sizes. Rigorous third-party audits and continuous monitoring ensure robust protection. This allows businesses to quickly bring innovative yield-generating products to market without heavy investment in specialized teams or ongoing maintenance.


# Supported Protocols and Chains

Yelay's strength lies in its extensive network of supported protocols and blockchain networks. This broad coverage ensures that users have access to a diverse range of yield-generating opportunities, while businesses can offer comprehensive DeFi products without the complexity of managing multiple integrations.

Our ecosystem is continuously expanding, adapting to the evolving DeFi landscape to provide the best possible yield opportunities. We carefully curate our list of supported protocols, ensuring they meet our stringent standards for security, performance, and reliability.

<figure><img src="/files/zQ1uQJpSWnbMCZaJBwdD" alt=""><figcaption><p>This image shows some of the protocols where Yelay deposits users' funds in order to aggregate the best yield.</p></figcaption></figure>


# Current Chains

Yelay currently operates on the most prominent blockchain networks in DeFi:

### Ethereum Mainnet

As the pioneer of smart contract platforms, Ethereum remains a cornerstone of the DeFi ecosystem. Yelay leverages Ethereum's robust security and vast array of established protocols to offer reliable, battle-tested yield opportunities.

[Perq](https://perq.finance/) has launched its launchpool protocol on Mainnet using Yelay V3:\ <br>

<figure><img src="/files/XYq1c8kqgK3gxRf8wo67" alt=""><figcaption></figcaption></figure>

### Base&#x20;

An Ethereum Layer 2 scaling solution, Base provides faster transactions and lower fees while maintaining Ethereum's security guarantees. Yelay's integration with Base allows users to access yield opportunities with improved efficiency and cost-effectiveness.

One of the applications that has been launched on Base is [Monstro.fun.](https://monstro.fun/toolz/syr)

<figure><img src="/files/OOqb5uirPy4g6o9ySkjt" alt=""><figcaption></figcaption></figure>

### Sonic&#x20;

We're excited to announce expansion to Sonic, Layer 2 network previously called Fantom. [Yelay App on Sonic](https://app.yelay.io/sonic) allows farming biggest yield on Sonic, Sonic's activitiy points, Gem points, as well as points from the strategy protocols like Euler and Silo in one go.

<figure><img src="/files/9WpZiZgRP92WQ36PHpsr" alt=""><figcaption><p>Yelay's app on Sonic</p></figcaption></figure>

$YLAY token has been deployed to Sui, therefore, users of Sui blockchain can [trade YLAY/SUI pair](https://dexscreener.com/sui/0x71a6226843a7fda7c7443dbbe6406bc4735204d55018c9accd2387f39430b9d6?__cf_chl_rt_tk=hwelGlWQM5PCFKQI0x1GnFrnv4gMpvwJXuu8ycC3M8Q-1746447068-1.0.1.1-JbYVeq116CIU0D1BFE.ShqDZxJY2TnGtBQtV127ZbOk) on this 1st non-EVM blockchain supporting $YLAY.

Yelay is committed to expanding its blockchain support and always evaluates new networks that align with our standards for security, efficiency, and user demand.


# Current Protocols

Yelay integrates with a carefully curated selection of DeFi protocols chosen for their reliability, innovation, and potential for generating competitive yields.&#x20;

### Protocol Integrations on Yelay V3 (current version)

1. [Aave](https://aave.com/) - A leading decentralized lending protocol
2. [Morpho ](https://morpho.org/)- An efficiency layer for lending and borrowing
3. [Euler](https://www.euler.finance/) - Lending super-app used by Yelay on Sonic
4. [Silo](https://www.silo.finance/) - Isolated lending markets used by Yelay on Sonic

<figure><img src="/files/gj7YRmc6crH7BtcCvEy0" alt=""><figcaption></figcaption></figure>

### Protocol Integrations on Yelay V2 (old version)

1. [Aave](https://aave.com/) - A leading decentralized lending protocol
2. [Compound ](https://compound.finance/)- One of the original lending and borrowing platforms in DeFi
3. [Convex Finance](https://www.convexfinance.com/) - A yield optimizer for Curve Finance
4. [Curve ](https://curve.fi/)- A decentralized exchange optimized for stablecoin trading
5. [Ethena ](https://ethena.fi/)- An innovative synthetic asset platform
6. [Gearbox ](https://gearbox.fi/)- A generalized leverage protocol
7. [Morpho ](https://morpho.org/)- An efficiency layer for lending and borrowing
8. [Origin Protocol](https://www.originprotocol.com/) - A platform for building decentralized marketplaces
9. [Rocket Pool](https://rocketpool.net/) - A decentralized Ethereum staking service
10. [Frax Finance](https://frax.finance/) - A fractional-algorithmic stablecoin system
11. [Lido](https://lido.fi/) - A liquid staking solution for various blockchain networks
12. [Yearn Finance](https://yearn.fi/) - An automated yield aggregator

### Approach

Our team continuously monitors the DeFi landscape, evaluating new protocols and integrating those that offer unique value or superior yield opportunities. This ongoing expansion ensures that Yelay users always have access to the best, risk-averse and 'BlueChip' type of yield-generating strategies in the rapidly evolving industry.


# Key Features

Yelay is built on a foundation of innovative features designed to simplify, optimize, and secure the DeFi yield generation process. These key features work together to create a comprehensive, secure, and user-friendly platform for yield optimization, setting Yelay apart in the rapidly evolving financial landscape.

<figure><img src="/files/TX0a4n0gKOsRzH5iHgOw" alt=""><figcaption></figcaption></figure>

Key features include

### Smart Yield

Yelay's intelligent system optimizes asset allocation by continuously analyzing market conditions, yield rates, and risk factors across supported protocols. It features real-time monitoring, risk-adjusted yield calculations, automatic rebalancing, and gas-efficient transactions, ensuring maximum risk-adjusted returns.

### Customizable Yield Vaults

Allows the creation of bespoke yield-generating strategies with flexible asset selection, customizable risk parameters, and options for combining multiple strategies. Suitable for businesses offering unique yield products or advanced users seeking personalized strategies.

### Analytics and Reporting

Provides deep insights into yield-generating activities with real-time performance tracking, detailed breakdowns of allocations and returns, historical data analysis, customizable dashboards, and export functions for informed decision-making.

### Non-Custodial Structure

Ensures security and compliance by allowing users to retain full control of assets, utilizing audited smart contracts, eliminating single points of failure, complying with various jurisdictions, and maintaining transparent, on-chain verifiable operations.


# Case Studies and Applications

Yelay's innovative yield infrastructure has already begun to DeFi, enabling a wide range of businesses to create unique, value-driven products and services.&#x20;

The following case studies demonstrate the versatility and potential of Yelay's "Yield Layer," from enhancing traditional crypto wallets with dynamic yield opportunities to creating new paradigms in earn programs.&#x20;

<figure><img src="/files/49gYTEASfUGQwL6EGnvJ" alt=""><figcaption></figcaption></figure>


# Armor Wallet

Armor Wallet leverages Yelay's infrastructure to offer dynamic yield opportunities within its AI trading-assisted, non-custodial, multichain wallet.

<figure><img src="/files/bekQT5xS8QS3W4jSSIWh" alt=""><figcaption></figcaption></figure>

### Key Features

* Seamless integration of Yelay's yield optimization within a user-friendly wallet interface
* AI-assisted trading combined with automated yield generation
* Multi-chain support for a comprehensive DeFi experience

### Impact

By integrating Yelay, Armor Wallet has supercharged its AI-integrated wallet environment with a powerful tool for asset growth. Users can now benefit from AI-driven trading strategies while simultaneously earning optimized yields on their idle assets, all within a single, secure platform.


# Perq

Perq utilizes Yelay to enable multichain yield farming, providing users access to blue-chip DeFi pools where they can exchange the yield on their assets for rewards and token allocations.

<figure><img src="/files/GYTlbCoCUBD7VlFlmVtQ" alt=""><figcaption></figcaption></figure>

### Key Features

* Access to a curated selection of high-quality DeFi yield pools across multiple chains
* Automated yield farming with optimized returns
* Unique reward system that converts yield into platform-specific tokens and benefits

### Impact:

Perq's integration of Yelay has allowed it to offer a sophisticated yield farming service without requiring extensive in-house development resources, deploying in weeks rather than months or quarters. Users benefit from professional-grade yield optimization, allowing them to make the most of the perks offered through Perq's reward system. This combination creates a compelling value proposition for new projects seeking low-risk capital and investors seeking allocations to upcoming Web3 opportunities.&#x20;


# Wayex

Wayex incorporates Yelay's technology to offer plug-and-play access to DeFi yield opportunities. It provides Earn products that leverage RWA, DeFi, and more, all of which are usable at point-of-sale terminals via the Wayex debit card.

<figure><img src="/files/ecfwL1uvOOcyawJijBMZ" alt=""><figcaption></figcaption></figure>

### Key Features

* Seamless integration of yield-generating assets with real-world spending opportunities&#x20;
* Diverse portfolio of Earn products spanning traditional DeFi and Real World Assets (RWA)
* User-friendly interface that simplifies complex DeFi strategies for the average consumer

### Impact

By partnering with Yelay, Wayex has created a bridge between DeFi yield generation and everyday financial activities. Users can easily earn yields on their assets and then spend those earnings directly through their Wayex debit card, making DeFi benefits tangible and accessible to a broader audience.


# Yield Funded Products

Yelay's innovative infrastructure opens up a world of possibilities for businesses to create unique, yield-funded products and services. By leveraging Yelay's technology, companies can offer their customers exciting rewards and experiences, all powered by the yield generated from securely held digital assets.

The Concept: Yield-funded products represent a paradigm shift in how businesses can incentivize and reward their customers. Instead of traditional loyalty programs or discounts, companies can offer products or services that are essentially "self-paying" through the yield generated on the customer's collateralized assets.

### Examples of Yield-Funded Products

1. **Self-Paying Gift Cards:** Customers deposit assets, and the yield funds gift card balances over time.
2. **Travel and Experiences:** Accumulate points or credits for flights, hotels, or unique experiences.
3. **Apparel and Merchandise:** Earn brand-specific items through yield generation.
4. **Subscription Services:** Use yield to pay for streaming services, software subscriptions, or news outlets.
5. **Charitable Donations:** Direct yield to chosen causes, creating passive philanthropy.
6. **Education and Courses:** Fund online courses or educational materials through asset yield.
7. **Gaming and Entertainment:** Unlock in-game items or content using generated yield.

### Benefits for Businesses

1. **Plug-and-Play Integratio**n: Yelay's infrastructure allows for easy implementation, reducing technical barriers.
2. **Enhanced Customer Experience:** Offer unique, value-added services that set you apart from competitors.
3. **Increased Customer Lifetime Value:** Encourage long-term engagement and asset retention.
4. **New Revenue Stream:** Businesses can offer rewards at a rate higher than their cost basis, creating a profitable model.
5. **Risk Mitigation:** Yelay's secure, non-custodial structure ensures customer assets remain safe.

### Benefits for Customers

1. **Passive Rewards:** Earn products or services without additional out-of-pocket expenses.
2. **Asset Appreciation:** While earning yields, the underlying assets can still appreciate in value.
3. **Flexibility:** Choose from a variety of reward options tailored to individual preferences.
4. **Security:** Assets remain secure and under customer control through Yelay's non-custodial structure.

### Practical Implementation

The implementation of yield-funded products through Yelay offers businesses a power way to engage customers. By integrating Yelay's SDK, companies enable their users to collateralize digital assets, with the generated yield automatically funding chosen rewards and creating a seamless experience where customers can earn tangible benefits without touching their principal investment.

As DeFi continues to grow, the potential for innovative yield-funded products is boundless. From everyday purchases to luxury experiences, Yelay's infrastructure is paving the way for a new era of customer rewards from digital asset yield.&#x20;


# YLAY Explained

The YLAY token is the heart of the Yelay ecosystem, serving as the cental tool that powers the platform's operations and rewards its participants. As your plug-and-play ticket to DeFi yield, YLAY offers holders a range of benefits and utilities within the Yelay network.

One of the primary functions of YLAY is to facilitate access to Yelay's robust yield-generating infrastructure. Through a system of Infrastructure Credits (ICs), YLAY holders can tap into the platform's capabilities, enabling businesses to create innovative yield-funded products and services.

YLAY also serves as the backbone of Yelay's node system. Node operators, who play a vital role in maintaining and securing the network, are rewarded with YLAY emissions. This creates a sustainable ecosystem where participants are incentivized to contribute to the network's growth and stability.

Furthermore, YLAY stakers benefit from partner token emissions. As Yelay continues to expand its partnerships and integrations, YLAY holders gain exposure to a diverse array of tokens from Yelay's partner projects, enhancing the potential for returns and diversifying YLAY holders' portfolios.

Perhaps most excitingly, YLAY offers holders a share in the success of the Yelay platform. As more businesses integrate Yelay's technology and the network grows, YLAY holders stand to benefit from a portion of the revenue generated from these integrations.

<figure><img src="/files/RDLPTkum7aL4JS9fVyg3" alt=""><figcaption></figcaption></figure>


# Yelay Nodes

Yelay Nodes are a fundamental component of the Yelay ecosystem, playing a crucial role in the network's operation, security, and scalability. These nodes form the backbone of Yelay's infrastructure, enabling the efficient distribution of yield-generating opportunities and processing transactions within the network.

Yelay Nodes are specialized participants in the network that contribute computational resources and YLAY tokens to support the platform's operations. They act as validators, processors, and distributors of yield-generating strategies across the Yelay ecosystem.

### Key Functions

1. Ensure network decentralization
2. Distribute YLAY token emissions
3. Allocate partner tokens

Node operators must stake YLAY tokens, meet technical requirements, and offer incentives to attract stakers. Benefits include YLAY rewards, accelerated Infrastructure Credit generation, and delegation rewards.

The economic model aligns node operators' interests with network health through proportional reward distribution, slashing mechanisms for unreliability, and competitive delegation incentives.

As Yelay grows, nodes will play an increasingly important role in supporting new yield strategies, integrating with emerging DeFi protocols, and maintaining network efficiency at scale.


# Infrastructure Credits (ICs)

Infrastructure Credits (ICs) are the key to accessing Yelay's robust suite of smart contracts. Like Amazon AWS credits, ICs allow businesses to pay for using Yelay's infrastructure, ensuring a fair and scalable system for all participants.

### How Infrastructure Credits (ICs) Work

1. **Purchasing ICs**: Companies can buy Infrastructure Credits directly from Yelay. This straightforward option allows businesses to integrate Yelay's technology into their products or services quickly.
2. **Generating ICs through Staking**: YLAY token holders can stake their tokens to generate Infrastructure Credits. By converting YLAY to sYLAY (staked YLAY), users begin earning ICs, which can be used personally or sold to businesses needing access to Yelay's infrastructure.
3. **Node Creation and Delegation:** For businesses requiring a significant amount of ICs or looking to maximize their involvement in the Yelay ecosystem, creating a node is an attractive option. Nodes generate ICs faster and can attract additional YLAY stakers, multiplying their IC generation.

### Node Operator Strategies

When a business creates a node, it opens up opportunities for other YLAY holders to stake their tokens (as sYLAY) to that node. This introduces an element of game theory to the Yelay ecosystem:

Node operators must offer incentives to attract sYLAY from holders. These incentives can take various forms:&#x20;

* Sharing the YLAY tokens generated from node emissions
* Offering their native tokens as additional rewards
* Providing a combination of YLAY and native tokens.

The more sYLAY a node attracts, the more Infrastructure Credits it generates, creating a positive feedback loop that benefits both the node operator and the stakers. Businesses must strategically balance their need for ICs with the incentives they offer to attract stakers, optimizing the cost of accessing Yelay's infrastructure.

### Ecosystem Dynamics

This system creates a dynamic ecosystem where:

1. YLAY token holders have multiple options for putting their tokens to work, choosing between different nodes based on the incentives offered.
2. Businesses can choose to buy ICs directly for simplicity or engage more deeply with the ecosystem by creating nodes and attracting stakers.
3. The competition between nodes to attract stakers drives innovation in reward structures, potentially leading to more efficient and attractive staking options over time.
4. The overall demand for YLAY tokens is driven by both the need for Infrastructure Credits and the potential rewards from staking, creating a robust token economy.

By implementing this Infrastructure Credit system, Yelay ensures that access to its smart contracts is both flexible and aligned with the interests of all participants in the ecosystem. Whether a business needs occasional access or is deeply integrated with Yelay's technology, there's a path to obtain the necessary Infrastructure Credits while contributing to the network's growth and stability.


# Node Emissions

Node Emissions are a crucial aspect of the Yelay ecosystem, designed to incentivize long-term participation and ensure the sustainable growth of the network. This mechanism rewards YLAY token holders who stake their tokens to nodes, providing them with additional YLAY tokens over time.

### How Node Emissions Work

1. **Staking for sYLAY**: Users can stake their YLAY tokens to a node of their choice. In return, they receive sYLAY (staked YLAY) tokens, representing their stake in the node.
2. **Regular Emission Schedule:** Node emissions occur periodically, and new YLAY tokens are distributed to stakers based on the proportion of sYLAY held.
3. **Initial Lock Period**: When emitted, new YLAY tokens are automatically locked for a minimum duration of 1 year as additional sYLAY tokens. This ensures a level of commitment from participants and helps stabilize the token supply.
4. **Unlocking Options:**&#x20;
   1. **After 1 Year:** Upon the lapse of the initial 1-year lock period, stakers can choose to unlock their emitted YLAY tokens. However, doing so incurs a deprecation (the exact rate to be determined), meaning they'll receive less than the full amount emitted.
   2. **Full 4-Year Lock:** If stakers choose to lock their emitted tokens for the full duration of 4 years, they receive the entire amount of emitted YLAY tokens without any deprecation.
5. **Gradual Unlocking:** The unlocking process is gradual, occurring over time to prevent sudden supply shocks to the ecosystem.

### The vo Model

This emission and unlocking structure is based on the "vo" (vote-escrowed) model, which has gained popularity in DeFi for its ability to align long-term incentives.&#x20;

Key benefits of this model include:

1. **Long-term Alignment**: By incentivizing longer lock-up periods, the model encourages participants to take a long-term view of their involvement in the Yelay ecosystem.
2. **Supply Stability**: The gradual unlocking process helps maintain a stable token supply, reducing potential market volatility.
3. **Sustainable Growth**: By distributing emissions over time and incentivizing long-term holding, the model supports the sustainable growth of the Yelay ecosystem.

This emission model presents stakers with strategic choices. They must balance the potential for higher returns from longer lock-up periods against the flexibility of shorter-term access to their tokens. This dynamic creates a diverse ecosystem of participants with varying levels of commitment and involvement.


# Partner Token Emissions

Partner Token Emissions represent a unique and powerful feature of the Yelay ecosystem, transforming the YLAY token into a dynamic portfolio diversification tool. This mechanism allows YLAY holders to gain exposure to a variety of new and established tokens within the broader cryptocurrency landscape.

### Infrastructure Credit Payments in Partner Tokens

Yelay offers businesses the flexibility to pay for Infrastructure Credits (ICs) using their native tokens instead of traditional payment methods. This arrangement benefits both Yelay and its business partners:

1. **For businesses**: This option allows them to leverage their native token to access Yelay's infrastructure, potentially providing a more capital-efficient way to integrate Yelay's services.
2. **For Yelay**: It creates a diverse token portfolio that can be distributed to YLAY stakers, enhancing the value proposition of the YLAY token.
3. **For YLAY holders**: This results in exposure to a wide range of tokens, effectively turning their YLAY stake into a diversified crypto portfolio.

The process works by businesses negotiate with Yelay to pay for ICs using their native token. Yelay then allocates these partner tokens to be emitted to sYLAY holders, and the partner tokens are distributed pro-rata to all sYLAY holders, regardless of which node they're staking to.

### Additional Incentives from Business-Operated Nodes

Beyond the ecosystem-wide partner token emissions, individual businesses operating Yelay nodes can offer additional incentives using their native tokens:

1. **Node-Specific Allocations**: A business operating a node can choose to allocate extra amounts of their native token specifically to users who stake YLAY to their node.
2. **Competitive Advantage:** This creates a unique selling point for the node, potentially attracting more YLAY stakers and increasing the node's influence in the network.
3. **Targeted Distribution:** Businesses can use this mechanism to distribute their token to users who are actively engaged in the Yelay ecosystem, potentially creating a more involved and loyal user base.

### Benefits of Partner Token Emissions:

1. **Portfolio Diversification**: YLAY holders gain exposure to a range of tokens without needing to actively trade or manage multiple positions.
2. **Access to New Projects**: Stakers can potentially access tokens from new and innovative projects that are partnering with Yelay.
3. **Increased YLAY Utility**: The prospect of receiving various partner tokens increases the attractiveness of holding and staking YLAY.
4. **Ecosystem Growth**: This mechanism incentivizes businesses to become more deeply involved in the Yelay ecosystem, potentially driving further adoption and integration.
5. **Aligned Incentives**: Businesses are encouraged to ensure the long-term success of both their own token and the Yelay ecosystem.

Partner Token Emissions create a win-win-win scenario for Yelay, its business partners, and YLAY token holders. By creating this unique value proposition, Yelay positions itself as not just a yield generation platform, but as a gateway to a diverse array of blockchain projects and tokens. This feature significantly enhances the appeal of the YLAY token, potentially driving greater adoption and long-term value for the entire Yelay ecosystem.


# YLAY Staking

## Introduction

YLAY staking is a core mechanism of the Yelay protocol that allows token holders to participate in protocol governance and earn rewards. By staking YLAY tokens, users receive non-transferable sYLAY (shard YLAY) which represents their share of protocol rewards, including integrator rewards and partner token distributions.

> 💡 **Key Concept**: The more sYLAY you hold, the larger your share of protocol rewards.

<figure><img src="/files/Axnz68CBdnStRNJ9uorH" alt=""><figcaption></figcaption></figure>

## Staking Methods

### :watch: Gradual Staking

Gradual staking offers users a flexible approach to accumulating sYLAY over time. When you choose this method, your sYLAY accumulates linearly across a 208-week period, allowing you to earn rewards while maintaining the freedom to unstake at any time. This option is particularly attractive for users who value liquidity and want the flexibility to adjust their position as needed. While unstaking is available at any time, it's important to note that this action will result in the loss of all accumulated sYLAY, requiring you to start fresh if you choose to stake again.

### :unlock: Locked Staking

Locked staking provides an accelerated path to sYLAY accumulation by offering an immediate boost to your sYLAY balance in exchange for committing your YLAY tokens for a specified period. This method appeals to users who are confident in their long-term commitment to the protocol and are willing to temporarily forfeit liquidity in exchange for enhanced rewards. During the lock period, you cannot unstake your YLAY tokens, but you benefit from an upfront increase in your sYLAY balance that would have otherwise taken weeks or months to accumulate through gradual staking.

<figure><img src="/files/R4xSooXZmN6bJTSFBAlT" alt=""><figcaption><p>Various staking tranches: locked and gradual</p></figcaption></figure>

## Understanding sYLAY

sYLAY serves as your reward-earning representation within the Yelay ecosystem. As a non-transferable token, sYLAY directly reflects your stake in the protocol and determines your proportional share of rewards. The way you accumulate sYLAY varies based on your chosen staking method, with each approach offering distinct advantages. It's crucial to understand that your sYLAY balance is tied to your staking commitment – if you choose to unstake your YLAY tokens, you'll forfeit your accumulated sYLAY, except for amounts earned during locked periods. This mechanism encourages long-term participation and alignment with the protocol's goals.

## What Happens After Lock Expiry?

When your locked staking period comes to an end, your position transitions to what we call "Unlocked YLAY." During this phase, your staking rewards temporarily pause, but you gain the flexibility to choose your next steps. You can either unstake your position, which will result in you losing your accumulated sYLAY, or continue locking to maintain these sYLAY rewards. This transition period requires active management of your position, as your YLAY tokens remain in the contract but aren't generating additional sYLAY until you take action. The choice between claiming and re-locking allows you to adapt your strategy based on current market conditions and your investment goals.

## Choosing Your Staking Strategy

Consider these factors when selecting your staking method:

#### 🔄 **Flexibility Needs**

* **Gradual**: Maximum flexibility, can unstake anytime
* **Locked**: Limited flexibility, more immediate rewards
* **Unlocked**: Flexible after lock expiry

#### ⏳ **Time Horizon**

* **Gradual**: Best for uncertain time horizons
* **Locked**: Ideal for known commitment periods
* **Unlocked**: Transition period requiring action

#### 💰 **Reward Preferences**

* **Gradual**: Steady, predictable accumulation
* **Locked**: Front-loaded rewards
* **Unlocked**: Requires active management

## 📚 **Dive Deeper:**

* Understanding Gradual Staking&#x20;
* Understanding Locked Staking&#x20;
* Managing Unlocked YLAY <br>


# Gradual Staking

Overview

Gradual staking represents the foundational staking mechanism in the Yelay protocol, designed to reward long-term participants while maintaining maximum flexibility. Through this method, users accumulate sYLAY linearly over time, creating a steady and predictable reward structure.

## How Gradual Staking Works

### The Basics

When you stake YLAY through the gradual method, your sYLAY accumulation follows a linear path over 208 weeks (approximately 4 years). Each week, also known as an epoch, you receive a portion of your total potential sYLAY. This accumulation rate is calculated by dividing your staked amount by the total number of epochs (208).

Expressed as an equality, the formula for sYLAY accumulation is:

`Weekly sYLAY = Staked YLAY Amount ÷ 208`

### Example in Practice

Let's walk through a practical example:

Alice stakes 208 YLAY tokens through gradual staking. Here's what happens:

1. Total duration: 208 weeks (epochs)
2. Weekly accumulation: 1 sYLAY (208 YLAY ÷ 208 weeks)
3. **After 1 week**: 1 sYLAY
4. **After 10 weeks**: 10 sYLAY
5. **After 100 weeks**: 100 sYLAY
6. **At completion (208 weeks)**: 208 sYLAY

This means that every week, Alice's share of protocol rewards grows steadily as she accumulates more sYLAY.

<figure><img src="/files/uHihK4rQxFJnDGK8RVgM" alt=""><figcaption></figcaption></figure>

## Flexibility and Trade-offs

### The Power of Choice

The key advantage of gradual staking is the ability to unstake at any time. This flexibility comes with an important consideration: unstaking will result in the loss of all accumulated sYLAY.

For example: If Alice decides to unstake after 100 weeks:

* She receives back her 208 YLAY tokens
* She loses her 100 accumulated sYLAY
* If she stakes again, she starts from 0 sYLAY

### Understanding Your Position

#### Tracking Progress

Monitoring your gradual staking position provides essential insights into your accumulation progress and reward potential. Your dashboard displays your current sYLAY balance, showing how much you've accumulated since starting your stake. By tracking the weeks elapsed, you can see your progression through the 208-week journey. The projected final sYLAY balance helps you understand your ultimate reward potential, while your current share of protocol rewards indicates your present earning power within the ecosystem. These metrics together provide a comprehensive view of your staking position's health and trajectory.

#### Important Metrics to Watch

Success in gradual staking requires attention to several key performance indicators. Your weekly accumulation rate serves as the foundation, showing your steady progress toward your maximum sYLAY potential. The total time staked helps you contextualize your progress within the full 208-week period, while your percentage of maximum sYLAY achieved provides a clear picture of how far you've come in your accumulation journey. Understanding your current reward share percentage is crucial, as it directly correlates to your earnings from protocol rewards and helps you make informed decisions about your staking strategy.

## Strategic Considerations

### When to Choose Gradual Staking

Gradual staking might be right for you if:

* You value the ability to exit your position at any time
* You prefer a steady, predictable accumulation rate
* You're uncertain about your long-term commitment timeline
* You want to test the waters before considering locked staking

### When to Consider Alternatives

You might want to explore locked staking instead if:

* You're confident in your long-term commitment
* You want to maximize your sYLAY accumulation rate
* You're willing to trade flexibility for higher rewards

### Reward Mechanics

Your share of protocol rewards is determined by:

`Your Reward Share = Your sYLAY Balance ÷ Total sYLAY Supply`

## Advanced Strategies

#### Combining with Locked Staking

Gradual staking offers a unique strategic advantage through its flexibility to transition into locked staking at any point in your journey. This hybrid approach allows you to begin conservatively with gradual staking, maintaining full flexibility while you familiarize yourself with the protocol. As your confidence grows and you better understand the ecosystem's dynamics, you can strategically transition to locked staking to receive an immediate sYLAY boost. This progression from gradual to locked staking represents a sophisticated approach to maximizing rewards while managing risk, allowing you to adapt your strategy as your understanding and commitment to the protocol evolve.

#### Position Management

Successful gradual staking requires active engagement with your position and the broader protocol ecosystem. Regular monitoring of protocol rewards helps you understand your actual earnings and evaluate the effectiveness of your current strategy. Comparing your gradual accumulation rate with potential locked staking returns enables informed decisions about possible strategy adjustments. Your position management should also account for personal liquidity needs, ensuring your staking commitment aligns with your broader financial planning. Staying informed about protocol developments is crucial, as changes in the ecosystem might affect staking dynamics and present new opportunities for optimizing your position. This comprehensive approach to position management helps ensure your gradual staking strategy remains aligned with both protocol opportunities and your personal financial goals.

## Frequently Asked Questions

<details>

<summary>Can I add more YLAY to my existing gradual stake?</summary>

Yes, you can add more YLAY at any time. Each new deposit will follow its own 208-week accumulation schedule.

</details>

<details>

<summary>Can I pause accumulation without unstaking?</summary>

No, accumulation continues as long as your YLAY is staked. However, you can unstake at any time if needed.

</details>


# Locked Staking

## Overview

Locked staking is designed for users seeking to maximize their sYLAY accumulation through committed time investment. This mechanism offers accelerated rewards in exchange for temporary illiquidity, creating a powerful tool for those with a long-term perspective on protocol participation.

## How Locked Staking Works

### The Basics

Locked staking transforms the [traditional gradual accumulation model](/the-ylay-token/ylay-staking/gradual-staking) by providing an immediate sYLAY boost based on your lock duration. When you lock your YLAY tokens, you receive an upfront allocation of sYLAY that would have otherwise taken weeks or months to accumulate through gradual staking. This accelerated reward structure has a crucial stipulation: your YLAY tokens cannot be unstaked until the lock period expires.

### Example in Practice

Let's explore a practical example:

Bob has been gradually staking 208 YLAY tokens for 100 weeks, accumulating 100 sYLAY (1 sYLAY per week). At this point, he decides to lock his position for 50 weeks. Here's what happens:

* **Current sYLAY balance**: 100 sYLAY
* **Immediate boost from lock**: +50 sYLAY
* **New total balance**: 150 sYLAY
* **Lock duration**: 50 weeks (no unstaking permitted)

This immediate increase in sYLAY demonstrates the powerful acceleration effect of locked staking. Bob has successfully boosted his sYLAY position, increasing his pro rata share of rewards from the protocol in exchange for locking his YLAY tokens for a predetermined duration.&#x20;

<figure><img src="/files/zP70QWhbFdxAVsS52ii3" alt=""><figcaption></figcaption></figure>

## Lock Period Dynamics

### Duration and Flexibility

The lock period represents a crucial decision point in your staking strategy. The duration you choose directly impacts your immediate sYLAY boost while also determining how long your YLAY tokens remain committed to the protocol. During this period, your tokens are securely stored in the smart contract. While you cannot withdraw them, they continue working to maintain your enhanced position in the protocol's reward structure.

### Post-Lock Considerations

When your lock period expires, your position enters a transition phase. Your YLAY tokens remain in the contract but become eligible for withdrawal.&#x20;

However, until you take action – either by claiming your position or initiating a new lock – your sYLAY accumulation pauses, creating a strategic decision point where you must actively manage your position to maintain optimal rewards.

[Learn more about Unlocked YLAY here](/the-ylay-token/ylay-staking/unlocked-ylay).&#x20;

## Strategic Benefits and Trade-offs

### Accelerated Accumulation

Locked staking offers a compelling proposition for users seeking to maximize their sYLAY position quickly. The immediate sYLAY boost increases your pro rata share of protocol rewards, potentially offering greater returns than gradual staking over the same period. This acceleration effect is particularly powerful for users with a clear long-term commitment to the protocol and can confidently forecast their liquidity needs.

## Position Management

### Active Monitoring

Managing a locked staking position requires attention to several aspects of your stake. Understanding your current sYLAY balance, lock expiration date, and reward accrual helps you plan for position transitions and optimize your strategy. Regular monitoring of protocol developments and reward dynamics ensures you can make informed decisions about re-locking or transitioning to different staking approaches when your current lock expires.

## Frequently Asked Questions

<details>

<summary>Can I extend my lock period?</summary>

No, lock periods cannot be extended once set. However, you can initiate a new lock after the current one expires.

</details>

<details>

<summary>What happens to my sYLAY if I wait to claim after lock expiry?</summary>

Your sYLAY balance remains intact, but you won't accumulate additional sYLAY until you either claim or re-lock your position. When you claim, the outstanding sYLAY will be added to your existing sYLAY positon.&#x20;

</details>

<details>

<summary>Can I partially unlock my position?</summary>

No, locked positions remain fully locked until the lock period expires. Partial unlocks are not supported.

</details>


# Unlocked YLAY

## Overview

Unlocked YLAY is a transition state in the Yelay staking ecosystem, occurring when a locked staking period expires. Understanding how to manage this state effectively is essential for maintaining optimal rewards and making strategic decisions about your staking position. This phase offers flexibility while requiring active management to ensure continued benefit from the protocol.

## Understanding the Unlocked State

### Transition from Locked Staking

Your position automatically enters the unlocked state when your locked staking period ends. During this phase, your YLAY tokens remain safely within the protocol's smart contracts, but their status changes. Your accumulated sYLAY from the locked period remains intact, preserving your earned rewards. However, your position enters a dormant phase where no new sYLAY accumulates until you take action.

### The Claiming Process

When you claim your unlocked YLAY, the protocol calculates and awards you all the backdated sYLAY that your position would have accumulated during the unlocked period until the point you claim. This retroactive reward calculation ensures you don't permanently lose potential earnings during the transition period. Once claimed, your position resumes normal sYLAY accumulation per epoch, similar to gradual staking.

### Timing Your Actions

While your position remains secure in its unlocked state, the pause in sYLAY accumulation means delaying action could impact your overall reward optimization. However, this period also provides a valuable opportunity to evaluate your staking strategy and make informed decisions about your next steps, whether claiming, re-locking, or adjusting your position.

## Frequently Asked Questions

<details>

<summary>Do I lose any accumulated sYLAY when my position unlocks?</summary>

No, your previously accumulated sYLAY remains intact when your position transitions to the unlocked state.

</details>

<details>

<summary>How long can I keep my position unlocked before claiming?</summary>

There's no time limit - you can maintain an unlocked position indefinitely, though you won't accumulate new sYLAY until claiming or re-locking.

</details>

<details>

<summary>What happens to my reward share while my position is unlocked?</summary>

Your existing sYLAY balance continues to earn protocol rewards, but you won't accumulate additional sYLAY until claiming or re-locking.

</details>


# Risk Models in Yelay

## Understanding Risk Models

Risk Models are essential components of the Yelay ecosystem that provide a quantitative method for assessing strategy and protocol risks. These models translate various risk factors into a comprehensive Risk Score, enabling users to make informed decisions.

### How Risk Models Work

Each Risk Model evaluates strategies and protocols using specific input variables such as:

* Total Value Locked (TVL)
* Time deployed
* Annual Percentage Yield (APY)
* Protocol-specific metrics

### Risk Model Governance

The Yelay ecosystem maintains an open and decentralized approach to Risk Models:

1. Anyone can create and submit Risk Models for consideration
2. All proposed models must be approved through DAO voting
3. Risk Model Providers must stake YLAY tokens, ensuring their incentives align with the ecosystem's best interests
4. Users can select approved Risk Models that best match their risk management preferences

## Available Risk Models

### Genesis Risk Model

The Genesis Risk Model, developed by Yelay, was the first Risk Model implemented in the ecosystem. It evaluates protocols based on seven key parameters:

1. "Risk-Free" annual percentage yield
2. Current protocol APY
3. Audit status and quality
4. Bug bounty programs
5. Time since deployment
6. Protocol Total Value Locked (TVL)
7. Smart contract complexity ("Depth of Smart Contracts")

The model calculates Risk Scores by analyzing the relative differences between protocols across these parameters.

### De.Fi Risk Model

De.Fi is a partnered Risk Model Provider specializing in Smart Contract Risk assessment. Their model:

* Analyzes smart contract security factors ,including:
  * Contract upgradeability
  * Deployment duration
  * Known vulnerabilities
* Provides risk assessments on a 0-100 scale (where 100 represents maximum safety)
* Adapts to Yelay's risk grading system through score inversion and scaling:
  * Original De.Fi score: 0 (high risk) to 100 (safe)
  * Converted Yelay score: 0 (safe) to 10 (high risk)

All De.Fi risk assessments can be viewed at [de.fi/scanner](https://de.fi/scanner/), including protocols beyond those integrated with Yelay.


# Audits

## V3 audits

Latest Yelay's version, Yelay V3, has been audited by the leading smart contract security research firms Chainsecurity and Hexens.

Please see both audit reports here: <https://github.com/YieldLayer/yelay-lite/tree/main/audits>

## V2 audits

Earlier version of the protocol, V2, has been audited by the top crypto security firms Trail of Bits and ChainSecurity. See audit reports below:

{% embed url="<https://github.com/trailofbits/publications/blob/master/reviews/2023-03-spool-platformv2-securityreview.pdf>" %}

{% embed url="<https://www.chainsecurity.com/security-audit/spool-v2-smart-contracts>" %}

## $YLAY token

Yelay's token and staking contracts have been thoroughly audited by industry-leading security firm [Hexens](https://hexens.io/). The full audit report is available below:

{% file src="/files/tlZeEZ7C1cBCdTQuCvVA" %}


# Smart Contract Suite

As the most comprehensive yield solution on the market, Yelay is constantly adding new audited smart contracts to our suite of solutions. To explore an exhaustive list of smart contracts, please refer to the following [GitHub](https://github.com/YieldLayer/yelay-lite).&#x20;


# SDK and Integration

Yelay's Software Development Kit (SDK) is a powerful tool designed to streamline the integration of yield-generating capabilities into your applications. Our SDK provides developers with easy access to Yelay's comprehensive suite of smart contracts and yield optimization features.&#x20;

With support for multiple blockchains and blue-chip yield protocols, our SDK empowers you to offer your users optimized, cross-chain yield opportunities with minimal development time.&#x20;

For detailed documentation, installation instructions, and code examples, please visit our [GitHub repository](https://github.com/YieldLayer/yelay-lite) or consult our [developer docs](https://v3sdk.yelay.io).


# Intro

#### What is Yelay? <a href="#key-features" id="key-features"></a>

[Yelay](https://yelay.io) provides infrastructure and tooling that enable crypto companies to seamlessly integrate yield-generating "Earn" products for stablecoins, ETH, and BTC into their applications—without requiring deep DeFi expertise or smart contract development knowledge.

If you are a:

* DeFi project (that requires action providers to earn yield)
* Launchpool (deposit X → farm token Y)
* Treasury and invoice management solution
* Yield-bearing stablecoin
* Exchange
* Wallet provider
* Custodian

and want to offer a "Stake & Earn" feature to your clients, Yelay is the right choice for you.

Instead of developing individual connections to DeFi protocols that generate yield—and being exposed to yield fluctuations—companies using Yelay gain access to an infrastructure that dynamically rebalances users' liquidity, seeking the best yield opportunities while compounding farmed rewards, all in one go.

#### Yelay SDK <a href="#key-features" id="key-features"></a>

[Yelay SDK](https://www.npmjs.com/package/@yelay-lite/sdk) is a TypeScript npm package that provides a convenient way to interact with the Yelay protocol. It encapsulates RPC calls to Yelay smart contracts, making it easier for developers to integrate Yelay functionality into their projects.

This document contains code snippets of all SDK functions, along with concise explanations. Additionally, all key concepts are explained in an easy-to-understand manner using both text and visual diagrams. This ensures that developers new to Yelay can quickly grasp how everything works, streamlining their onboarding process.

Yelay is highly modular and focuses on five key "Yield Layer for Partners" requirements:

1. Generating maximum risk-adjusted yield from connected protocols at any given time.
2. Providing simple tooling for the "convert yield to anything" use case.
3. Enabling flexibility to update the types of strategies/protocols vaults are connected to over time.
4. Offering low gas fees on deposits.
5. Supporting multi-chain compatibility.

#### Multi-chain Yelay <a href="#key-features" id="key-features"></a>

As of August 2025, Yelay (V3) is available on [Ethereum](https://perq.finance/), [Base](https://monstro.fun/toolz/syr), [Sonic](https://app.yelay.io/sonic), [Avalanche](https://github.com/YieldLayer/yelay-lite/tree/12166bb607ea55ef27089cc665746a8380c07893/deployments) and [Arbitrum](https://perq.finance/)

#### Yelay contract addresses <a href="#key-features" id="key-features"></a>

Find the latest contract deployment addresses here: <https://github.com/YieldLayer/yelay-lite/tree/main/deployments>

#### Licensing

This SDK is licensed under the **ISC License**.


# Main entities

End-users of Yelay can be:

* Client/Project: entity that operates several pools within the vault for their end users. F.e: launchpools
* Retail end user: user of Yelay's retail apps. F.e <https://app.yelay.io/>

The main entities of Yelay's architecture are:

* Vault - smart contract (1 per asset on each supported chain) that receives user deposits  and channels them to strategies
* Pool - client's space within the vault. Each client gets a range of pool IDs to operate within given vault.  Every pool's KPIs like yield, TVL can be track separately. All retail users are assigned to a single pool within the vault.&#x20;
* Strategy - adapter to the protocol that generates yield (f.e. Morpho, Aave, Gearbox)

Image below illustrates the relationship between **User, Client, Vault, Pool and Strategies:**

<figure><img src="/files/g9pj1VCweynPJwRndGdL" alt=""><figcaption></figcaption></figure>


# Setting up your account

#### Activating your client account <a href="#key-features" id="key-features"></a>

In order to activate your client account on Yelay's vaults, contact **@guilhermemussi** or **@FPPTeleg**  on Telegram, or reach out to **@yieldlayer** on X.

#### Details required from projects <a href="#key-features" id="key-features"></a>

In order to get you started, just let us know :

1. On what chains you'd like your pools to be deployed
2. Main assets (f.e.: USDC, WETH, WBTC)

See list of currently available assets per chain as "vaults" here: <https://github.com/YieldLayer/yelay-lite/tree/main/deployments>

3. Pool manager address for whitelisting of admin operations
4. % of the fee that your project wants to take from the generated yield

#### Range of pools <a href="#key-features" id="key-features"></a>

Each integrator will receive their designated range of pools (i.e., your "pools" within Yelay vaults). Your frontend will handle transactions to and from your assigned pool within the Yelay vault, which is shared among all clients and pools.

You will be able to retrieve accrued yield data for each **Pool ID** separately—both for individual users and for users within specific Pool IDs.

Before accepting deposits, you will need to activate specific pool IDs (see [Supportive methods](/yelay-sdk/supportive-methods))&#x20;

**Testing**

Use test vaults on Base for testing your integration with Yelay (see [Initialization](/yelay-sdk/initialization)).&#x20;


# Initialization

### Installation

```sh
npm install @yelay-lite/sdk
```

#### Required Dependencies

The Yelay Lite SDK requires a drift web3 adapter and the drift core library. Install both the core drift library and choose one adapter based on your web3 library:

**Core dependency (required for all setups):**

```sh
npm install @gud/drift
```

**For Viem:**

```sh
npm install @gud/drift-viem
```

**For Ethers v6:**

```sh
npm install @gud/drift-ethers
```

**For Ethers v5:**

```sh
npm install @gud/drift-ethers-v5
```

### Caching Configuration

The Yelay Lite SDK automatically disables drift's internal caching to ensure fresh data on every request.

When you call `sdk.init(drift)`, the SDK automatically replaces drift's default LRU cache with a no-op implementation, ensuring all contract calls fetch fresh data from the blockchain. The SDK will throw an error if you try to use custom caching.

### Initialization

The SDK uses a **drift adapter pattern** that works with any web3 library. The `init()` method is **mandatory** and must be called before using any SDK features.

#### With Viem

```ts
import { YelayLiteSdk } from '@yelay-lite/sdk';
import { viemAdapter } from '@gud/drift-viem';
import { createDrift } from '@gud/drift';
import { createPublicClient, createWalletClient, http } from 'viem';
import { base } from 'viem/chains';

// Set up your viem clients
const publicClient = createPublicClient({
	chain: base,
	transport: http(),
});

const walletClient = createWalletClient({
	chain: base,
	transport: http(),
});

// Create the adapter and drift instance
const adapter = viemAdapter({ publicClient, walletClient });
const drift = createDrift({ adapter });

// Initialize the SDK
const sdk = new YelayLiteSdk();
await sdk.init(drift);
```

#### With Ethers v6

```ts
import { YelayLiteSdk } from '@yelay-lite/sdk';
import { ethersAdapter } from '@gud/drift-ethers';
import { createDrift } from '@gud/drift';
import { ethers } from 'ethers';

// Set up your ethers provider and signer
const provider = new ethers.JsonRpcProvider('https://mainnet.base.org');
const signer = new ethers.Wallet('YOUR_PRIVATE_KEY', provider);

// Create the adapter and drift instance
const adapter = ethersAdapter({ provider, signer });
const drift = createDrift({ adapter });

// Initialize the SDK
const sdk = new YelayLiteSdk();
await sdk.init(drift);
```

#### With Ethers v5

```ts
import { YelayLiteSdk } from '@yelay-lite/sdk';
import { ethersV5Adapter } from '@gud/drift-ethers-v5';
import { createDrift } from '@gud/drift';
import { ethers } from 'ethers';

// Set up your ethers v5 provider and signer
const provider = new ethers.providers.JsonRpcProvider('https://mainnet.base.org');
const signer = new ethers.Wallet('YOUR_PRIVATE_KEY', provider);

// Create the adapter and drift instance
const adapter = ethersV5Adapter({ provider, signer });
const drift = createDrift({ adapter });

// Initialize the SDK
const sdk = new YelayLiteSdk();
await sdk.init(drift);
```


# Deposit

**Depositing to a Yelay Vault**

To deposit assets into a Yelay vault using the vault’s native asset currency, follow these steps:

### Deposit ERC20 into the vault

All action methods support an optional `options` parameter of type `WriteOptions` from `@gud/drift` for customizing transaction parameters (gas, nonce, etc.).

```ts
const vault = '0x1234';
const pool = 1234;
const amount = 1000000n; // Using bigint for amount

const allowance = await sdk.portfolio.getAllowance(vault);

if (allowance === 0n) {
	const approveTx = await sdk.actions.approve(vault, amount);
	// Note: Drift returns transaction hash, wait method depends on your adapter
}

const depositTx = await sdk.actions.deposit(vault, pool, amount);

// With optional WriteOptions
const depositTxWithOptions = await sdk.actions.deposit(vault, pool, amount, {
	gas: 300000n,
});
```

Wher&#x65;**:**

* **`vault`** – One of the vaults set up by Yelay. Fetch vault addresses using `sdk.vaults.getVaults()`. (See the ["Supportive Methods"](/yelay-sdk/supportive-methods) chapter.)
* **`poolId`** – One of the pools set up by the client within the vault.

Once the deposit is complete, the corresponding amount of ERC-1155 NFT shares is minted in the user’s wallet.

For example:

* [Depositing 1 USDC into the Yelay test vault ](https://basescan.org/tx/0xb8882d59518954801ef47f67ac367f0abe9fa746cc790ec62009c63b14a69c19)with `Pool ID = 1` results in 1,000,000 ERC-1155 tokens being minted.
* Depositing 2 USDC results in 2,000,000 ERC-1155 tokens, and so on.

<figure><img src="/files/eOv8vZ6zW6lvWoXVCYdQ" alt=""><figcaption></figcaption></figure>

#### Deposit "on behalf" of another user (specifying shares receiver) <a href="#key-features" id="key-features"></a>

This function allows you to deposit tokens into a vault pool, but the resulting shares will be credited to a different address (receiver). This is useful for scenarios like depositing on behalf of users.

```ts
const vault = '0x1234';
const pool = 1234;
const amount = 1000000n; // Using bigint for amount
const receiver = '0x5678'; // Address that will receive the deposit shares

const allowance = await sdk.portfolio.getAllowance(vault);

if (allowance === 0n) {
	const approveTx = await sdk.actions.approve(vault, amount);
	// Note: Drift returns transaction hash, wait method depends on your adapter
}

const depositTx = await sdk.actions.depositOnBehalf(vault, pool, amount, receiver);
```

#### Depositing with any asset  <a href="#key-features" id="key-features"></a>

1. Depositing any ERC-20 Token

To deposit any **ERC-20 token** and swap it on the way, use the `sdk.vaults.swapAndDeposit` method:

```ts
const vault = '0x123';
const pool = 1234;
const amount = '1000000';
const tokenToSwap = '0x456';
// only 1inch Aggregation Router v6 is supported
const swapTarget = '1inch Aggregation Router v6 address';
const swapCallData = '0x9...1';

const allowance = await sdk.vaults.vaultWrapperAllowance(tokenToSwap);

if (allowance.isZero()) {
	const approveTx = await sdk.vaults.approveVaultWrapper(tokenToSwap, amount);
	await approveTx.wait();
}

const swapAndDepositTX = await sdk.vaults.swapAndDeposit(vault, pool, amount, {
	swapCallData,
	swapTarget,
	tokenIn: tokenToSwap,
});
await swapAndDepositTX.wait();
```

Wher&#x65;**:**

* **`vault`** – Address of the vault.
* **`pool`** – Pool set up by the client within the vault.
* **`amount`** – Deposit amount.
* **`swapCallData`** – Swap arguments from 1inch.
* **`swapTarget`** – Should match the asset of the vault.
* **`tokenToSwap`** – ERC-20 token to be swapped before depositing.

⚠ **Note:**

* This method requires obtaining a **1inch API key** and retrieving `swapCallData` from it.
* Users will incur **swap costs** when using this method.

### Deposit ETH into the vault

```ts
const vault = '0x1234';
const pool = 1234;
const amount = 1000000n; // Amount of ETH in wei
const tx = await sdk.actions.depositEth(vault, pool, amount);
```

Where:

* `vault` – Address of the Yelay WETH vault on the given chain.
* `pool` – ID of the pool where the user deposits.
* `amount` – Amount of ETH to deposit.

This method leverages the VaultWrapper contract to handle ETH wrapping and depositing in a single transaction.

Note that it is not possible to do 'depositOnBehalf' with swapAndDeposit and depositEth. Contact **@guilhermemussi** on Telegram if you want this to be enabled.&#x20;


# Withdrawals

#### Handling withdrawals <a href="#key-features" id="key-features"></a>

To initiate a withdrawal, use the following code:

```typescript
const vault = '0x1234';
const pool = 1234;
const amount = 1000000n; // Amount of shares to redeem
const redeemTx = await sdk.actions.redeem(vault, pool, amount);
```

Where:

* `vault` – One of the vaults set up by Yelay. See vault addresses here:\
  🔗 [Yelay Vault Addresses](https://yelay.gitbook.io/yelay-v3-sdk-docs/setting-up-check)
* `pool` – One of the projects (also referred to as "pools") set up by the client within the vault.
* `amount` – The amount to withdraw.

Withdrawals always return the vault’s native asset:

* A USDC vault returns USDC.
* A WETH vault returns WETH, and so on.


# Tracking balance and TVL

#### Fetching User's Balance <a href="#key-features" id="key-features"></a>

To fetch user's balance within a specific pool:

```typescript
const userPoolBalance = await sdk.vaults.balanceOf(vault, pool, await signer.getAddress());const balance = await sdk.portfolio.getBalance(vault, poolId, user);
```

Wher&#x65;**:**

* **`vault`** – Address of the Yelay vault.
* **`pool`** – ID of the requested pool.

#### Retrieving TVL of a Client's Pool  <a href="#key-features" id="key-features"></a>

To fetch the Total Value Locked (TVL) of a specific pool within a Yelay vault:

```typescript
const vault = '0x1234';
const pool = 1234;
const poolsTvl = await sdk.data.getPoolTvl(vault, [pool]);
```

Where:

* **`vault`** – Address of the Yelay vault.
* **`pool`** – Array of pool IDs to calculate the total TVL

#### Getting historical TVL data for a vault and pool  <a href="#key-features" id="key-features"></a>

```typescript
// Fetch historical TVL data with various filter options
const historicalTVL = await sdk.data.getHistoricalTvl({
	vaultAddress: '0x1234...5678', // Required: The vault address to get TVL for
	poolId: 1, // Required: The specific pool ID to query
	fromTimestamp: 1641034800, // Optional: Start time in seconds (Jan 1, 2022)
	toTimestamp: 1672570800, // Optional: End time in seconds (Jan 1, 2023)
	page: 1, // Optional: Page number for pagination (starts at 1)
	pageSize: 30, // Optional: Number of records per page (max 100)
});

// Example with just the required parameters
const currentTVL = await sdk.data.getHistoricalTvl({
	vaultAddress: '0x1234...5678',
	poolId: 1,
});
```

The  method returns a paginated response with the following structure:

```json
// Example response from historicalTVL
{
  data: [
    {
      vaultAddress: "0x1234...5678",
      poolId: 1,
      createTimestamp: 1745820000,
      assets: "31000000000000"
    },
    // ... more data items
  ],
  totalItems: 11,    // Total number of items matching the query
  totalPages: 1,     // Total number of pages
  currentPage: 1,    // Current page number
  pageSize: 30       // Number of items per page
}
```


# Yield and APY tracking

In Yelay, all earned yield is collected in the YieldExtractor contract. The yield is then becoming available to be claimed for clients and end users on a daily basis.

#### Fetch aggregated yield accrual info  <a href="#key-features" id="key-features"></a>

Use this method to retrieve aggregated yield data for specified vaults, pools, and users within a given timeframe:

<pre class="language-typescript"><code class="lang-typescript"><strong>// Get all aggregated yield data
</strong>const aggregatedYieldData = await sdk.data.getAggregatedYield();

// Get aggregated yields with all filters
const filteredAggregatedYield = await sdk.data.getAggregatedYield(
	['0xVaultAddress'],              // Optional: filter by vault addresses
	[1, 2, 3],                       // Optional: filter by pool IDs
	['0xUserAddress1', '0xUserAddress2'], // Optional: filter by user addresses
	{ fromTimestamp: 1640000000 }    // Optional: timeframe filter
);const aggregatedYieldData = await sdk.yields.getYields([vaults], [poolIds], [users], timeframe);
</code></pre>

Where:

* `vaults` – Array of vault addresses to filter results.
* `poolIds` – Array of pool IDs to filter results.
* `users` – Array of user addresses to filter results.
* `timeframe` – Timeframe to limit results within a specific period.

#### Zooming in on rewards

The yield comes from two sources:&#x20;

* the native yield of the underlying vault
* reward tokens (f.e. $MORPHO or $SILO)&#x20;

The native yield is usually distributed more frequently, often whenever someone deposits or withdraws from the vault. On the other hand, rewards can be distributed by protocols sporadically and less regularly.

Compounding rewards means following process:

* Yelay vault claims those reward tokens (which are usually in a different ERC-20 token)
* Swaps them into the Yelay vault's underlying token
* Distributes them among users in form of yield.

Let’s say a user deposited an unspecified amount and earned 70 USDC in yield over the course of one week. The native APY is 4%, and there’s an additional 2% APY from rewards. On the 3rd day, the user receives an additional 35 USDC from compounding the rewards. So, his total yield suddenly jumps from 70 USDC to 105 USDC. If APY is calculated using data from each day except the last, the average yield is based on 10 USDC per day. However, if you calculate it using only the last 24 hours, the daily yield appears to be 45 USDC (10 + 35), which is significantly higher and results in an inflated APY.


# Yield claiming

#### Get claimable yield <a href="#key-features" id="key-features"></a>

Retrieve the amount of claimable yield for the user, optionally filtering by specific pool IDs and vault addresses:

```typescript
/ Get all claimable yield for the user
const claimable = await sdk.portfolio.getClaimable({
	user: '0xUSER_ADDRESS',
});

// Filter by pools and vaults
const claimableFullyFiltered = await sdk.portfolio.getClaimable({
	user: '0xUSER_ADDRESS',
	poolIds: [1, 2, 3],
	vaultAddresses: ['0xVAULT_ADDRESS1'],
});
```

#### Claim yield <a href="#key-features" id="key-features"></a>

Once you have retrieved claimable yield using `getClaimableYield`, you can claim it using the `claimYield` method:

```typescript
// First, get the claimable yield to obtain claim requests
const claimableYield = await sdk.portfolio.getClaimable({
	user: '0xUSER_ADDRESS',
});

// Extract the claim requests from the claimable yield
const claimRequests = claimableYield.map(item => item.claimRequest);

// Submit the transaction to claim the yield
const claimTx = await sdk.actions.claim(claimRequests);
```

The `claimYield` method sends a transaction to the blockchain to claim yield based on the provided claim requests. It requires a valid signer with sufficient gas to execute the transaction. You can optionally provide gas overrides to customize the transaction parameters.


# Fetching strategies metadata

Use following methods in order to communicate to your users what protocols are currently used for the yield farming at Yelay.

#### Get protocols

Fetch list of all protocols currently whitelisted for the yield farming through Yelay. Whitelisted strategies are those that are connected to the Yelay, and can be instantly set to the 'active' state in order to get liquidity flown there. F.e: Gearbox, Morpho, Euler, Silo.

```typescript
const protocols = await sdk.data.getProtocols();
```

#### Get active strategies

Fetch list of the strategies that are currently "active" for specific vault, i.e. strategies that accept user liquidity going through that vault.&#x20;

```typescript
const vault = '0x1234';
const activeStrategies = await sdk.data.getActiveStrategies(vault);
```

It returns strategy name (f.e. "MV-usdc-mev-capital" for one of the Morpho vaults), name of the protocol and current % allocation of the funds.&#x20;

Response format:&#x20;

```
[
	{
		name: "MV-usdc-mev-capital",
		protocolId: 'morpho',
		allocation: 100 // Percentage allocated to the strategy
	}
]
```

Note: The sum of allocations for all active strategies might not be complete 100%. In specific cases, a portion of the funds can remain unallocated in the vault itself.&#x20;


# Supportive methods

#### Fetching list of vaults <a href="#key-features" id="key-features"></a>

This method returns a promise that resolves to an array of vault objects, each containing:

* Address
* Name
* Timestamp of creation
* Block number of creation

```typescript
const vaults = await sdk.data.getVaults();
```

#### Fetching client data <a href="#key-features" id="key-features"></a>

This method returns the range of pool IDs (minimum to maximum) associated with a given client, as well as the client's name:

```typescript
const { minPool, maxPool, clientName } = await sdk.data.getClientData(integratorAddress, vault);
```

#### Activate pool <a href="#key-features" id="key-features"></a>

Once the Yelay team assigns a pool range to a client and their `integratorAddress`, each `poolId` must be activated before deposits are allowed.

* Activation can be done by Yelay or by the client using the method below.
* Only a whitelisted operator address can perform this action.
* To whitelist an address, provide your operator address to the Yelay team.

```typescript
const poolToActivate = minPool + 5; // should be in range: minPool <= poolToActivate <= maxPool
const isPoolActive = await sdk.data.isPoolActive(vault, poolToActivate);
if (!isPoolActive) {
	await sdk.actions.activatePool(vault, poolToActivate);
}
```

#### Migrate user deposits between pools <a href="#key-features" id="key-features"></a>

This method allows withdrawing a user’s liquidity from Pool A and depositing it into Pool B (both operated by the same client) in a single transaction:

```typescript
const vault = '0x1234';
const fromPool = 123;
const toPool = 456;
const amount = 1000000n; // Amount of shares to migrate
const migrateTx = await sdk.actions.migrate(vault, fromPool, toPool, amount);
```


