# SmarDex Documentation

Welcome to the most fair trade DeFi project in the blockchain ecosystem

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>What is</strong> SmarDex</td><td></td><td>Learn about the core concepts of the SmarDex Protocol, Swaps, Pools, Liquidity and more.</td><td><a href="/overview/what-is-smardex">Overview</a></td><td><a href="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FBIMW1neTO0M1wS0tMq8Q%2FDocs-what-is-smardex-thumbnail.jpg?alt=media&amp;token=718e1967-6a04-4156-9276-d9a0c3b0d4e8">Docs-what-is-smardex-thumbnail.jpg</a></td></tr><tr><td>SmarDex <strong>Smart Contracts</strong></td><td></td><td>Learn about the architecture of the SmarDex Protocol smart contracts through guided examples.</td><td><a href="/overview/what-is-smardex/contracts-addresses">Contracts' addresses</a></td><td><a href="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FnTtTaBezZ4ndJvGzgNNz%2FDocs-smartcontract-thumbnail.jpg?alt=media&amp;token=86db3636-6b04-430c-bde8-c9fe0a19cc77">Docs-smartcontract-thumbnail.jpg</a></td></tr><tr><td>SmarDex <strong>White Paper</strong></td><td></td><td>Understand the SmarDex revolution and how it can change DeFi forever!</td><td><a href="/smardex-technology/whitepaper">Whitepaper</a></td><td><a href="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FedMF2gWZoeYFnlnQakFh%2FDocs-Whitepaper-thumbnail.jpg?alt=media&amp;token=667b8f2f-8b1a-414a-8a25-f9d623039e33">Docs-Whitepaper-thumbnail.jpg</a></td></tr></tbody></table>

## Quick links

{% content-ref url="/pages/1S6mii9XtfOoYAZTuvhU" %}
[What is SmarDex ?](/overview/what-is-smardex)
{% endcontent-ref %}

{% content-ref url="/pages/sv59mMm5tp64xLSPvao9" %}
[SmarDex DeFi Platform](/smardex-defi-platform)
{% endcontent-ref %}

{% content-ref url="/pages/3VyUat6UCIWpglkTBlk4" %}
[Whitepaper](/smardex-technology/whitepaper)
{% endcontent-ref %}

{% content-ref url="/pages/MDkONSa7B8r1YpgY2AOK" %}
[Understanding the Undisputable Advantage of SmarDex](/smardex-technology/understanding-the-undisputable-advantage-of-smardex)
{% endcontent-ref %}

{% embed url="<https://github.com/SmarDex-Ecosystem/dex-smart-contracts>" %}


# What is SmarDex ?

## SmarDex overview

SmarDex is a Decentralized Exchange (DEX) that simplifies and enhances the security of digital currency trading. It is an Automated Market Maker (AMM) system that facilitate seamless trading experiences. Mainly addressing the prevalent crypto trading issue, Impermanent Loss, SmarDex can, in certain instances, transform it into an Impermanent Gain. Being an open-source platform, SmarDex provides operational efficiency and security by functioning across multiple blockchain networks, including Ethereum, Binance Smart Chain, Polygon, Arbitrum and Base.\
\
To understand more about SmarDex and its unique offerings, continue to the following sections for a detailed exploration.


# Understanding SmarDex

Understand SmarDex, even if you're new to crypto

## What is SmarDex ?

Before we start exploring SmarDex, it's important to understand what a DEX, or decentralized exchange, is. In the traditional world of finance, an exchange is a place where you can buy and sell assets like stocks or currencies. In the world of cryptocurrency, these exchanges can be centralized (like Binance or Coinbase), meaning one single entity controls them, or they can be decentralized.

A decentralized exchange, or DEX, is a cryptocurrency exchange that operates without a central authority. This means you can directly buy and sell cryptocurrencies with other users without needing an intermediary to process the trade. This reduces fees and increases transparency and security.

SmarDex is a Decentralized Exchange (DEX) that functions as an Automated Market Maker (AMM). As such, it represents a specific type of decentralized exchange protocol that relies on a mathematical formula to price assets. Instead of using an order book like a conventional exchange, SmarDex employs a pricing algorithm. This approach allows users to trade directly with the smart contract, obviating the need to match buyers and sellers. By acting as both a DEX and an AMM, SmarDex enables efficient, decentralized trading, further enhancing the liquidity and accessibility of the cryptocurrency market.

In the world of decentralized finance (DeFi), Liquidity Pools are foundational to the operation of DEXs. These Liquidity Pools are collections of funds locked in a smart contract, used to facilitate trading by providing liquidity. Users can contribute to these Liquidity Pools by depositing assets, and in return, they receive Liquidity Provider (LP) tokens, representing their share of the pool. This mechanism is crucial for enabling decentralized trading without the need for traditional market makers.

SmarDex takes this concept a step further with the introduction of Volatility Vaults (VVs), which are our version of intelligent Liquidity Pools. Unlike traditional Liquidity Pools, Volatility Vaults are equipped with a sophisticated algorithm embedded directly within them. This algorithm creates what we call 'fictive reserves', a feature that enhances the pool's ability to manage volatility and optimize returns for liquidity providers. The innovative use of fictive reserves in our Volatility Vaults distinguishes SmarDex from other DEXs by providing a smarter way to contribute to market liquidity. We delve deeper into how these fictive reserves work and their benefits [here](/overview/what-is-smardex/inside-smardex-algorithm#diving-into-the-heart-of-smardexs-unique-algorithm).&#x20;

It is crucial to understand that SmarDex is in a state of continuous evolution, and it would be a mistake to think of it merely as a DEX. Our goal is to become the go-to place for the DeFi world, offering a comprehensive suite of services and innovations that extend far beyond traditional exchange functions. As such, stakeholders should expect a series of groundbreaking developments that will further cement our position as a leader in the DeFi space. This commitment to innovation and growth signifies SmarDex's dedication to enhancing user engagement and fortifying the overall vitality of the cryptocurrency market.

## What you can do on SmarDex

#### [**Swapping Tokens:** ](/smardex-defi-platform/swap-tokens)

SmarDex's primary feature is its 'swap' function, which allows users to trade one type of cryptocurrency token for another. For example, if you have ethers and you want to exchange it for a different token on the platform, you can do so easily and efficiently through SmarDex's Hybrid Aggregator. This Aggregator optimizes trades by analyzing and combining the best trade routes available both on SmarDex and across a variety of other DeFi platforms, ensuring you receive the best possible rate for your exchange.

#### [**Providing Liquidity:**](/smardex-defi-platform/volatility-vaults)&#x20;

Your participation in SmarDex goes beyond trading. By depositing a pair of tokens into a SmarDex [Volatility Vault (VVs)](#user-content-fn-1)[^1], you contribute to the smooth operation of the platform, facilitating seamless trades. In return for this contribution, you receive [Volatility Vault Liquidity Providing Tokens (LP tokens)](#user-content-fn-2)[^2], the amount of which is proportional to the liquidity[^3] you've provided in relation to the [Volatility Vault's](#user-content-fn-1)[^1] total liquidity[^3]. But that's not all. You can further harness the power of [LP tokens](#user-content-fn-2)[^2] through 'farming[^4]'.

#### [**Farming:** ](/smardex-defi-platform/farming)

This is where your [LP tokens](#user-content-fn-2)[^2] truly shine. By 'farming[^4]' your [LP tokens](#user-content-fn-2)[^2], which involves staking[^5] or locking them into a [smart contract](#user-content-fn-6)[^6], you can earn additional rewards. These rewards often come in the form of SDEX <img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fdtppif7niWJpAECCQx08%2Fsdex.svg?alt=media&amp;token=7142bd0f-73ac-466d-b0ce-2aa02626d58d" alt="" data-size="line">. The yield depends on several factors, such as the amount of [LP tokens](#user-content-fn-2)[^2] you've staked and the duration of staking[^5].

#### [**Staking:**](/smardex-defi-platform/staking)&#x20;

Staking[^5] forms a core part of your journey with SmarDex. By 'staking[^5]' your SDEX tokens in a [smart contract](#user-content-fn-6)[^6] on the platform, you actively support the network, bolstering its security and efficiency. In recognition of this contribution, you earn rewards, specifically in the form of SDEX[^7] tokens. The number of SDEX[^7] tokens you earn as rewards is influenced by the number of tokens you've staked and the duration they remain staked.

#### In the '[SmarDex DeFi Platform](/smardex-defi-platform)' section, we provide guidance to help you successfully perform the aforementioned actions.

[^1]: **Volatility Vault**: Innovative liquidity pools by SmarDex designed to minimize Impermanent Loss and potentially generate Impermanent Gains. They utilize a fictive reserve strategy for dynamic liquidity management, offering enhanced protection and benefits to liquidity providers while optimizing returns in the DeFi ecosystem.

[^2]: These are tokens received by liquidity providers as proof of their contribution to a liquidity pool (Volatility Vaults at SmarDex) in a decentralized exchange. LP Tokens signify the stake held and can be used for various DeFi activities, such as yield farming.

[^3]: The availability of assets to a market or company. In DeFi, liquidity is often provided by users who receive rewards for their efforts.

[^4]: In DeFi, the process of earning rewards by staking or lending digital assets in a cryptocurrency protocol.

[^5]: Participating in a proof-of-stake (PoS) system. In the context of DeFi, it often involves staking a token to earn rewards.

[^6]: A self-executing digital agreement where the terms and conditions are written in code. They operate on blockchain technology, automatically carrying out transactions and agreements without needing a third-party intermediary.

[^7]: The primary token of SmarDex. It can be staked by users to earn passive income as a result of farming rewards and protocol fees.


# Why SmarDex is the Best

The DeFi disruptor poised to take over the DEX market

## 1. **Innovative Solution to Impermanent Loss:**&#x20;

In traditional decentralized exchanges, Impermanent Loss is a common issue most users face. But what exactly is it? When you provide liquidity to a DEX, you deposit two tokens in a pair. If the price of one of these tokens changes compared to when you deposited it, this can lead to a situation where you might have been better off just holding onto your tokens instead of providing liquidity. This potential loss is referred to as 'Impermanent Loss', because if the token prices return to their original state, your loss is reversed.&#x20;

Now, here's the exciting part - SmarDex offers a novel solution to this widespread problem. Through its uniquely designed Volatility Vaults, SmarDex minimizes the risk of Impermanent Loss. Even better, it doesn't just reduce this risk, it goes one step further. It has the capability to generate what's known as 'Impermanent Gains', turning a typical pitfall of DEXs into a potential advantage.&#x20;

The resolution of Impermanent Loss, a thorny issue in the DeFi world, is a testament to the innovation that SmarDex brings to the table. It stands as a unique feature that's currently unmatched in other DEXs, making SmarDex a market leader in this regard.

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FfXTl5EcuBSjb2RzqOvs1%2FIL%20vs%20IG%20new%201.png?alt=media&amp;token=20e35bc1-1929-4403-9ffb-993dbfd66694" alt=""><figcaption><p>SmarDex IG vs Uniswap IL</p></figcaption></figure>

## **2. Superior Performance:**&#x20;

SmarDex outclasses all other DEXs, including the popular UniSwap. It offers an unbeatable experience for Liquidity Providers and users by having fees that are on average four times lower than other platforms. This efficiency puts more profits back into your pocket.

## **3. Impressive Returns:**&#x20;

SmarDex offers some of the best return on investment in the market thanks to the fees of the protocol, rewarding the liquidity provider, the IG[^1] that SmarDex may provide and the very high APR[^2] of the farming !

## **4. Inherent Security:**&#x20;

Some attempts to mitigate [Impermanent Loss](#user-content-fn-3)[^3] have ended up increasing risk due to over-reliance on external prices, leading to potential hacks and manipulations. SmarDex’s unique approach provides a more secure alternative, representing a major innovation in DeFi. No reliance on external prices is used by SmarDex which increase its security.

## **5. Exclusive Technology:**&#x20;

The SmarDex protocol isn’t just revolutionary; it’s also protected. This prevents any other platform from copying their solution for at least two years, creating an exclusive advantage that distinguishes SmarDex from other DEXs. It's important to note that this two-year patent protection period can be extended.

## **6. Top-tier 3 pillar of security:**

SmarDex relies on the 3 pillar of security: 2 Audits, 2 Bug Bounties, 2 Monitoring system:

### Audits

Trust and security are paramount in DeFi. SmarDex boosts this confidence by undergoing audits from two highly respected entities in the realm of software and smart contract security. On one hand, there's Trail of Bits, a company that has been fortifying code and reducing risk for some of the world’s most targeted organizations and products since 2012. They combine high-end security research with a real-world attacker mentality. On the other hand, we have Paladin Blockchain Security, a leading audit firm specializing in smart contracts within decentralized finance protocols. This double-layered scrutiny ensures maximum safety for SmarDex users.

### Bug Bounties

SmarDex's commitment to eliminating vulnerabilities led to partnerships with Hacken Proof and Immunefi for bug bounties. Together, these platforms, backed by a $5,500,000 investment, invite white-hat hackers and security researchers to examine SmarDex's codebase. This not only incentivizes the discovery of potential threats but also reinforces the ongoing safety of the protocol. Hacken Proof, a renowned cybersecurity platform, mobilizes a vast community of experts to test SmarDex's integrity. Similarly, Immunefi, a leader in DeFi security, hosts a marketplace for detecting possible security threats, giving SmarDex access to top-tier security researchers.

### Monitoring Systems

In today's digital landscape where cyber threats can manifest abruptly, SmarDex underscores the importance of incessant monitoring. The amalgamation of Lossless bestows an augmented layer of transactional security, safeguarding SmarDex's projects and its vast user base from potential malignant breaches. Additionally, the SmarDex Shield, a brainchild of the same elite SmarDex team that conceptualized the protocol, is a testament to the team's vast experience and unparalleled understanding of the system. This in-house solution ceaselessly surveils the SmarDex Smart Contracts. With an innate design to promptly detect any anomalies, the Shield stands ready to initiate rapid countermeasures during any untoward security event.

## **7. Exponential Growth:**&#x20;

In just a few weeks, SmarDex has shown phenomenal growth, handling multi-million volumes per day across various networks. It's already among the top 400 protocols according to CoinMarketCap, demonstrating that it's a rising star in the DeFi space.

[^1]: **Impermanent Gain (IG):** A potential gain, as theorized by SmarDex, that can be achieved by managing liquidity differently.

[^2]: **Annual Percentage Rate (APR):** In DeFi, the yearly rate of return for activities like staking or providing liquidity, not considering compounding. Useful for estimating potential earnings or costs on crypto platforms.

[^3]: **Impermanent Loss (IL):** A DeFi phenomenon referring to a change in the price of tokens compared to when a market participant deposited those tokens in the pool.


# Inside SmarDex Algorithm

Overcoming Impermanent Loss: a novel approach to liquidity management

The key to understanding SmarDex's innovative approach to reducing [Impermanent Loss](#user-content-fn-1)[^1] lies in understanding how Automated Market Makers (AMMs) traditionally work

### AMMs and the 'K Constant' Equation

The core of many decentralized crypto exchanges (DEXs) revolves around Automated Market Makers (AMMs), which operate under a mathematical rule called the 'k constant' equation.

Imagine a 'Liquidity Pool' as a sizable pot of tokens. Within this pot, we have two distinct tokens, let's call them Token X and Token Y. The quantity of Token X multiplied by the quantity of Token Y consistently equals a value, known as 'k'. Regardless of how the quantities of Token X and Token Y fluctuate, their product remains 'constant', hence the term 'k constant'. Of course this is only valid during a swap, when any user add or remove liquidity to the protocol, the 'k constant' changes.

Consider this as a balance with Token X and Token Y on each side. When the quantity of Token X rises (and its price falls), the quantity of Token Y must decrease (and its price rises), and vice versa. This rule ensures the balance remains intact, meaning the product of Token X and Token Y quantities (i.e., the 'k' value) always stays the same.

### **Impermanent Loss Simplified**

What if the price of Token X or Y experiences a significant shift in the global market? The balance in our pool no longer mirrors the market, leading to a persistent imbalance. This creates what's referred to as 'Impermanent Loss' for the liquidity providers - those who originally deposited Token X and Y into the pool. The larger the price deviation, the more pronounced the Impermanent Loss becomes. In essence, liquidity providers would have been more profitable had they simply held onto their tokens, instead of depositing them into the pool.

Let's take an example for more clarity:

Suppose Alice deposits 1 ETH and 1000 USDT into a pool on a DEX. Since the token pair must have equivalent value, this means that the price of 1 ETH is 1000 USDT. At the same time, there are a total of 10 ETH and 10,000 USDT in the pool, with the remainder being provided by other liquidity providers such as Alice. This implies that Alice holds a stake equivalent to 10% of the pool. The total liquidity 'k' in this case is 100 000.

After some times, and the price of ETH increases to 4000 USDT, the total liquidity of the pool must remain constant. If 1 ETH is now worth 4000 USDT, this means that the ratio between the quantity of ETH and the quantity of USDT in the pool has changed due to adjustments made by the arbitragers. Let's suppose no liquidity was added, there are now 5 ETH and 20000 USDT in the pool (we can verify that 'k' remains unchanged, still at 100 000). Alice therefore decides to withdraw her funds and obtain her 10% share of the total pool, which amounts to 0.5 ETH and 2000 USDT, or a total of 4000 USDT.

It appears that she has made a nice profit. But what could have happened if she had not deposited her funds into the pool? She would have had 1 ETH and 1000 USDT, for a total of 5000 USDT. In fact, Alice would have been better off keeping her funds in her wallet rather than providing liquidity on a DEX because she has incurred an Impermanent Loss of 20%. Currently, DEXs attempt to address this loss by incentivizing liquidity providers through the collection of fees for each swap, but this is not always sufficient.

### Diving Into the Heart of SmarDex's Unique Algorithm

SmarDex takes a novel approach to liquidity management with the introduction of its [**Volatility Vaults**](#user-content-fn-2)[^2], a reimagined version of traditional Liquidity Pools. Unlike conventional Liquidity Pools found on other DEXs, SmarDex's [Volatility Vaults](#user-content-fn-2)[^2] are powered by an autonomous algorithm, deeply rooted in mathematical principles, which enables them to self-manage and dynamically adapt to changing market conditions without the need for external intervention.

To understand this, let's take the example of Uniswap, where a Pool contains two types of tokens: let's say ETH (Token X) and USDT (Token Y). In this system, the product of the quantities of X and Y remains constant (X \* Y = k). Imagine a Pool with 10 ETH and 18,000 USDT as our real reserves.

SmarDex introduces an innovative concept by creating **Fictive Reserves** from the existing real reserves. Specifically, for this example, it halves the real reserves to establish Fictive Reserves of 5 ETH and 9,000 USDT. This mechanism ensures that any transaction within the system has a more pronounced effect on prices than it would if based solely on the real reserves. Therefore, when a user exchanges 2 ETH, this transaction significantly amplifies the price impact within our calculations. As a result, the price of ETH in our system surges from $1,800 to $5,000, despite the actual real reserves being adjusted minimally, from 10 to 8 ETH and from 18,000 to 24,000 USDT.

This mechanism allows the SmarDex [Volatility Vault](#user-content-fn-2)[^2] to minimize Impermanent Loss by adjusting prices more dynamically. When the price of ETH increases, the protocol can keep a part of the ETH to sell it at a higher price, and conversely, buy ETH at a low price when its value decreases, thanks to the manipulation of the Fictive Reserves. This strategy ensures that, regardless of market fluctuations, the [Volatility Vault](#user-content-fn-2)[^2] is less exposed to Impermanent Loss compared to other competing DEXs.

Moreover, the protocol adjusts the Fictive Reserves based on buying and selling actions in the [Volatility Vault](#user-content-fn-2)[^2]. If a user buys ETH at a high price, the protocol adapts its Fictive Reserves to encourage selling at this increased price, and vice versa. This has the effect of naturally balancing the [Volatility Vault](#user-content-fn-2)[^2] over time, aiming for a 50-50 balance between ETH and USDT.

This unique system not only reduces Impermanent Loss but also offers the possibility of realizing Impermanent Gains when returning to the initial price, a feat that SmarDex achieves in 100% of cases through its sophisticated algorithms.

In summary, thanks to the innovative management of Fictive Reserves, SmarDex allows its [Volatility Vaults](#user-content-fn-2)[^2] to optimally adjust to market movements, offering increased protection against Impermanent Loss and the possibility of gains even in a fluctuating market. This unique approach places SmarDex at the forefront of decentralized exchanges, leveraging price variations for the benefit of Liquidity Providers.

#### If you are intrigued and wish to delve deeper into the SmarDex protocol, we cordially invite you to read our comprehensive [Whitepaper](/smardex-technology/whitepaper).

[^1]: **Impermanent Loss (IL):** A DeFi phenomenon referring to a change in the price of tokens compared to when a market participant deposited those tokens in the pool.

[^2]: Volatility Vaults = intelligent Liquidity Pools of SmarDex


# Tokenomics

SmarDex is based on fixed supply incentives increasing the purchasing power and value of each "remaining" token.

## SDEX

SDEX is the primary token used by the SmarDex protocol to reward its users. By participating in staking or farming, users generate passive income while contributing to the network's strength. The protocol also offers additional rewards through various programs, especially community rewards, to encourage engagement and support the ecosystem's growth. SmarDex was officially launched on March 9, 2023, marking the beginning of this new passive income opportunity for crypto enthusiasts.

## Initial SDEX distribution

The supply of SDEX is 10,000,000,000 tokens. There will never be additional tokens as it is technically impossible to mint SDEX. Since the deployment on other chains, we have even made it disinflationary, as a portion of the collected fees are now burned. For further details on our fee structure, see the 'Fees Explained' section further down this page.&#x20;

Here is the initial distribution details:

**50%** [**Volatility Vault**](#user-content-fn-1)[^1] **(Liquidity Pool):** SmarDex set up a SDEX/USDT [Volatility Vault](#user-content-fn-1)[^1], originally filled with 5 billion units of SDEX and supplemented with an additional 500,000 USDT, resulting in a total [Volatility Vault](#user-content-fn-1)[^1] value of 1 million USD. This [Volatility Vault](#user-content-fn-1)[^1] introduced a 2.5% weekly withdrawal rate and extended yield farming rewards for liquidity providers. The last withdrawal occurred on December 12th 2023.

**37,5% Long-Term Yield Distribution:** 37,5% Long-Term Yield Distribution for Farming, Staking, and Ecosystem Expansion: The distribution of long-term yields, adjusted according to the circulation of SDEX tokens in the market, is structured to benefit not only LPs and stakers but also to finance users who actively participate in and contribute to the expanding ecosystem through community rewards and other engagement mechanisms. This enhanced yield distribution approach is designed to unfold over an estimated period of 10 years, supporting the longevity, sustainability, and dynamic growth of the protocol across all its activities, including but not limited to farming, staking and community rewards.

**12,5% Boost Yielding Period:** To incentivize participation, a Boost Yielding period was instated during SmarDex's launch, lasting for 4 weeks. This move aimed to encourage liquidity providers by offering a substantial reward of 1,250,000,000 SDEX tokens. The distribution began on March 14th 2023 and finished 4 weeks after, on April 12th 2023.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F7CqaXkjAOrhUGH03ItGO%2FGraphe%20supply%20magenta.png?alt=media&#x26;token=261e1e61-0b25-4c77-ae35-855396207fbc" alt=""><figcaption><p>Total Supply of SDEX</p></figcaption></figure>

## Distribution of SDEX now

The only way to 'mine' SDEX tokens is through the long-term distribution of rewards, which encompasses farming, staking, and other methods designed to expand the ecosystem, such as community rewards. These diverse avenues of earning SDEX are aimed at financing users who actively adopt and contribute to the growing ecosystem. These rewards will be distributed over the 10 years following the launch.

<div align="left"><figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FiuHCqK2DEPSuXce5S2iM%2FCapture%20d%E2%80%99e%CC%81cran%202024-01-11%20a%CC%80%2017.17.20.png?alt=media&#x26;token=fdd431b2-6ee9-4955-8557-ed237a447e72" alt="" width="375"><figcaption></figcaption></figure></div>

<table data-full-width="true"><thead><tr><th align="center">Year</th><th data-type="number">Year</th><th align="center">Percentage Allocation</th><th align="center">Total Reward [SDEX]</th><th align="center">% of Total Supply</th></tr></thead><tbody><tr><td align="center">year 1</td><td>2023</td><td align="center">50.000%</td><td align="center">1,875,000,000.0</td><td align="center">18.750%</td></tr><tr><td align="center">year 2</td><td>2024</td><td align="center">25.000%</td><td align="center">937,500,000.0</td><td align="center">9.375%</td></tr><tr><td align="center">year 3</td><td>2025</td><td align="center">12.500%</td><td align="center">468,750,000.0</td><td align="center">4.688%</td></tr><tr><td align="center">year 4</td><td>2026</td><td align="center">6.250%</td><td align="center">234,375,000.0</td><td align="center">2.344%</td></tr><tr><td align="center">year 5</td><td>2027</td><td align="center">3.125%</td><td align="center">117,187,500.0</td><td align="center">1.172%</td></tr><tr><td align="center">year 6</td><td>2028</td><td align="center">1.563%</td><td align="center">58,593,750.0</td><td align="center">0.586%</td></tr><tr><td align="center">year 7</td><td>2029</td><td align="center">0.781%</td><td align="center">29,296,875.0</td><td align="center">0.293%</td></tr><tr><td align="center">year 8</td><td>2030</td><td align="center">0.391%</td><td align="center">14,648,437.5</td><td align="center">0.146%</td></tr><tr><td align="center">year 9</td><td>2031</td><td align="center">0.195%</td><td align="center">7,324,218.8</td><td align="center">0.073%</td></tr><tr><td align="center">year 10</td><td>2032</td><td align="center">0.195%</td><td align="center">7,324,218.8</td><td align="center">0.073%</td></tr></tbody></table>

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FlhyZ32AwzRINikrcKMkR%2FGraphique%20fini%20.png?alt=media&#x26;token=385f01f7-1054-4b94-8c5e-2cd6268271b2" alt=""><figcaption><p>Total Supply of SDEX Over Time </p></figcaption></figure>

### **Multipliers**

The distribution of SDEX tokens between the farming campaigns, staking, and the expansion of the ecosystem through mechanisms like community rewards is crucial for maintaining balance and meeting market demand. To do this, we use 'multipliers', which determine the share of SDEX allocated to each campaign. Imagine that we have a fixed number of SDEX to distribute, similar to a cake to be shared. The multipliers represent the number of slices allocated to each campaign. For example, if one campaign has a multiplier of 2 and another has 1, this means that the first campaign will receive twice the amount of SDEX compared to the second. This method allows for a flexible and responsive distribution, adapted to the changing dynamics of the crypto market.&#x20;

Currently, among the distributed SDEX, a portion is allocated to farming campaigns, another to staking campaigns, and just under half is designated for community rewards.

**Please note that on our site SmarDex.io, the multipliers are already incorporated into the Annual Percentage Rate (APR) displayed for each campaign.**

## Fees explained

On every swap, SmarDex collects a fee. Starting from Q3 2023, there will be no standard fees set. Each [Volatility Vaults](#user-content-fn-1)[^1] will have variable fees, which are governed by an algorithm. This algorithm is scheduled to be publicly disclosed through the DAO, aiming to optimize returns for Liquidity Providers (LPs). The full list of pair on all chains and the fees associated can be found in the [Fees](/overview/what-is-smardex/fees) section.

These fees are instantly utilized for a buy back of SDEX tokens, followed by redistribution. This entire cycle is automated through smart contracts, ensuring efficiency and reliability.

**On the Ethereum chain**, the fees are immediately channeled into the buy back of SDEX tokens. These tokens are then allocated to Liquidity Providers and to participants in staking.\
\
**On other chains (Polygon, Arbitrum, BSC, Base)**, the fees are similarly applied to instantly buy back SDEX tokens. From these, a portion is allocated to LPs, while the remaining part is directed towards burning SDEX tokens. This burning process is also conducted automatically through a smart contract.

## Burn Mechanism

As explained above, since the deployment of our protocol on new chains, we have established a burn mechanism to counterbalance the inflationary nature of SDEX. During each transaction on these chains (Polygon, Arbitrum, BSC, Base), a portion of the fees is immediately converted into SDEX and then destroyed. In practice, this means these SDEX tokens are sent to a null address, effectively removing them from circulation. This process not only serves to reduce the total supply of SDEX but also introduces a disinflationary characteristic to the token, thereby influencing its overall economic dynamics. You can find more info in the burn section.\
\
It's important to emphasize that all this process is automated through a smart contract and is not conducted manually by us. This ensures efficiency and transparency in the SDEX token burning mechanism.

[^1]: **Volatility Vault**: Innovative Liquidity Pools by SmarDex designed to minimize Impermanent Loss and potentially generate Impermanent Gains. They utilize a fictive reserve strategy for dynamic liquidity management, offering enhanced protection and benefits to liquidity providers while optimizing returns in the DeFi ecosystem.


# Farming Campaigns

SmarDex's Farming Campaigns enable users to support the SmarDex protocol by staking SmarDex Volatility Vaults LP tokens, while simultaneously earning rewards.

[`Click to learn how to use SmarDex protocol Farms`](/smardex-defi-platform/farming)<br>

{% hint style="info" %}
Yield farming is present in multiple DEFI protocols, but it comes with a risk of [**Impermanent Loss**](https://cointelegraph.com/explained/what-is-impermanent-loss-and-how-to-avoid-it).  \
However, SmarDex protocol in the interest of its fine-tuned algorithm provides users the phenomenon explained as <mark style="color:green;">Impermanent Gain.</mark>
{% endhint %}

### Reward calculations

The tables below displays the SDEX rewards obtained by providing liquidity for different farming LP campaigns on each chain:

{% @smardex-gitbook-integration/smardex-gitbook-integration-farming %}

{% hint style="info" %}
The Sponsored Farms do not take part into the SDEX token distribution as explained in the [Tokenomics](/overview/what-is-smardex/tokenomics). The featured projects have paid for the rewards that are distributed to the users.
{% endhint %}


# Contracts' addresses

### SmarDex Token or SDEX is the ERC20 Token which leverages the power of SmarDex Protocol

### On Ethereum

<table><thead><tr><th width="229">Contracts</th><th>Addresses on Ethereum</th></tr></thead><tbody><tr><td>SmarDex Token</td><td>0x5DE8ab7E27f6E7A1fFf3E5B337584Aa43961BEeF</td></tr><tr><td>SmardexFactory</td><td>0xB878DC600550367e14220d4916Ff678fB284214F</td></tr><tr><td>SmardexRouter</td><td>0xC33984ABcAe20f47a754eF78f6526FeF266c0C6F</td></tr><tr><td>Farming</td><td>0x7d85C0905a6E1Ab5837a0b57cD94A419d3a77523</td></tr><tr><td>Staking</td><td>0x80497049b005Fd236591c3CD431DBD6E06eB1A31</td></tr><tr><td>sUSDN</td><td>0xf67e2dc041b8a3c39d066037d29f500757b1e886</td></tr><tr><td>USDN</td><td>0xde17a000BA631c5d7c2Bd9FB692EFeA52D90DEE2</td></tr></tbody></table>

### On Polygon

<table><thead><tr><th width="229">Contracts</th><th>Addresses on Polygon</th></tr></thead><tbody><tr><td>SmarDex Token</td><td>0x6899fAcE15c14348E1759371049ab64A3a06bFA6</td></tr><tr><td>SmardexFactory</td><td>0x9A1e1681f6D59Ca051776410465AfAda6384398f</td></tr><tr><td>SmardexRouter</td><td>0xedD758D17175Dc9131992ebd02F55Cc4ebeb7B7c</td></tr><tr><td>Farming</td><td>0x7DB73A1e526db36c40e508b09428420c1fA8e46b</td></tr></tbody></table>

### On Arbitrum

<table><thead><tr><th width="229">Contracts</th><th>Addresses on Arbitrum</th></tr></thead><tbody><tr><td>SmarDex Token</td><td>0xabD587f2607542723b17f14d00d99b987C29b074</td></tr><tr><td>SmardexFactory</td><td>0x41A00e3FbE7F479A99bA6822704d9c5dEB611F22</td></tr><tr><td>SmardexRouter</td><td>0xDA3970a20cdc2B1269fc96C4E8D300E0fdDB7b3D</td></tr><tr><td>Farming</td><td>0x53D165DF0414bD02E91747775450934BF2257f69</td></tr></tbody></table>

### On Binance Smart Chain

<table><thead><tr><th width="229">Contracts</th><th>Addresses on Binance Smart Chain</th></tr></thead><tbody><tr><td>SmarDex Token</td><td>0xFdc66A08B0d0Dc44c17bbd471B88f49F50CdD20F</td></tr><tr><td>SmardexFactory</td><td>0xA8EF6FEa013034E62E2C4A9Ec1CDb059fE23Af33</td></tr><tr><td>SmardexRouter</td><td>0xaB3699B71e89a53c529eC037C3389B5A2Caf545A</td></tr><tr><td>Farming</td><td>0xb891Aeb2130805171796644a2af76Fc7Ff25a0b9</td></tr></tbody></table>

### On Base

<table><thead><tr><th width="229">Contracts</th><th>Addresses on Base</th></tr></thead><tbody><tr><td>SmarDex Token</td><td>0xFd4330b0312fdEEC6d4225075b82E00493FF2e3f</td></tr><tr><td>SmardexFactory</td><td>0xdd4536dD9636564D891c919416880a3e250f975A</td></tr><tr><td>SmardexRouter</td><td>0xF03D133627364E5eDDaB8134faB3A030cf7b3020</td></tr><tr><td>Farming</td><td>0xa5D378c05192E3f1F365D6298921879C4D51c5a3</td></tr></tbody></table>

### On Solana

<table><thead><tr><th width="230">Contracts</th><th>Address on Solana</th></tr></thead><tbody><tr><td>SmarDexToken</td><td>9dzSzFvPsKDoY2gdWErsuz2H1o4tbzvgBhrNZ9cvkD2j</td></tr></tbody></table>


# Fees

As of Q3 2023, there are no longer any default fees. Each pool has variable fees, managed by governance through an algorithm that will be made public at the DAO, to optimize performance for LPs.

{% hint style="info" %}
On the Ethereum blockchain, the burning fees are not burned but sent to the staking pool.
{% endhint %}

Here is the list of current fees:

{% @smardex-gitbook-integration/smardex-gitbook-integration-fees %}


# Glossary

Here you will find the words of the DeFi world

* **Annual Percentage Rate (APR):** In DeFi, the yearly rate of return for activities like staking or providing liquidity, not considering compounding. Useful for estimating potential earnings or costs on crypto platforms.<br>
* **Annual Percentage Yield (APY):** In DeFi, the yearly rate of return for activities like staking or providing liquidity, taking into account the effect of compounding. Helpful for understanding the potential growth of your investment on crypto platforms.<br>
* **Automated Market Maker (AMM):** An Automated Market Maker (AMM) is a type of decentralized exchange (DEX) protocol that relies on a mathematical formula to price assets. Instead of using an order book like a traditional exchange, assets are priced according to a pricing algorithm. This enables decentralized and automated trading without the need for intermediaries.<br>
* **Borrowing:** The act of obtaining assets from a decentralized lending platform by providing collateral in the form of other assets.<br>
* **Blockchain:** A decentralized and transparent digital ledger technology that securely records and verifies transactions across a network of computers, enabling trust and eliminating the need for intermediaries. It is widely used across industries for enhancing transparency, efficiency, and security in data management and transactions.<br>
* **Collateral:** Assets that are pledged to secure a loan. In DeFi, collateral is typically locked in a smart contract to ensure loan repayment.<br>
* **Cross-Chain Bridges:** Mechanisms that facilitate the transfer of assets and data between different blockchain networks, enabling interoperability and expanding DeFi capabilities.<br>
* **DEX (Decentralized Exchange):** A type of cryptocurrency exchange that operates on a decentralized network, allowing users to trade digital assets directly with each other without the need for intermediaries. DEXs provide increased privacy, control over funds, and greater resistance to censorship compared to centralized exchanges.<br>
* **DEX Tokens:** Tokens specific to decentralized exchanges, often used for governance, fee sharing, or as a reward mechanism for liquidity providers.<br>
* **Decentralized Autonomous Organization (DAO):** Organizations governed by smart contracts, where participants collectively make decisions and manage funds through voting and proposals.<br>
* **ERC20 Tokens:** A type of cryptocurrency that exists on the Ethereum platform. ERC20 tokens are stored and sent using Ethereum addresses and transactions.<br>
* **Ethereum Virtual Machine (EVM):** A runtime environment for Ethereum smart contracts. It is completely isolated from the main Ethereum network, which makes it a perfect sandbox for testing smart contracts.<br>
* **Farming:** In DeFi, the process of earning rewards by staking or lending digital assets in a cryptocurrency protocol.<br>
* **Fictive Reserve (FR):** A unique feature of SmarDex that helps manage the issue of Impermanent Loss.<br>
* **Governance Token:** Tokens that grant holders the right to participate in the governance and decision-making processes of a decentralized protocol or platform.<br>
* **Impermanent Gain (IG):** A potential gain, as theorized by SmarDex, that can be achieved by managing liquidity differently.<br>
* **Impermanent Loss (IL):** A DeFi phenomenon referring to a change in the price of tokens compared to when a market participant deposited those tokens in the pool.<br>
* **Lending:** The practice of providing loans to borrowers through decentralized lending platforms, where lenders earn interest on their deposited assets.<br>
* **Liquidity:** The availability of assets to a market or company. In DeFi, liquidity is often provided by users who receive rewards for their efforts.<br>
* **SDEX Token:** The primary token of SmarDex. It can be staked by users to earn passive income as a result of farming rewards and protocol fees.<br>
* **Smart Contract:** A self-executing digital agreement where the terms and conditions are written in code. They operate on blockchain technology, automatically carrying out transactions and agreements without needing a third-party intermediary.<br>
* **Stablecoin:** A type of cryptocurrency designed to maintain a stable value, often pegged to a fiat currency like USD. Stablecoins provide stability within the volatile crypto market.<br>
* **Staking:** Participating in a proof-of-stake (PoS) system. In the context of DeFi, it often involves staking a token to earn rewards.<br>
* **Swap:** The exchange of one asset or token for another, often done through decentralized platforms without a middleman.<br>
* **Synthetic Assets:** Tokens that represent the value of an underlying asset but do not have a direct connection to it. Synthetic assets enable exposure to various assets without owning them physically.<br>
* **Tokenomics:** The economic system governing the behavior, distribution, and use of tokens within a blockchain ecosystem or cryptocurrency project. It encompasses factors like token supply, distribution, utility, governance, and incentives for participants.<br>
* **Volatility Vault (Liquidity Pools):**\
  Liquidity Pools, essential for DEXs, are pools of tokens that facilitate transactions by providing the necessary liquidity (they are often design as pair of 2 tokens). Volatility Vaults, a SmarDex innovation, redefine these pools by employing an algorithm with a fictive reserve strategy for dynamic liquidity management. Aimed at minimizing Impermanent Loss and potentially generating Impermanent Gains, these innovative Liquidity Pools offer enhanced protection and benefits to Liquidity Providers, optimizing returns in the DeFi ecosystem. This algorithm is optimised for high volatility pools.<br>
* **Volatility Vault Liquidity Providing Tokens (LP tokens):** \
  Tokens received by liquidity providers as proof of their contribution to the Volatility Vaults at SmarDex, an evolution of traditional Liquidity Pools in decentralized exchanges. The LP Tokens symbolize the held participation and can be used for various DeFi activities, such as yield farming, illustrating SmarDex's commitment to optimizing returns and enriching the DeFi ecosystem. The LP tokens are also standard ERC20 tokens that can be transfered from a user to another or traded.<br>
* **Wrapped Tokens (WETH, WBTC):** Tokens that represent other cryptocurrencies but are wrapped in a standardized format compatible with the Ethereum blockchain.<br>
* **Yield Farming:** The process of earning passive income by providing liquidity or staking assets in various DeFi protocols to maximize returns.<br>
* **Yield Farming Campaigns:** These are specialized programs set up by DeFi platforms like SmarDex that provide additional earning opportunities. In a yield farming campaign, users stake their liquidity in specific pools for a set period to earn extra rewards, often in the platform's native token. These campaigns focus on promoting specific trading pairs or bolstering the platform's liquidity.


# SmarDex DeFi Platform

Your gateway to harnessing the true benefits of Decentralized Finance.

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FhEvkAxTAvp0XhmimvMTX%2FPage%20de%20garde.png?alt=media&amp;token=7cd09192-eefe-4e69-a206-e0a6b2296e28" alt=""><figcaption></figcaption></figure>


# Community Rewards

## Definition

The entire circulating supply of SDEX has not been fully released (for more information, please refer to [Tokenomics](/overview/what-is-smardex/tokenomics)).&#x20;

A portion of SDEX token is held in a smart contract, destinated to SmarDex users as the SmarDex ecosystem expands and new features are added. You can view the accumulated amount of SDEX here:

{% embed url="<https://smardex.io/community-rewards>" fullWidth="false" %}
Community Rewards
{% endembed %}

### Verify rewards

To view the amount of Community Rewards accumulated, visit <https://smardex.io/community-rewards>.

To verify the displayed quantity, you have to add these 2 amounts of SDEX:

1. The SDEX balance of the Ethereum wallet with the address: \
   [0xCCFf63a61D197dBD3Be666B41F6b7BA69f3Ff846](https://etherscan.io/token/0x5de8ab7e27f6e7a1fff3e5b337584aa43961beef?a=0xCCFf63a61D197dBD3Be666B41F6b7BA69f3Ff846).
2. The pending withdrawable amount of SDEX accumulated in Farming Campaign 5.

Here's how to perform the 2nd point check:

The accumulated SDEX can be checked on-chain by accessing the FarmingRange rewards distributor smart contract:&#x20;

{% embed url="<https://etherscan.io/address/0x7d85C0905a6E1Ab5837a0b57cD94A419d3a77523#readContract>" %}
FarmingRange contract, section "Read Contract"
{% endembed %}

Under section "8. pendingReward", using the parameters:

* \_campaignID (uint256): `5`
* \_user (address): `0x1E3e1128F6bC2264a19D7a065982696d356879c5`

Click on "Query"

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fq7fjnnLJjDbt1mnx8qto%2Fimage.png?alt=media&amp;token=ced05147-396f-4cdf-abff-9f677ad0e5e0" alt=""><figcaption></figcaption></figure>

The amount is given in wei of SDEX, click on the amount to get the result in SDEX:\
(in this example we have [8847353050076330214527669](https://etherscan.io/unitconverter?wei=8847353050076330214527669))

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F4MCCSe8p99VKctIBpRTs%2Fimage.png?alt=media&amp;token=29fb0a25-86c5-4789-ba03-e3aa4a4eecd5" alt=""><figcaption><p>Check under section "Ether (1)"</p></figcaption></figure>

In this example \~8,847,353.050.. SDEX have been accumulated.


# Swap Tokens

Swap at the best possible prices across multiple chains in a completely decentralized manner with SmarDex, thanks to our unique Hybrid Aggregator technology.

### Swapping/Trading

SmarDex, as a decentralized protocol, offers users a vast selection of ERC20 tokens and allows them to trade without relying on a Centralized Exchange (CEX). All actions executed are directly reflected in your personal wallet, ensuring complete ownership of your coins – your keys, your coins!

## Perform a Swap in SmarDex with 5 simple steps

### **1. Access Swap panel here :** [**https://smardex.io/swap**](https://smardex.io/swap)

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FAZiCW4QynTDV9tyrcn5x%2F0.%20Pannel%20copie.png?alt=media&amp;token=39ba8ea9-dfb4-4731-b58a-0af17d9548e7" alt=""><figcaption><p>Swap panel</p></figcaption></figure></div>

### 2. Connect your web3 wallet (ex. Metamask, Coinbase Wallet, etc.)

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FIkpAlWsgJ2Fy01d4vxed%2F1.%20Connect%20wallet%20copie.png?alt=media&amp;token=a1257a13-b598-4aa5-afa6-6d5881d4f168" alt=""><figcaption><p>Click on 'Connect Wallet'</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FazHmHVOuoLZa4YEBxgmV%2F2.%20Connect%20wallet%202%20copie.png?alt=media&amp;token=d9561bbe-3e4d-42cb-ad86-1e93c8b9e0de" alt=""><figcaption><p>Select your wallet from the list and connect it</p></figcaption></figure></div>

### 3. Choose the chain on which you want to swap your tokens

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FGpWWvAWCS3u6xU4EI9ez%2F0.%20Chose%20your%20chain.png?alt=media&amp;token=55526af2-c247-405c-88c8-719a15a53801" alt=""><figcaption><p>Click here to change chain if needed</p></figcaption></figure>

### 4. Select a token you possess from your Web3 wallet. Make sure you have enough tokens to cover the transaction's gas fees

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FD6f1haXtaZVL9wVdtnQf%2F2.%20Choix%20token%201%20-%20copie.png?alt=media&amp;token=6848061b-4796-49c9-8889-bcc3b1a7fa20" alt=""><figcaption><p>Select the token you want to swap</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F0X51Oe7HhBJ0HKjkX6Z0%2F2.%20Choix%20token%202%20copie.png?alt=media&amp;token=6a2e6e23-1b4c-42c9-9879-99a658ee8262" alt=""><figcaption><p>Select the token you wish to acquire</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FuzkdYeKABBa4uhbLHNge%2F2.%20Enter%20amount%20copie.png?alt=media&amp;token=5ed9875f-47d0-40a7-8566-b21a094e0fe9" alt=""><figcaption><p>Select the amount you want to swap</p></figcaption></figure></div>

### 5. If required, approve the token smart contract&#x20;

(For your first swap of a new token, you have first to approve the connection between your wallet and the token’s smart contract to proceed securely)

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FDhsrCD85n5vsbg4xg0Td%2F2.%20Swap%20WBTC%20-%20SDEX%20(avant%20approuve)copie.png?alt=media&amp;token=f8c4afc2-ecb2-47fd-96ba-b079dd905f5f" alt=""><figcaption><p>Click on the 'Swap' button</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fakmrn3zr0slf9kdPv6dl%2F3.%20Approuve%20token%20copie.png?alt=media&amp;token=5174fa20-c2fb-463a-950b-3a50af7d507f" alt=""><figcaption><p>Click on the 'Approuve' button</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fd9LGmGEWFJHAerVot7S5%2F4.%20Approuve%20sur%20Metamask%20copie.png?alt=media&amp;token=e79faecf-c198-4c52-a68c-e4f7041c014c" alt=""><figcaption><p>Set the authorized spending limit for the smart contract</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FbDIotynsE8zkVko1rHPq%2F5.%20Approuve%20Button%20on%20Metamask%20copie.png?alt=media&amp;token=7bd567d6-b928-4be7-b579-3f7f77415153" alt=""><figcaption><p>Approve it on your wallet</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FXFSGsiynxYIxjKDkfb1e%2F6.%20Approve%20approved%20copie.png?alt=media&amp;token=1cf9011f-b09a-452b-a40d-82c827d56e48" alt=""><figcaption><p>Approve confirmed</p></figcaption></figure></div>

### 6. Finally perform a swap of your favorite tokens successfully on SmarDex

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FDTOEdGLVHeFEIn3ejxVl%2F7.%20Confirm%20Swap%20copie.png?alt=media&amp;token=b720f661-a8fd-4e3c-898a-8112cd2537dc" alt=""><figcaption><p>Click on the 'Confirm Swap' button</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FtSKidvK4gwyYeHYzuKKc%2F8.%20Confirm%20Swap%20on%20Metamask%20copie.png?alt=media&amp;token=eafb937c-2515-470d-a740-243f0c6664d2" alt=""><figcaption><p>Confirm the transaction in your wallet</p></figcaption></figure></div>

<div align="left"><figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FmGgWYeTuEwmiUDJ40HFv%2F9.%20Swap%20succesfull%20copie.png?alt=media&amp;token=1891eb79-63ed-4808-8988-e83c6a74216c" alt=""><figcaption><p>Swap successful</p></figcaption></figure></div>

{% hint style="warning" %}
SmarDex supports a variety of vetted ERC20 tokens and reputable tokens. You can also import custom tokens by using their smart-contract address on the respective blockchain. However, please conduct thorough research and ensure you are fully aware of the safety and legitimacy of the tokens before importing and trading. Always perform your own due diligence.
{% endhint %}


# Volatility Vaults

Volatility Vaults are simply SmarDex's Intelligent Liquidity Pools

### Quick overview

In a DEX[^1], you can play both roles: either trade one cryptocurrency for another (swap), or provide liquidity (by depositing tokens) so that other users can trade.

For such a system to work, a DEX utilizes Liquidity Pools which are made up of pairs of tokens. For instance, if a user wants to trade their ETH for WBTC, then the protocol will deposit the ETH into the ETH-WBTC Liquidity Pool and withdraw WBTC. The price automatically adjusts using a mathematical formula ([Click here for more explanation](/overview/what-is-smardex/inside-smardex-algorithm#amms-and-the-k-constant-equation)).

Therefore, if a user wants to provide their tokens to the protocol to generate a yield, they must do so in pairs and add this pair of tokens to a Liquidity Pool. For example, if I have ETH and WBTC, then I provide liquidity in the ETH-WBTC Liquidity Pool.

When a user provides liquidity to a Liquidity Pool, they will receive a number of Liquidity Provider tokens (LP tokens) proportional to their share of the Liquidity Pool. If there's a farming campaign available for the Liquidity Pool they've contributed to, then they can farm these tokens and benefit from very attractive yields ([more information here](/smardex-defi-platform/farming)).

### Introducing Volatility Vaults

SmarDex stands out as a DEX[^1] for one particular reason: it is the first to have found a real solution to the [Impermanent Loss](#user-content-fn-2)[^2] problem that plagues DeFi. Indeed, after two years of research, the SmarDex team has developed an algorithm capable of reducing [Impermanent Loss](#user-content-fn-2)[^2] in 100% of cases. This method is completely automated, based on mathematical principles, and agnostic. In other words, by providing liquidity to SmarDex, you are guaranteed to experience less [Impermanent Loss](#user-content-fn-2)[^2] than on any other existing DEXs[^1], including the famous Uniswap. You might even achieve [Impermanent Gain](#user-content-fn-3)[^3] depending on the circumstances.

**This algorithm is directly integrated into our Liquidity Pools. Thus, we have unique and intelligent Liquidity Pools. That's why we decided to rename them "Volatility Vault".**

This name reflects the fact that our Liquidity Pools leverage market volatility. The more volatile the market, the more significant our performance compared to the competition.

### Particularity in providing liquidity on SmarDex

The value of the two tokens in USD may not be equal on SmarDex, which differs from other DEXs that typically use a 50/50 USD value split for both tokens. SmarDex's pricing is based on its unique algorithm that uses fictive reserves, which are not directly proportional to the actual reserves in the contract.

This algorithm rebalances the reserves to maintain a favorable Liquidity Pool for liquidity providers. When adding or removing liquidity, the contract's real reserves are used instead of the fictive ones, potentially leading to a discrepancy in the value of the two tokens. For instance, to contribute $2500 worth of tokens, you might need $1500 in ETH and $1000 in WBTC.\
\
For more information concerning the functioning of the fictive reserves, please refer to the [Whitepaper](/smardex-technology/whitepaper)

## How to Add Liquidity

### **1. Navigate to Liquidity Tab**

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FzOH1Ei2LaitKTP6DJCUf%2FNavigate%20Liquidity%20page.png?alt=media&amp;token=d91f7ff8-5563-42b3-b49f-3f5e81735069" alt=""><figcaption><p>Liquidity page</p></figcaption></figure>

### 2. Connect your web3 wallet (ex. Metamask, Coinbase Wallet, etc.)

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FPVUK6k9agO16zi6UNCgs%2F1.Connect%20Wallet%20%20copie.png?alt=media&amp;token=e6749b3e-bfda-43d7-b361-fe3c567ddcd6" alt=""><figcaption><p>Click on 'Connect Wallet'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fk0A6T9RJ9Tu4aO3IyEdr%2F2.%20Chose%20Wallet-%20copie.png?alt=media&amp;token=2090b828-b01d-41ce-b3fb-501bc8d7057f" alt=""><figcaption><p>Select your wallet from the list and connect it</p></figcaption></figure>

### 3. Make sure you're on the chain you want to use

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fc65F2gZloVxwizmQ6I1w%2F1.%20check%20the%20chain.png?alt=media&amp;token=d96d35d4-313a-45a1-b4b1-411d0affefdd" alt=""><figcaption><p>You can change chain by clicking here</p></figcaption></figure>

### 4. Open a new position&#x20;

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FnQOJCHhNqPJhEDLpSbvt%2F3.%20New%20Positition%20-%20copie.png?alt=media&amp;token=e2da7645-5ab7-4062-b97b-ecfc47922781" alt=""><figcaption><p>Click on 'New position'</p></figcaption></figure>

### **5.** Choose the pair of tokens you want to add to the Volatility Vault

(Make sure you have these tokens in your wallet)

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FBByL4mZP4kgHALm1Et9N%2F4.%20Chose%20your%20pair%20-%20copie.png?alt=media&amp;token=c1a5f6da-1081-4d2d-8610-5914300b35e8" alt=""><figcaption><p>Chose the pair of tokens you want to add to the Volatility Vault</p></figcaption></figure>

### 6. Chose the amount you want to add to the Volatility Vault&#x20;

As mentioned earlier, unlike other DEXs where an equal 50/50 contribution is required, at SmarDex, thanks to our algorithm that reduces IL, the token contribution can be unbalanced. For example, to contribute $2500 in liquidity, the distribution might require $1500 in SDEX and $1000 in USDC.

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FEXLh2jExUyil9veyfb1g%2F5.%20Chose%20the%20amout%20of%20tokens%20-%20copie.png?alt=media&amp;token=16a53216-bb20-4dce-aa37-4a4fe1e0626f" alt=""><figcaption><p>Chose the amount of token you want to add to the Volatility Vault</p></figcaption></figure>

**Quick tip:** Knowing the exact amount of each token to add to our Volatility Vaults at any moment can be challenging. That's why, if you have sufficient quantities of both tokens you wish to add, you can utilize our 'Max' buttons to determine the correct amount of tokens to contribute. Here's how: Click the 'Max' button for the first token and check if you can add liquidity. If it indicates 'Balance too low', then click the 'Max' button for the second token, you'll be able to add liquidity. See the example in the images below:

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FwbR0L4jE0qLNP1MKNr87%2F6.%20Use%20the%20Max%20button%201%20et%202.png?alt=media&amp;token=bec6377c-45c7-4700-b72b-872481c511d3" alt=""><figcaption><p>Here are the 'Max' buttons of each tokens</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FYsdG6UpaQ40uFsvm2KH9%2F7.%20Balance%20too%20low%20(Max%20button%20%2B%20emoticons)%20-%20copie.png?alt=media&amp;token=b4f70728-dd05-4815-a352-a7ca17923823" alt=""><figcaption><p>Example of 'Balance too low' when clicking the first 'Max' button</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FDu4StttXe3u7trrv7FoO%2F8.%20Balance%20ok%20(Max%20button)%20-%20copie.png?alt=media&amp;token=f8437d01-844c-4f9f-b667-33a865214768" alt=""><figcaption><p>Example of good balance by clicking on the second 'Max' button. You can now add liquidity</p></figcaption></figure>

### 7. If required, approve the token smart contract&#x20;

(For your first interaction with a new token, you have first to approve the connection between your wallet and the token’s smart contract to proceed securely)

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FOOfAGDiomz1CligrBOYL%2F8.%20Approuve%20token%201%20-%20copie.png?alt=media&amp;token=b26130f2-6fc4-4395-bcfb-992d7d9ea7f9" alt=""><figcaption><p>Approve the first token by clicking on the 'Approve' button</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F3AOeLSUddzCFSuBoFj5F%2F9.%20Approuve%20token%201%20(next%20on%20MM)%20%20-%20copie.png?alt=media&amp;token=6514c12a-61b6-4c71-9460-66f466f5ae67" alt=""><figcaption><p>Set the authorized spending limit for the smart contract and click 'Next'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FgUpPRp4Jlhbk8qXbWp8z%2F10.%20Approuve%20token%201%20(Approve%20on%20MM)%20-%20copie.png?alt=media&amp;token=3bf52897-5765-4a9b-a2c6-fc0a2faf8228" alt=""><figcaption><p>Approve it on your wallet</p></figcaption></figure>

If required, do the same operation for the second token.

### 8. Add liquidity&#x20;

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Frq4qWjfLqzxpfHEC1MNw%2F14.%20Add%20liquidity%20%20-%20copie.png?alt=media&amp;token=a6e932e6-8d5b-4f66-8ddf-3b55ea6f3747" alt=""><figcaption><p>Click on 'Add Liquidity'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FJkl1d6iYJK6Il1UXysMW%2F15.%20Add%20liquidity%20(Confirm%20on%20MM)%20copie.png?alt=media&amp;token=0fc7e095-b7cd-49d1-8125-0ca2120a8451" alt=""><figcaption><p>Confirm on your wallet</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FmZBSoJnAZ2xPOwpdGql8%2F16.%20Liquidity%20added%20suuccesfully%20%20-%20copie.png?alt=media&amp;token=6c3ef21b-b83e-4ea4-bea7-d86ed0d1909f" alt=""><figcaption><p>Your liquidity has been successfully added to the Volatility Vault!</p></figcaption></figure>

If the Volatility Vault you just added liquidity on has a farming campaign, you can now farm your LP tokens. See how to do that [here](/smardex-defi-platform/farming#how-to-use-smardex-protocol-farms).

## If you've added liquidity to a Volatility Vault and it doesn't appear on the Liquidity Page:

There might be occasions when the front end fails to locate your Vault, possibly due to technical issues or because the vault involves a particularly rare token. If you encounter this, don't worry; you have the option to manually import your vault. Simply follow the steps outlined below:

### **1. Navigate to Liquidity Tab**

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FJnt0sgwmS1mpdWrAhVD0%2F0.%20No%20Vault%20found%20copie%20.png?alt=media&amp;token=21ab4613-dc74-4a16-ae2e-04b69292993e" alt=""><figcaption><p>No Volatility Vault found on the liquidity page</p></figcaption></figure>

### 2. Import a Volatility Vault&#x20;

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FdFqgMbbIGmCzLdCabIbL%2F1.%20click%20on%20'Import%20VV'%20-%20copie.png?alt=media&amp;token=8dc8dcab-aa1d-4fdd-9310-1f325a18bdba" alt=""><figcaption><p>Click on 'Import Volatility Vault'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FKHr2cbNs5aWOqQ50TiLH%2F2.%20Chose%20your%20token%20-%20Copie.png?alt=media&amp;token=7525d9a4-44f9-4ced-8d98-36665f05cb25" alt=""><figcaption><p>Select the correct tokens</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FR7tW86mz4wvReAYrPy8I%2F2.%20Click%20on%20'Import%20Liquidity%20pool'%20%20-%20copie.png?alt=media&amp;token=29ed5478-bd19-4cf3-85c3-0151907d22dc" alt=""><figcaption><p>Click on 'Import Liquidity Pool'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FsYuLUckvj2WLz4YtgpY3%2F3.%20Vault%20imported%20successfully.png?alt=media&amp;token=19d8f385-b99d-4ff2-8e8a-e66704044503" alt=""><figcaption><p>Volatility Vault imported successfully</p></figcaption></figure>

The next step is to farm your **Volatility Vault LP tokens**. More information in the next section.&#x20;

[^1]: **DEX (Decentralized Exchange):** A type of cryptocurrency exchange that operates on a decentralized network, allowing users to trade digital assets directly with each other without the need for intermediaries. DEXs provide increased privacy, control over funds, and greater resistance to censorship compared to centralized exchanges.

[^2]: **Impermanent Loss (IL):** A DeFi phenomenon referring to a change in the price of tokens compared to when a market participant deposited those tokens in the pool.

[^3]: **Impermanent Gain (IG):** A potential gain, as theorized by SmarDex, that can be achieved by managing liquidity differently.


# Farming

The key to realizing your financial goals. Unlock financial growth through crypto farming. Plant your seeds and watch your crypto grow!

### **Introduction to the Concept**

For a decentralized exchange (DEX) like SmarDex to function efficiently, it relies on the lending of tokens by its users. These tokens facilitate transactions between different participants. Liquidity providers, by fueling the [Volatility Vaults](#user-content-fn-1)[^1] with their paired tokens, are at the heart of this system. In recognition of their vital contribution, SmarDex rewards these contributors with [Volatility Vaults LP tokens](#user-content-fn-2)[^2] (also called LP tokens), distributed proportionally to their contribution in the [Volatility Vault](#user-content-fn-1)[^1]. These tokens not only entitle them to a portion of the fees generated from transactions within this [Volatility Vault](#user-content-fn-1)[^1] but also offer additional rewards through farming.

### **The Importance of Liquidity**

The liquidity of a [Volatility Vault](#user-content-fn-1)[^1] is paramount for ensuring seamless trades, contributing to the smooth operation of the platform, which is crucial for an optimal user experience and market efficiency. To stimulate this essential liquidity, SmarDex launches Farming Campaigns to reward liquidity providers. They simply need to stake their [LP tokens](#user-content-fn-3)[^3] in the corresponding farming pool to receive attractive rewards.

### **The Farming Process Explained**&#x20;

Imagine that you invest $3,000 in the ETH-WBTC [Volatility Vault](#user-content-fn-1)[^1] on SmarDex, which has a total liquidity of $100,000. Your contribution thus represents 3% of the total liquidity of this [Volatility Vault](#user-content-fn-1)[^1], and you accordingly receive 3% of the corresponding LP tokens. To benefit from the rewards of the Farming Campaign, you need to go to the "Farming" section on SmarDex.io and stake your [LP tokens](#user-content-fn-3)[^3] in the corresponding farming pool. By doing this, you activate your right to collect the yields promised by the active farming campaign.<br>

## How to use SmarDex protocol Farms

### 1. Navigate Farming Tab

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FcOVujMES6ZHv2tUNniEg%2F0.%20navigate%20the%20farming%20tab.png?alt=media&amp;token=f78b5e72-43e1-411d-af18-f6a894ecf3b5" alt=""><figcaption><p>Farming page</p></figcaption></figure>

### 2. Connect your web3 wallet (ex. Metamask, Coinbase Wallet, etc.)

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FwovznGzAJlGOkyykjQsH%2F1%20Connect%20Wallet%20-%20copie.png?alt=media&amp;token=562b9a71-49e6-4436-a694-4650e239082a" alt=""><figcaption><p>Click on 'Connect Wallet'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FJmChWDksNR6st9CjfJy4%2F2.%20Select%20Wallet%20-%20copie.png?alt=media&amp;token=bdd000f3-a436-430e-b2d0-35a51d918120" alt=""><figcaption><p>Select your wallet from the list and connect it</p></figcaption></figure>

### 3. Make sure you're on the chain you want to use

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FgMzd1VzWOEwjslYzWbJP%2F3.%20Click%20here%20to%20change%20chain%20-%20copie%20.png?alt=media&amp;token=caf47189-e8bc-4fbf-8939-e370f33fe273" alt=""><figcaption><p>You can change chain by clicking here, in this example we are connected to polygon</p></figcaption></figure>

### 4. Select the Farm associated with the token pair you've added to the Volatility Vault

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F4wTQHGiF78zp1YoLhMBI%2F5.%20Select%20the%20pair%20you%20add%20liquidity%20in%20th%20Vault%20-%20copie.png?alt=media&amp;token=16b2669e-cd8d-4b15-b598-5a986d680341" alt=""><figcaption><p>Click on the corresponding farming pool</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FW7kaobeQOGP5BY319zpx%2F6%20Farm%20selectione%CC%81e%20-%20copie.png?alt=media&amp;token=45ac3245-eb53-43b3-ad76-6670610c6940" alt=""><figcaption><p>Ready to stake LP tokens</p></figcaption></figure>

### 5. Start to stake your LP token

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FiGbgLotefoJBNxtjZajg%2F7.%20Click%20on%20'Stake%20LP'%20copie.png?alt=media&amp;token=f75b71ae-b940-4eb0-a7d2-17e97eb4ddde" alt=""><figcaption><p>Click on 'Stake LP'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FaSCbGFQKBzjYxDrAzCJD%2F8.%20Choose%20the%20amount%20-%20copie.png?alt=media&amp;token=54a7da7b-752d-4e3a-ab16-15901a539bdb" alt=""><figcaption><p>Choose the amount of LP token you want to farm</p></figcaption></figure>

### 6. Approve the LP token smart contract to interact with your wallet

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FtEMqz2rEBMSujpTXsvr3%2F9.%20Approve%20LP%20token%20-%20copie.png?alt=media&amp;token=77e67770-f3a9-45af-863e-0f6e4222a0bb" alt=""><figcaption><p>Approve LP token to interact with your wallet</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FFY2tRl33nicWDMN3G3Aq%2F10.%20Chose%20the%20spending%20cap%20request%20-%20copie.png?alt=media&amp;token=060e62e1-a43a-4a42-a3ac-b8fd8d945789" alt=""><figcaption><p>Set the authorized spending limit for the smart contract and click 'Next'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FRcdzhiAJtxuCd84pticw%2F11.%20Approve%20on%20MM%20-%20copie.png?alt=media&amp;token=651157ae-607e-4eeb-ba54-df08615e6592" alt=""><figcaption><p>Approve it on your wallet</p></figcaption></figure>

### 7. Confirm the farming of your LP tokens

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F2CRGgQkh56Or4Qpb2XUP%2F13.%20Confirm%20-%20copie.png?alt=media&amp;token=c52404c7-237e-4ac1-8ec3-7ca59a564c83" alt=""><figcaption><p>Click on 'Confirm'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Ffx3KvWh3WYm8TpthdSjN%2F14.%20Confirm%20on%20MM%20-%20copie.png?alt=media&amp;token=0cdbce0e-6264-441e-8769-211635e0348b" alt=""><figcaption><p>Confirm in your wallet</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FjAnbNbEVQN9aNnUld8QT%2F15.%20Stake%20LP%20token%20succesfully%20-%20copie.png?alt=media&amp;token=4601ca08-1e2a-4e49-9526-7768ba44c043" alt=""><figcaption><p>Your LP tokens have been successfully staked in the Farming Pool!<br>You can verify it by checking the staked amount (here 65.02 usdc.e and 3176.48 SDEX, all worthing ~ 143$ at this time)</p></figcaption></figure>

###

### You can then easily harvest your rewards, unstake, or stake more LP tokens as desired

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FvLbYDe3unz5vUWGbHAAE%2F16.%20Manage%20your%20stakes%20.png?alt=media&amp;token=070cf42b-3515-4336-8a31-777925c076d4" alt=""><figcaption><p>Manage your stakes</p></figcaption></figure>

[^1]: SmarDex's intelligent Liquidity Pools

[^2]: **Volatility Vault Liquidity Providing Tokens (LP tokens):** \
    These are tokens received by liquidity providers as proof of their contribution to a Liquidity Pool (Volatility Vaults at SmarDex) in a decentralized exchange. LP Tokens signify the stake held and can be used for various DeFi activities, such as yield farming.

[^3]: **LP tokens (or Volatility Vault LP token):** \
    These are tokens received by liquidity providers as proof of their contribution to a Liquidity Pool (Volatility Vaults at SmarDex) in a decentralized exchange. LP Tokens signify the stake held and can be used for various DeFi activities, such as yield farming.


# Staking

Staking SDEX Token, provides an additional way of earning passive income and extra gains on your Investment !

## How to Stake SDEX tokens&#x20;

### 1.Navigate to Staking Tab

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FNBQSw02bDRAmAUhNGv4d%2F0.%20Navigate%20the%20Stake%20tab.png?alt=media&amp;token=321a9c47-5452-4d2b-a37b-179516745b42" alt=""><figcaption><p>Staking page</p></figcaption></figure>

### 2. Connect your web3 wallet (ex. Metamask, Coinbase Wallet, etc.)

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F7UDvjOzFEgY9mbkFOX77%2F1.%20Connect%20your%20wallet%20(staking).png?alt=media&amp;token=ca798298-be7d-48bc-8e63-a04a792c0381" alt=""><figcaption><p>Connect your wallet</p></figcaption></figure>

### 3. Stake your SDEX

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F4nDJ13933hnpMQThEWjf%2F2.%20Click%20here%20to%20open%20the%20stake%20position%20.png?alt=media&amp;token=2ab76abf-7854-4486-b235-333f06bc7739" alt=""><figcaption><p>Click here</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F4fCkfsgmrenBvRsZmqcS%2F3.%20Click%20on%20Stake%20SDEX.png?alt=media&amp;token=6fe85b9e-fce7-4a14-97cf-289e02aedc1b" alt=""><figcaption><p>Click on 'Stake SDEX'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FPn329rSjYysXo1hcmmAg%2F4.%20Chose%20the%20amount%20you%20want%20to%20stake.png?alt=media&amp;token=b4c8fa48-d36e-47cc-ab86-60454e329d1b" alt=""><figcaption><p>Enter the amount you want to stake or select the %</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2F07QfMxtqZLJdADYD7Iyv%2F5.%20Confirm%20your%20stake.png?alt=media&amp;token=6562ec1e-eb1a-4a21-a721-0c121a0f9745" alt=""><figcaption><p>When you have chosen the amount, click on 'Confirm'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FnhLWLLDDfOov3qy69Zjz%2F6.%20Confirm%20in%20MM%20(staking).png?alt=media&amp;token=8d05f11f-4344-43c1-a0cb-e412eadd732d" alt=""><figcaption><p>Confirm in your wallet</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FB6vT5MLUeapEInMv5wmy%2F7.%20Stake%20Succesfull.png?alt=media&amp;token=b3306400-e10e-4405-8fe8-b83bcf975259" alt=""><figcaption><p>SDEX successfully staked</p></figcaption></figure>

## Add or remove staking SDEX easily

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fa6gq0d0p9qFHrBa9TwFX%2F1.%20Unstake%20et%20Stake%20more.png?alt=media&amp;token=54c08dd5-8372-47a7-bc9d-1778fa78f4e4" alt=""><figcaption><p>Click '-' if you want to unstake, and '+' if you want to stake more.</p></figcaption></figure>

### Example of unstaking SDEX

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2Fz52RLvCw74tM5IGhtXSV%2F1.%20Unstake%20'-'.png?alt=media&amp;token=4e4b8ad4-9de3-4ea1-b861-06dc7ab16669" alt=""><figcaption><p>Click on the '-' button</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FRsCNIJC79KGSszJ7kzRi%2F2.%20Chose%20the%20amount%20you%20want%20to%20unstake.png?alt=media&amp;token=4dba8e24-98bc-459b-a9ff-2571a8c64000" alt=""><figcaption><p>Enter the amount you want to unstake or select the %</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FZFeOrTwjnyLsjY81j17h%2F3.%20Confirm%20the%20Unstake%20amount%20.png?alt=media&amp;token=477a40cb-3a96-42d8-a763-0940fba63e28" alt=""><figcaption><p>When you have chosen the amount, click on 'Confirm'</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FEA2GHYoNwo7CimtXKoEz%2F4.%20Confirn%20Unstake%20in%20your%20wallet.png?alt=media&amp;token=39833d10-d950-41a3-b3b5-947fd38c4625" alt=""><figcaption><p>Confirm in your wallet</p></figcaption></figure>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FQqwVgd0aMvicLfz2Sb9D%2F5.%20Unstake%20Confirmed.png?alt=media&amp;token=6fb9019d-ae2c-4e52-954a-824fc4f08ed3" alt=""><figcaption><p>SDEX successfully unstaked</p></figcaption></figure>


# Whitepaper

You may find the white paper here:

{% embed url="<https://www.academia.edu/98332701/The_SMARDEX_Protocol_A_Novel_Solution_to_Impermanent_Loss_in_Decentralized_Finance>" %}

\
It can also be downloaded here:

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


# Understanding the Undisputable Advantage of SmarDex

## What the problem is:

In DeFi, Impermanent Loss is a major issue for liquidity providers who expect to earn a return through fees when they provide liquidity on a DEX. Unfortunately, the fees often represent a low annual return percentage and may not be sufficient to offset the Impermanent Loss, resulting in a net loss for liquidity providers. This is a significant problem because liquidity providers are essential to the operation of DEXs. If there are not enough incentives to encourage their participation, the DeFi ecosystem is at risk of failure.

Farming protocols have emerged as a way to incentivize liquidity providers better by allowing them to earn additional tokens by staking LP-tokens. However, these protocols often mint new tokens infinitely, making them unsustainable in the long term. The resulting excessive dilution and constant sell pressure can negatively affect the price of the tokens, making them insufficient as a solution to the IL problem.

Despite the challenges, liquidity providers remain critical to the success of DEXs, and it is essential to find better ways to incentivize their participation to ensure the continued growth of the DeFi ecosystem. Without sufficient incentives, liquidity will gradually disappear, making it disadvantageous for liquidity providers to invest in DEXs that operate in this manner, and the future of these DEXs is uncertain.

## SmarDex can generate Impermanent <mark style="color:green;background-color:green;">Gain</mark> instead of <mark style="color:red;">Loss</mark>

<figure><img src="https://3219149788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FczLG78BsP0caLuIrQOod%2Fuploads%2FZ3PyhKdcFuN4Mi5MX83n%2Fimage.png?alt=media&amp;token=e200a07e-6a09-4f6c-b957-0c64c4d6b4a1" alt=""><figcaption></figcaption></figure>

### As shown in our [White Paper](https://docs.smardex.io/smardex-technology/whitepaper)...

As demonstrated in our [White Paper](https://docs.smardex.io/smardex-technology/whitepaper), SmarDex has introduced a technology that effectively addresses Impermanent Loss and can even generate Impermanent Gain in many cases. The various scenarios presented suggest that the technology is efficient and that older DEXs like UniSwap will soon become outdated.


# Quick Overview

Ultimate Synthetic Delta Neutral

### **USDN (Token)**

[The USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) is the first [synthetic U.S. dollar](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#synthetic-dollar) backed by a structured product utilizing a [delta-Neutral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/inside-the-protocol/protocol-vs-market-fluctuations) strategy. Unlike traditional [stablecoins](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#stablecoin), whose value is guaranteed by centralized entities, the value of a synthetic dollar is determined by a purely mathematical financial process.

### **Why Does the Market Need USDN?**

Stablecoins represent a market with over $100 billion in circulation. However, they generally offer no yields to their users. SmarDex seeks to revolutionize this model by introducing the USDN token, a fully decentralized synthetic U.S. dollar that maintains a stable value, oscillating around the dollar's price while generating profits for its holders.

### **USDN Protocol**

The USDN token relies on the "[USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol)", a fully on-chain system based on the [Ethereum blockchain](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#blockchain-layer-1). This decentralized protocol uses smart contracts to ensure the token’s stability and security, providing transparency and reliability for all users.

The functioning of the USDN protocol is based on the collaboration between two types of participants:

1. Those who expose themselves to the USDN token to benefit from its potential yield.
2. Traders who open leveraged long positions on the underlying asset.

This interaction between the two sides forms the USDN protocol, creating a delta-neutral structured product. Together, they ensure the stability of a synthetic U.S. dollar while generating attractive yields—all within a fully decentralized framework.

Thus, the USDN token, as a yield-generating synthetic dollar, should not be confused with the USDN protocol, the decentralized infrastructure that enables its stability and yield.


# Protocol USDN Overview

To help you visualize what [the USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) and the [delta-neutral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#delta-neutral) [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) that supports it are, imagine it as a game between two sides:

* **The vault side:** for those who prefer exposure to the US dollar with added potential [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) through the USDN token.
* **The long side:** for those who prefer exposure to the underlying asset with leverage.

These two groups pursue different goals, but their interactions maintain the protocol’s balance and ensure the stability of the USDN token around $1.

***

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FOnShYP7CydJTgXzHaqyG%2FFigure%201.png?alt=media&amp;token=4948794d-e87b-4dad-9ee0-16c0666c447b" alt=""><figcaption></figcaption></figure>

***

### Vault Side

The left side includes users who wish to obtain the USDN token. They deposit an amount of the underlying asset into the protocol, specifically into the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault), which allows the protocol to [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) an equivalent amount in value of the USDN token. The opposite operation can be performed: returning their USDN token in exchange for the corresponding amount of the asset, with the returned USDN token being burned. The vault side therefore consists of the vault, where users deposit their asset, and the circulating supply of the USDN token, which corresponds to the amount of USDN issued in exchange for the deposited asset.

### Long Perpetual Side

On the opposite side, there are those who want exposure to the underlying asset with [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage). They use our [long-only perpetual](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#perpetual-long-only), deposit [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral), and choose the leverage they want to apply. Their position consists of the collateral in the underlying asset and the [trading exposure](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#trading-exposure), which corresponds to the increase in their exposure due to leverage. Together, these two elements form the [total exposure](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#total-exposure). For example, if the underlying asset is ETH and a user deposits 1 ETH as collateral with 5x leverage, they will have 1 ETH as collateral and 4 ETH as trading exposure, giving a total exposure of 5 ETH.

These two sides form the USDN protocol, which is delta-neutral and enables the creation of the USDN token, a yield-generating [synthetic dollar](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#synthetic-dollar). We will now see how all of this works.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FqSTDdeutw7upbEfJAYxv%2FFigure%202.png?alt=media&amp;token=67d13068-9673-43c5-be37-938a2271a488" alt=""><figcaption></figcaption></figure>

***

## USDN Value

The value of the USDN token is directly linked to the dollar value of the assets held in the vault. Every time a user deposits assets into the vault, USDN tokens are created (minted) based on the value of those assets. The total amount of USDN tokens in circulation is therefore backed by the assets held in the vault.&#x20;

For example, if the underlying asset is ETH, and it's worth $1,000:

* If the vault contains 1 ETH, valued at $1,000, and 1,000 USDN tokens in circulation, then 1 USDN token = 1 USD.
* If the vault contains 1.5 ETH, valued at $1,500, and 1,000 USDN tokens in circulation, then 1 USDN token = 1.5 USD.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2F8KX1T2T1lvDrBovUwImh%2FFugure%203.png?alt=media&amp;token=40bf6fd8-ccd3-47b7-8cc3-ebf79ee06fa7" alt=""><figcaption></figcaption></figure>

In the latter example, the price of 1 USDN token is very far from the 1 USD target. To make sure the value of 1 USDN token is always around this target, the USDN token can inflate the holders' balance so that it keeps its value as close as possible to it.

Example, a user possesses 1 USDN:

* If 1 USDN token is valued at 1 USD, then their balance will stay at 1 USDN token.
* If 1 USDN token is valued at 1.5 USD, then their balance will change to 1.5 USDN tokens, bringing back the value of 1 USDN token to 1 USD.

This mechanism is called a rebase.

The USDN token will only rebase if its price is above 1 USD, if the price falls below, nothing will happen and the balance of holders will not decrease.


# Simplified Examples

We will demonstrate through simplified examples how the price of the USDN token can remain stable even if the price of the underlying asset rises or falls. This is the delta-neutral strategy.

## Initial Situation: Underlying Asset Is ETH, Priced at $1,000

#### **Long Side**

* A trader bets on the rise of ETH. They deposit 4 ETH as collateral and use 3x [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage). This gives them a total exposure of 12 ETH (4 ETH x 3 = 12 ETH), representing a total exposure of $12,000.

The different components of their position are:

* **Total Exposure**: Their total exposure to the market → 12 ETH ($12,000).
* **Trading Exposure**: The synthetic part of their exposure that represents the leverage, which cannot be withdrawn → 8 ETH ($8,000).
* **Collateral**: The real part of their exposure, which they can actually withdraw. This is the collateral they deposited → 4 ETH ($4,000).

#### **Vault Side**

* A user deposits 8 ETH into the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault). These 8 ETH are worth $8,000. In exchange, they receive 8,000 USDN (each USDN being backed by $1 of ETH).&#x20;
* The vault therefore holds 8 ETH ($8,000), which corresponds to the total value of the 8,000 USDN in circulation.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2F0tiVvUckr5XmpEooEt6Q%2FFugure%208.png?alt=media&amp;token=e53ac875-203c-46da-9a6a-82bee0608308" alt=""><figcaption></figcaption></figure>

***

## If the Price of ETH Rises from $1,000 to $1,200

#### **Long Side**

* **Total Exposure**: The trader maintains a total exposure of 12 ETH, but the value of this exposure increases from $12,000 to $14,400.
* **Trading Exposure**: Their trading exposure (the "synthetic" part that represents the leverage) remains at $8,000. However, with the increase in the price of ETH, this now corresponds to 6.67 ETH instead of the initial 8 ETH.
* **Collateral**: The gain generated by the increase in ETH's price is transferred to the collateral part of the long, which increases from 4 ETH ($4,000) to 5.33 ETH ($6,400). This is the portion the trader can withdraw, as their PnL (profit and loss) is credited here.
* **PnL**: This scenario nets a profit of 1.33 ETH for the user.

#### Vault Side

* To pay the PNL of the long trader, the protocol transfers 1.33 ETH from the vault to the long's&#x20;
* Before the price increase, the vault contained 8 ETH (with a total value of $8,000).
* After transferring 1.33 ETH to the trader's collateral, 6.67 ETH remains in the vault.&#x20;
* However, since the value of ETH has increased by $200, these remaining 6.67 ETH are still worth $8,000. This ensures that the 8,000 USDN in circulation remain backed by $8,000, thereby maintaining the USDN peg at $1.

However, since the value of ETH has increased by $200, these remaining 6.67 ETH are still worth $8,000. This ensures that the 8,000 [USDN tokens](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) in circulation remain backed by $8,000, thereby maintaining the USDN token peg at $1.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2F1M5SxteSmlSqdNvyXN9J%2FFigure%209.png?alt=media&amp;token=a0cd8716-5255-405d-8204-abfb1683ab17" alt=""><figcaption></figcaption></figure>

***

## If the Price of ETH Drops from $1,000 to $800

**Long Side**

* **Total Exposure:** the trader maintains a total exposure of 12 ETH, but the value of this exposure decreases from $12,000 to $9,600.
* **Trading Exposure:** their trading exposure (the portion tied to leverage) remains at $8,000, but since the price of ETH has fallen, this now corresponds to 10 ETH instead of the initial 8 ETH.
* **Collateral:** the drop in ETH's price directly impacts the value of their collateral, which decreases from 4 ETH ($4,000) to 2 ETH ($1,600).
* **PnL:** this scenario nets a loss of 2 ETH for the user.

**Vault Side**

* To compensate for the long side's loss, the vault receives 2 ETH from their collateral.
* Before the drop in ETH’s price, the vault contained 8 ETH (worth $8,000).
* After recovering these 2 ETH, the vault now holds 10 ETH.&#x20;
* Even though the price of ETH has fallen to $800, the total value of the 10 ETH in the vault is still $8,000. This ensures that the 8,000 USDN in circulation remain backed by $8,000, thereby maintaining the USDN peg at $1.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2F3xCqfRSSDv5EfwEzGLIF%2FFigure%2010.png?alt=media&amp;token=a1debd2a-bc7d-4e65-8d08-7fac2c9452de" alt=""><figcaption></figcaption></figure>

### Conclusion

When the price of ETH rises, the Vault covers the gains of the Long positions, while the value of USDN remains stable. Conversely, when the price of ETH falls, it is the Long traders who absorb the losses, thereby ensuring the stability of USDN. This mechanism is at the core of the Protocol’s Delta-Neutral strategy.

Of course, this example has been intentionally simplified. In reality, the Protocol will be used by many participants and will operate in a fully decentralized and permissionless manner. The goal here is to illustrate the basic functioning of the Protocol in an accessible way. In the following sections, we will explore in detail the mechanisms that constantly maintain the Protocol’s equilibrium, ensuring its Delta-Neutral state, as well as the ways in which users on the USDN side can generate yields.


# Protocol Balance

The [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) is permissionless, meaning that users can [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) or [redeem](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token), as well as open or close [long positions](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) at any time. This freedom of action implies that the protocol is never static and remains in constant motion. To maintain balance and ensure that the price of the USDN token stays close to $1, we have designed the protocol to naturally seek this equilibrium at all times.

To achieve this goal, we have implemented mechanisms such as the [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/vault-side/yields/funding-rates), which continuously adjusts participants' positions to encourage stability. Additionally, safety measures such as the [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator) are integrated to prevent excessive imbalances, ensuring the robustness and security of the Protocol for all users.

In this section, we will begin by defining what we mean by the state of equilibrium in the USDN protocol. We will then explain how the funding rate encourages the protocol to move toward this equilibrium, while the dip accumulator prevents sudden imbalances. Finally, we will discuss the protective measures in place to guarantee the protocol’s stability.

***

## Measuring the Protocol’s Equilibrium

The USDN protocol is considered to be in equilibrium when the two sides—the USDN [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault) and the long positions—reach an equivalent value. To assess this equilibrium, we measure each side as follows:

1. **USDN vault balance**: This is the total amount of assets held in the USDN vault.
2. **Trading exposure on the long side**: This is the difference between the total exposure of the long positions and the [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) provided by users at any given time. For example, if a user deposits 1 asset unit as collateral with 4x leverage, this results in a total exposure of 4 assets. The trading exposure will therefore be 3 assets (4 - 1 of collateral). In other words, the trading exposure is the "synthetic" or "borrowed" part of the position, whereas the collateral is the "real" or "owned" part.\
   It should be noted that the collateral value changes over time as profits and losses or funding rates increase or decrease the value of each position. However, the total exposure is defined when the position is opened with the initial collateral and initial leverage, and doesn't change over time.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FvoqYc0mdvoV5Qa6CaUxc%2FFigure%2011.png?alt=media&amp;token=e9aff4d0-9ce3-4e1d-b2f6-43804ba71334" alt="" width="375"><figcaption><p>Balanced Protocol</p></figcaption></figure>

<div><figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FRVrc9sYX7tQ5Ut0Lfb0i%2FCapture%20d%E2%80%99e%CC%81cran%202025-01-24%20a%CC%80%2014.14.24.png?alt=media&amp;token=7f39a030-d512-4b61-876d-734e3d23d1c6" alt=""><figcaption><p>Unbalanced Protocol</p></figcaption></figure> <figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FvHuQil8pENQ0IvrbeKyh%2FFigure%2012.png?alt=media&amp;token=823ea3ea-5d48-4b1b-80b9-1dcdd8a7aa1c" alt=""><figcaption><p>Unbalanced Protocol</p></figcaption></figure></div>

The protocol is in a perfect state of equilibrium when there is the same amount of assets in the USDN vault as in the trading exposure of all long positions. This means that the assets borrowed by the long positions is backed one-to-one by assets in the vault.


# Imbalance Protections

To ensure the stability of the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) and prevent significant imbalances, several protection mechanisms are activated when the imbalance between the [trading exposure](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#trading-exposure) of longs and the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault) balance exceeds certain thresholds. These protections include temporary restrictions on key user actions, such as [minting](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) and [redeeming](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token), as well as opening or closing [long positions](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position). In synergy with the [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) and the [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#dip-accumulator), these mechanisms ensure the continuous and automatic rebalancing of the USDN protocol in the event of prolonged imbalance.

### Dip Accumulator

The dip accumulator is a protection mechanism against sharp drops in long trading expo resulting from liquidations. See the [Dip Accumulator ](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator)section for more details.

### Funding Rate

The funding rate serves as an incentive to add assets in the side of the protocol that is underrepresented or remove assets from the other side. See the [Funding Rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/protocol-balance/equilibrium-the-role-of-the-funding-rate) section for more details.

### Actions Restrictions

The illustration below shows the 4 main actions of the protocol.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FLxX2ODgM3bJrWTMta7cs%2FFigure%2014%20bis.png?alt=media&amp;token=426c223a-ed24-4f89-aaa8-126ff973f3d3" alt=""><figcaption></figcaption></figure>

Depending on the observed level of imbalance, some of these actions are forbidden. Two main thresholds are used to trigger these protective measures: a slight imbalance (e.g. 5%) and a significant imbalance (e.g. 6%).

## 1. If Trading Exposure of Longs > Vault Balance&#x20;

* **Slight imbalance:** When there is an excess of long positions compared to the vault balance, the protocol prevents any new opening of long positions, which would exacerbate the imbalance.
* **Significant imbalance**: If the imbalance continues to grow beyond the second threshold, in addition to preventing new long positions, the protocol also suspends vault withdrawals. This prevents a liquidity outflow from the vault, which would further exacerbate the imbalance.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FvrIIck7V9AoiL334NP1q%2FFigure%2015%20bis.png?alt=media&amp;token=fa0190a2-7516-4b09-8b2a-d7fce4825241" alt=""><figcaption></figcaption></figure>

## 2. If Vault Balance > Trading Exposure of Longs

* **Slight imbalance**: When there is an excess of assets in the vault, the minting of new USDN tokens is temporarily prevented, which would increase the imbalance.
* **Significant imbalance**: If the gap between the vault and the trading exposure of longs continues to increase, the closing of long positions is additionally restricted. By prohibiting the closing of long positions, we prevent the trading exposure from shrinking further, which would worsen the protocol's imbalance.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FJb2ktuFuk9yy8YYbjchX%2FFigure%2016%20bis.png?alt=media&amp;token=49cb9ab2-df58-402c-973d-d450e1284b10" alt=""><figcaption></figcaption></figure>

These restrictions are temporary and last only as long as necessary for the protocol's imbalance to fall below the defined thresholds. As soon as the imbalance falls back below the thresholds, all operations become fully available again without limitations.

These measures are not designed to restrict users but to ensure the stability of the USDN protocol and create a healthy and sustainable on-chain environment for all participants. As the [total value locked](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#total-value-locked-tvl) (TVL) in the protocol evolves, these threshold values can get updated by the [governance](/ultimate-synthetic-delta-neutral/the-usdn-protocol/governance) to ensure that users don't get unnecessarily blocked and to optimize the security of the system.

### **In Case of Restrictions:**

Since multiple mechanisms are in place to proactively balance the protocol, these restrictions are activated only in extremely rare cases and solely to protect the system. Moreover, it is important to understand that when these restrictions occur, users who are "blocked" often benefit significantly:

* **If vault withdrawals are suspended:** It means there is a high demand for long positions, leading to a highly positive funding rate, which results in increased [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) for USDN token holders.
* **If closing long positions is restricted:** It indicates an excess of liquidity in the vault, causing the funding rate to become strongly negative, providing a boosted yield for long positions that remain open.

These protective measures help maintain a healthy and balanced protocol, ensuring a better experience for all users in the long run.


# Equilibrium: The Role of the Funding Rate

## Funding Rate

The funding rate is a key mechanism for balancing the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol). In practice, the larger side (either the longs or the USDN [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault)) pays a fee called the funding rate to the other side. This incentivizes participants to move toward the underrepresented side to collect this payment, thereby naturally bringing the protocol back to equilibrium based on market movements.

#### How Does It Work Exactly?

To measure each side, as mentioned in the previous section, we use the [trading exposure](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#trading-exposure) of the long side and the vault balance.

If the trading exposure of the longs exceeds the vault balance, the longs must pay the funding rate to the vault side. Conversely, if the vault balance exceeds the trading exposure of the longs, it is the vault that pays the longs.

#### Imbalance and Skew Factor

The imbalance is defined as the relative difference between the two quantities described above, and the funding rate is roughly proportional to the square of the imbalance. This means that, as the imbalance increases, the funding rate increases faster. This ensures that it gets quickly profitable to enter the underrepresented side in case of imbalance.

In practice, the funding rate should not be zero when the protocol is perfectly balanced. This is because the [long positions](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) borrow assets from the vault, and loans generally imply an interest rate. The USDN protocol uses an adaptive mechanism to find the appropriate [**skew factor**](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#skew-factor), which is the value of the funding rate when the protocol is perfectly balanced.

This skew factor is calculated as an exponential moving average of the daily funding rate and gets added to the part of the funding rate that is proportional to the imbalance. To simplify the explanations below, the rest of this page assumes that the skew factor is zero.

More information can be found in the USDN [whitepaper](https://github.com/SmarDex-Ecosystem/usdn-contracts/blob/main/whitepaper/whitepaper.pdf).

## If the Funding Rate is Positiv&#x65;**:**

A positive funding rate occurs when the trading exposure of the longs exceeds the vault balance. This means that the longs are paying, which happens more often than not when the market for an asset is bullish.

In this situation, longs make periodic payments to the USDN vault, generating [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) for the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) holders. The greater the imbalance between the trading exposure of the longs and the vault balance, the more longs pay in funding, making the yield more attractive. This then incentivizes new participants to [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) the USDN token to take advantage of these benefits.

By minting new USDN tokens, the protocol balances itself, as additional assets are added to the vault, reducing the gap between the vault balance and the trading exposure of the longs. The protocol, therefore, naturally rebalances itself through this mechanism.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FDJ9J64iJtU30ymJ4X96V%2FFigure%2018.png?alt=media&amp;token=6e86d78f-86fc-436b-9af1-c99c6bef0cd9" alt=""><figcaption></figcaption></figure>

## If the Funding Rate is Negative:

A negative funding rate occurs when the vault balance is higher than the trading exposure of the longs. In this case, it is the vault that pays the longs to open leveraged positions. In other words, traders are paid to take long positions and borrow assets, which is highly attractive. They can earn money simply by gaining exposure to the price of the underlying asset with leverage. In such a scenario, new traders will be incentivized to open long positions to take advantage of this benefit, thereby increasing the trading exposure and rebalancing the protocol.

However, this is not the only force that drives the protocol back to equilibrium. A situation with a negative funding rate causes a loss for the USDN vault, as it must pay this funding. Since the value of the USDN token is directly linked to the vault, the USDN token could gradually lose value. The USDN token holders would then be incentivized to [redeem](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) their USDN tokens to avoid losses, which would reduce the vault balance and also contribute to balancing the protocol.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FPc3bWXeisQxlcYfKDdco%2FFigure%2017.png?alt=media&amp;token=2532245e-f6a8-4792-854c-19004810e0a9" alt=""><figcaption></figcaption></figure>

The funding rate thus plays an essential role in maintaining a balanced protocol. Whether positive or negative, this mechanism constantly incentivizes participants to adjust their positions, allowing the protocol to reach equilibrium automatically and organically based on market fluctuations. By offering yield opportunities for both sides (the USDN vault and the longs), the funding rate contributes to the stability of the USDN token and enhances its appeal to users.


# Vault Side

The vault side allows users to gain exposure to a [synthetic dollar](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#synthetic-dollar) while benefiting from potential [yields](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield), unlike traditional stablecoins. The [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault) operates with an underlying asset. An underlying asset is a financial instrument that serves as the basis for another financial product or derivative. In the initial deployment, the underlying asset will be [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether) from Lido.

By depositing their assets into the protocol, users can [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) an equivalent USD value in the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token). The USDN token can be exchanged at any time for the corresponding USD value in the underlying asset. It allows users to gain exposure to the dollar while still earning yield from the yield-bearing token wstETH.

The USDN token holders also benefit from yields generated by [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate). Thanks to an automatic rebalancing mechanism, the protocol maintains equilibrium while offering yield opportunities.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FUDWkfIMAi6yayRjvKL6n%2FCapture%20d%E2%80%99e%CC%81cran%202025-02-22%20a%CC%80%2011.49.02.png?alt=media&amp;token=9350949a-5b9b-46b7-a5d3-1e51466e6db5" alt=""><figcaption></figcaption></figure>


# Vault Overview

## 1. **A Synthetic Dollar Without Centralization**

The USDN token is the first fully decentralized [synthetic dollar](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#synthetic-dollar) structured product, designed to operate around the value of the US dollar while overcoming the limitations of existing centralized solutions. Where many approaches rely on a central entity to ensure stability and interactions, the USDN token allows users to interact directly with the [protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol), without external intervention. This decentralized model enhances the system's security, transparency, and resilience, providing a robust alternative to traditional solutions.

## 2. **Yield Directly for Holders**

The USDN token allows its holders to effortlessly receive yields directly in their wallets, unlike other dollar-pegged tokens that provide no returns. To achieve this, USDN employs a rebase mechanism. When the value of the USDN token exceeds a certain threshold, additional tokens are automatically added to users' wallets, bringing the value of the USDN token back to around $1. Holders don’t need to do anything—the yields are delivered directly to their wallets without requiring staking or any additional actions.

## 3. **Delta-Neutral Strategy for Stability and Growth**

The USDN token is designed to maintain a stable value close to the dollar using a [delta-neutral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#delta-neutral) strategy. The protocol constantly aims to adjust its two sides to stay as close as possible to a delta-neutral position. This allows the USDN token to remain near the value of one dollar while generating profits for its users, combining stability with yield. For more details on this mechanism, refer to the [Protocol Balance](/ultimate-synthetic-delta-neutral/the-usdn-protocol/protocol-balance) section.

## 4. Censorship Resistance

The USDN token is designed to be resistant to censorship, providing complete financial freedom to its users. Due to its fully decentralized nature, no central authority or entity can freeze funds, block transactions, or impose restrictions. Unlike centralized systems, where accounts can be frozen or transactions denied, the USDN token operates autonomously on the blockchain, ensuring that all users can access their funds and perform transactions freely.

This resistance to censorship further strengthens the security and reliability of the USDN protocol, making it immune to interference from external actors, whether financial or governmental. By offering this protection, the USDN protocol stands out as a solution of choice for users seeking a truly decentralized alternative, independent from the traditional financial system's constraints.

## 5. **No Reliance on Other Stablecoins**

Some synthetic tokens, such as Ethena’s USDe, rely on existing stablecoins like USDT to maintain their value. This dependency can expose users to risks associated with the stability or fluctuations of these stablecoins. The USDN token, on the other hand, is designed to be directly tied to the US dollar, avoiding these risks and enhancing the protocol’s robustness, thereby providing greater long-term stability for its users.

## 6. **No Custodial**

The USDN protocol is decentralized. No human actor or externally owned account (EOA) will ever hold your assets, USDN tokens, or underlying tokens. The protocol ensures that 100% of funds are always accessible as long as there is no imbalance.

## 7. **A Safe and Transparent Oracle System**

Although the protocol uses [oracles](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#oracle) to determine [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) and [redeem](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) prices, it is designed with advanced protections to prevent manipulation. This ensures that users interact with reliable and transparent market data, further strengthening the system’s security.


# Rebase Mechanism

The [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) is designed to capture [yields](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield). When these yields are collected by the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault), the amount of underlying assets increases. Consequently, the dollar value of the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) should theoretically rise.

For example, if the vault holds assets worth $100,000 and there are only 80,000 USDN tokens in circulation, the unit price of the USDN token would logically be $1.25. However, to maintain the USDN token's value as close as possible to $1, this model requires adjustment.

This is where the rebase mechanism comes into play: As soon as this value exceeds $1.005, a rebase is triggered automatically, increasing the total supply to bring the price down to $1.0047. These parameters can be adjusted through [governance](/ultimate-synthetic-delta-neutral/the-usdn-protocol/governance) if needed.

## What is Rebase?

Rebasing means the protocol increases the total supply of the USDN token in circulation, effectively diluting the unit value of each USDN token. Holders receive an increased number of USDN tokens proportionally, allowing them to benefit from yield generation directly in their wallets without staking their tokens—unlike other solutions, such as Ethena's USDe.

## Example

Suppose there are 2,000 USDN tokens in circulation, backed by $2,000 worth of assets in the vault. The price of the USDN token would be $1. Now imagine the underlying assets generate significant yield, increasing their value in the vault to $4,000. The theoretical price of the USDN token would rise to $2.

To maintain price stability, the protocol calculates the new total supply of USDN tokens by multiplying the current price by the existing circulation (2 × 2,000 = 4,000 USDN). The same calculation applies to each wallet holding USDN tokens. For instance, a wallet holding 50 USDN tokens would see its balance double to 100 USDN tokens. Importantly, the dollar value of each wallet remains unchanged. If a user had $50 worth of USDN tokens before the rebase, this value remains the same because the token price adjusts proportionally (2,000 USDN × $2 = 4,000 USDN × $1).

## No Debase Mechanism

It is important to note that there is no debase mechanism in the USDN protocol. This means USDN tokens will never be removed from your wallet. Once you hold USDN tokens, the number of tokens in your wallet will not decrease.


# Yields

The USDN token’s strength lies not only in its status as a fully decentralized [synthetic dollar](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#synthetic-dollar) but also in its ability to offer [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) to its holders. Unlike other assets that merely aim to maintain parity with the dollar, the USDN token enables potential returns through two primary sources: [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) and staking rewards from a yield-bearing underlying asset.

The first yield driver for the USDN token is the funding rate, primarily fueled by long positions. Between 2020 and 2024, the annualized funding rates of perpetual contracts on ETH averaged approximately 17.6%, demonstrating the yield potential for the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol).

The second source of yield comes from the yield-bearing underlying asset. In the current instance of USDN, the underlying asset will be wstETH, which is a token **that** benefits from ETH staking. The value of wstETH increases over time by capturing Ethereum staking rewards. Since October 2021, wstETH has generated an annualized yield of approximately 4.79% in ETH, adding another layer of profitability to the USDN token.

This unique combination of yield sources positions the USDN token far beyond a simple synthetic dollar, offering holders a high-performing asset while maintaining decentralization and stability. In the following sections, we will detail these two revenue streams and explain their impact on the USDN ecosystem.


# Funding Rates

The Funding Rate as a Yield Mechanism

The funding rate is not only a tool for balancing the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) but also a source of [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) for [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) holders. For more details on the mechanism, please refer to the [Funding Rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/inside-the-protocol/3.-applying-the-funding-rate) section.

## How Does the Funding Rate Generate Yields?

When [long positions](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) dominate the market, the funding rate becomes positive. Traders in long positions then pay fees to the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault). Since the value of the USDN token is directly tied to the amount of underlying asset in the vault, this increase translates into yield for USDN token holders.

## Historical and Potential Yield

Historically, cryptocurrency markets have been largely dominated by long positions, resulting in a predominance of positive funding rates. For example, between October 2020 and August 2024, the average annual funding rates were 16.41% for the ETH/USD pair on Binance and 18.80% for the ETH/USDT pair on Bybit. During this period, funding rates were positive approximately 87% of the time, clearly illustrating an upward trend.

This dynamic is not surprising, as interest in cryptocurrencies continues to grow. With increasing adoption of digital assets and the expanding potential of the crypto market, there is little reason to believe that the market will become bearish in the long term. This continued bullish outlook makes crypto an attractive space for investors, further supporting the dominance of long positions and, consequently, positive funding rates.

While the USDN protocol's funding rates, as part of a decentralized perpetual system, may differ from those observed on centralized exchanges, these historical trends and the future potential of the crypto market suggest that the USDN protocol is well-positioned to capture positive yields.


# Yield-bearing asset

## How USDN Generates Yield Through ETH Liquid Staking

The [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) relies on an underlying asset, which is a [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield)-bearing token. In the first instance, this asset will be wstETH. This means that the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) and long positions are backed by wstETH.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FJnmktJ0LbaRFU0RogOGw%2FFigure%2020.png?alt=media&amp;token=4c9e2ff2-77d8-4000-b264-ed6529b9ca71" alt=""><figcaption></figcaption></figure>

## Understanding wstETH

wstETH, or "wrapped staked ETH," is a token representing ETH staked within Ethereum's proof-of-stake mechanism via the [Lido protocol](https://lido.fi/). When you stake ETH with Lido, you receive stETH in return. stETH maintains approximately the same dollar value as ETH. You can then "wrap" this stETH to obtain wstETH.

wstETH is a yield-bearing token. Each day, rewards from Ethereum staking are represented by minting new stETH. These newly minted stETH are shared among all wstETH holders, increasing their value.

Unlike directly staked ETH, which is locked during the staking period, stETH and wstETH **remain** liquid. This **means** they can be traded, sold, or used in other [DeFi](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#decentralized-finance-defi) applications while continuing to accrue staking rewards. Since its introduction in October 2021, wstETH has generated an annualized yield of approximately 4.79%, making it a stable and attractive yield source.

For a deeper understanding of wstETH and the Lido protocol, you can refer to Lido's official documentation.

## Yield Capture by the USDN Protocol

As a wstETH-based [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral), USDN passively benefits from ETH staking yields, regardless of users’ market positions. These yields enhance the overall value of the protocol and, by extension, the value of **the USDN token** itself.


# Long Side

The USDN Protocol also offers innovative tools such as the [Dip Accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator), enabling users to maximize gains while providing protection against market risks. This revolutionary approach to perpetual trading ensures a seamless and fair experience for users while leveraging the benefits of decentralized finance.

The long side of the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) is designed for users looking to benefit from the potential growth of the underlying asset while [leveraging](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage) the power of margin trading. It offers a unique trading platform that allows users to open long positions on the underlying asset with leverage of up to 25x. Unlike centralized platforms or some decentralized protocols, the long side of the USDN protocol is built to be transparent, secure, and optimized to maximize traders’ benefits.

In case the underlying asset itself generates [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield), like with [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether), users can go long on the underlying asset (ETH) while also capturing staking yield. This allows traders to benefit from both the underlying asset's price increases and the yield generated by staking ETH with Lido—a dual advantage not available on other trading platforms.

The USDN protocol also offers innovative tools such as the [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator) and guaranteed [stop-loss](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#stop-loss), enabling users to maximize gains while providing protection against market risks. This revolutionary approach to perpetual trading ensures a seamless and fair experience for users while leveraging the benefits of decentralized finance.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FLS0XBdb6FJxscItohpkQ%2FFigure%2021.png?alt=media&amp;token=660cd0de-3e58-48eb-8eff-46a85e51cf33" alt=""><figcaption></figcaption></figure>


# Long Perpetual

In this section, we will explain what a perpetual is and why the long-only perpetual of the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) is redefining the standards of decentralized trading.

## What Is a Perpetual?

A perpetual trading platform allows you to bet on the rise or fall of a cryptocurrency’s price, such as ETH, without needing to own it. Unlike traditional exchanges, the contracts on these platforms have no expiration date—you can keep your position open for as long as you wish.

To open a position, you must deposit [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) as a guarantee. With [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage), you can increase the size of your bet relative to your collateral, but this also increases the risk of loss.

## The Long-Only Perpetual of USDN

The USDN long-only perpetual is a trading platform that allows users to bet exclusively on the rise of the asset’s price, with leverage of up to 25x. This means that traders can amplify their potential gains by borrowing up to 24 times their initial stake. The [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/vault-side/yields/funding-rates) is competitive, making trading costs attractive for users.

Unlike other platforms, the USDN long-only perpetual is backed by those holding the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token). These holders have deposited their assets into the protocol and are exposed to USDN, acting as counterparts for traders’ long positions. This creates a unique balance where USDN token holders facilitate leveraged long positions without having to take leveraged short positions themselves.

In the next section, we will explore why this perpetual is revolutionary and why it offers significant advantages compared to anything currently available on the market.


# Long Overview

## Why the USDN Long-Only Perpetual Is Revolutionary

The USDN long-only perpetual is the first decentralized trading platform that allows users to place market orders and trade with leverage in a fully decentralized environment. Here are the reasons why this platform is truly innovative and offers unique advantages:

## **1.** Decentralized Trading with Leverage

The USDN perpetual allows users to trade with [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage) in a decentralized and [permissionless](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#permissionless) environment, eliminating the need for centralized platforms and reducing the risks and opacity associated with centralized fund management.

## **2.** Secured by the Ethereum Network

The USDN perpetual is deployed directly on Ethereum’s Layer 1, meaning that all transactions and positions are executed and recorded transparently and immutably on the Ethereum blockchain. By leveraging Ethereum’s decentralized infrastructure, the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) benefits from the security, resilience, and reliability of one of the most robust and proven blockchain networks in the industry.

## **3.** No Liquidation by Exotic Parties

Unlike other platforms, the USDN long-only perpetual does not use complex or unfair liquidation mechanisms. This means that users are not at risk of losing their positions unexpectedly. Everything is transparent and happens directly on the blockchain, ensuring that liquidations always occur at the price they should, without surprises or manipulation. Users know exactly when their positions will be liquidated, providing a fairer and more predictable trading experience.

## **4.** Collateralization in wstETH

As previously mentioned, at this time, all positions in the USDN protocol are [collateralized](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) in [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether) (Lido's wrapped staked ETH). This approach allows the protocol to capture the yields generated by ETH staking, benefiting both the [vault side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault-side-usdn-side) and the [long side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-side). For longs, the yield from staking ETH is redistributed by way of increasing the intrinsic price of the wstETH asset. In other words, the yield generated by the Lido protocol makes the price of wstETH go up relative to the ETH price, creating a gradual profit for long position holders (we will explain this mechanism in more detail in the [wstETH Collateralization](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/wsteth-collateralization) section). When displaying the perpetual in terms of the ETH underlying the wrapped staked token, this yield can be visualized as a reduction of the [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) paid by long side users.

The USDN perpetual offers a guaranteed [stop-loss](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#stop-loss) feature, allowing users to set precise price levels at which their positions will automatically be closed. Unlike other platforms where stop-loss orders are not always honored during high volatility or rapid market movements, our protocol ensures the execution of stop-loss orders exactly at the price set by the trader.

This is made possible through our fully on-chain approach, utilizing [smart contracts](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#smart-contract) on Ethereum. Each order is programmed and executed transparently and immutably by the smart contract, eliminating any risk of manipulation or unfair slippage. Even under volatile market conditions, users are protected from excessive losses, knowing their position will be liquidated at the price they selected.

With the USDN perpetual, what you see is what you get, thanks to the security and transparency of smart contracts. This is a true innovation in decentralized trading, ensuring an unparalleled level of trust and reliability.

## **5.** Protection Against Market Manipulation and Liquidation Hunting

The USDN protocol is designed to protect traders from market manipulation and liquidation hunting, which are common on centralized exchanges like Binance and others. On such platforms, large players known as "whales" can stealthily manipulate the price of an asset to trigger the liquidation orders of many traders, causing forced liquidations for their own benefit.

However, with the USDN perpetual, this type of manipulation is impossible. Our protocol uses decentralized [oracles](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#oracle) to obtain asset prices. These oracles aggregate price data from multiple sources across the market, providing an accurate and resilient average. With this approach, artificial price fluctuations created by a few actors cannot influence the reference price used by our protocol.

As a result, traders are protected from unfair price movements and forced liquidations, ensuring a more equitable and transparent trading environment.


# Dip Accumulator

The Dip Accumulator: Maximize Your Gains While Rebalancing the USDN Protocol

The dip accumulator is a unique and innovative feature designed to maximize users’ gains while stabilizing the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol). This tool allows you to automatically enter the protocol during market dips while playing a key role in maintaining a balanced state in the event of massive [liquidations](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#liquidation).

## Maximize Your Gains with the Dip Accumulator

The dip accumulator offers a simple and automated solution for investing in [long positions](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position). Instead of constantly monitoring the market, you deposit your assets into a smart contract. This contract is triggered when an imbalance is detected in the protocol following liquidations.

The dip accumulator then steps in to take advantage of moments when the price of the underlying asset is low, opening long positions and capturing entry opportunities at favorable prices. This maximizes your chances of profit while also benefiting from redistributed liquidation fees (bonus).

#### Why Use the Dip Accumulator?

* **Effortless "buy the dip":** The dip accumulator is automatically triggered when liquidations cause an imbalance in the protocol. This means it buys when the asset price is low, maximizing your chances of profit.
* **Boosted yields (APR):** In addition to purchasing at attractive prices, you benefit from a boosted APR thanks to liquidation fees redistributed to dip accumulator participants. These fees come from the liquidation of other long positions.
* **Reduced fees:** Long positions opened via the dip accumulator have no entry fees. This makes this method much more cost-effective than opening a long position manually, as fees are only paid upon closing a position.

#### How the Dip Accumulator Works for the User

* **Depositing funds into the Dip Accumulator**: \
  Users can deposit their assets into the dip accumulator. The funds remain in a "holding pool" until the dip accumulator is triggered. The deposit process involves two steps to protect the protocol from front-running:
  1. **Initiate**: You start by initiating the deposit and committing an amount of assets to the pool.
  2. **Validate**: Next, you must validate the deposit after a delay of 24 seconds. If you do not validate within 20 minutes of initiation, your funds will be temporarily locked for 3 hours and 40 minutes. After this period, you can withdraw the entirety of your funds.
* **Activation during an imbalance**: \
  The dip accumulator is triggered only when an imbalance of 6% or more is reached following a liquidation. At that moment, it uses the funds in the holding pool to open a long position with a maximum [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage) of 3x, aiming to bring the imbalance down to 4%. This enables the protocol to take advantage of low prices and opportunities created by a market in imbalance while minimizing the risk of liquidation for the dip accumulator position.
* **Withdrawing funds**: \
  As long as your funds remain in the holding pool, you can withdraw them at any time. However, once the dip accumulator has used your funds to open a long position, you must wait at least 4 hours and until the imbalance is reduced below 3.5% before you can exit the protocol. Your withdrawal will only be possible if it does not create a new imbalance in the protocol, as this would compromise the effectiveness of the dip accumulator and its rebalancing function.
* **The dip accumulator and liquidation price**: \
  Like any leveraged long position, the dip accumulator also has a liquidation price when it opens a position. If market conditions evolve unfavorably, the position may be liquidated, but this risk is managed automatically by the protocol.

***

## The Role of the Dip Accumulator in Rebalancing the Protocol

The dip accumulator is crucial for stabilizing the USDN protocol by preventing prolonged imbalances following significant price crashes. When massive liquidations lead to an imbalance over 6%, the protocol risks negative [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate), which would reduce the [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) of USDN token holders. The [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault) could pay funding fees to the longs for an extended period, which would gradually reduce the value of the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token). The dip accumulator steps in to restore balance by adjusting the long trading exposure relative to the USDN vault balance.

* **Rebalancing positions**: \
  When the protocol detects an imbalance of 6% or more following a liquidation, the dip accumulator uses available funds to open a leveraged long position, bringing the gap down to a target level of 4% or as much as possible with the available funds. This stabilizes the protocol quickly and prevents the imbalance from persisting, which could otherwise impact the value of the USDN token.
* **Maintaining equilibrium**: \
  Once activated, the dip accumulator holds its position until a new imbalance of 6% occurs, ensuring the continued stability of the protocol. If later liquidations create an imbalance again, the existing dip accumulator position is increased in size with the new pending assets from the holding pool, and its leverage is adjusted to reach the target imbalance.


# wstETH Collateralization

At this moment, the [long-only perpetual](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#perpetual-long-only) is designed to provide users with exposure to the price of ETH, but the [protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) operates on wstETH behind the scenes.

## Front-End: A Simplified User Experience

On the front-end, the perpetual is presented in ETH units and prices to simplify the trading experience. Most users are familiar with ETH, a widely traded and well-understood asset. By displaying the perpetual in ETH, we allow traders to take long positions intuitively without requiring them to understand technical concepts like wstETH. This approach simplifies comprehension, makes trading more accessible, and allows for easy performance comparison.

## Technical Management with wstETH

The protocol exclusively uses wstETH (Lido wrapped staked ETH), a wrapped and staked version of ETH that generates additional [yields](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield), typically ranging from 4% to 8% annually through staking on the Ethereum beacon chain. While stETH holders see their yield represented as a gradual increase in balance ([rebase](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#rebase)), wstETH holders instead keep the same balance but gain value because the price of wstETH increases gradually compared to the ETH price. While users primarily interact with ETH, they still benefit from the advantages of wstETH, which provides long-term yields.

To streamline the experience, a router contract has been implemented to automatically convert deposited ETH into wstETH, which is used as [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) in the protocol. However, users also have the option to directly supply wstETH if they prefer. In the future, additional options, such as depositing stETH, may be supported by this router, offering even greater flexibility.

This mechanism allows users to fully benefit from staking yields while enjoying a seamless experience, making a long position on our platform more advantageous than a traditional long position in ETH.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FpkbglMQgaHS306OISAIN%2FFigure%2020.png?alt=media&amp;token=708f38c9-d47e-4daa-b068-7d94d85ee37c" alt=""><figcaption></figcaption></figure>

#### Reduced Funding Rates via wstETH

To ensure users can see the benefit of these advantages without adding complexity, the interface is optimized to account for this difference. The additional yields from wstETH are automatically subtracted from the protocol's [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) on the site, allowing for the display of net funding rates (protocol FR - wstETH yield). In other words, the extra yield generated by wstETH is used to offer more competitive funding rates in terms of ETH while maintaining a simple and intuitive user experience.

For more details on how wstETH works, please refer to [Lido’s documentation](https://docs.lido.fi/).


# Liquidations and Minimum Position

Technical Details on Liquidations and Minimum Amount for Long Positions

## **Liquidations**

In our decentralized [protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol), when a [position](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) reaches its liquidation price, it must be closed to ensure the system functions properly. However, as with all decentralized protocols, the protocol cannot trigger liquidations itself, as it operates on the blockchain and cannot monitor prices in real-time. This is why liquidation must be initiated by an external actor, such as a user or bot, that monitors prices and executes a liquidation transaction. The liquidation action is permissionless and can be triggered by anyone.

In practice, there are two possible scenarios:

1. **"Voluntary" liquidation**: Liquidation is typically performed by bots programmed to constantly monitor opportunities. These bots submit a valid price to the protocol and initiate the liquidation of positions that need to be closed. However, it’s important to note that anyone—not just bots—can take advantage of these opportunities and execute a liquidation, provided they supply a valid price.
2. **"Involuntary" liquidation**: A user performs one of the four main actions, such as [minting](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint)/[redeeming](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) or opening/closing a long position. When they interact with the protocol by providing a price, the protocol checks if there are any positions to liquidate. If so, these positions are automatically liquidated, and the user is rewarded.

Triggering a liquidation requires a transaction on the Ethereum blockchain, which incurs [gas fees](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#gas-fees). To ensure that positions marked for liquidation are effectively liquidated, the protocol financially incentivizes liquidators by refunding gas fees and offering an additional reward. This incentive is made possible through a liquidation penalty built into every long position, set at approximately 2%. The liquidation price displayed on the website already includes this penalty.

This penalty, subject to change by the [governance](/ultimate-synthetic-delta-neutral/the-usdn-protocol/governance), serves to cover the gas fees associated with the liquidation transaction and provide a reward to the liquidator. Depending on the state of the protocol, any remaining surplus is redistributed to the [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#dip-accumulator) and the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault). For more information about liquidation fees, please refer to the [liquidation fees](/ultimate-synthetic-delta-neutral/the-usdn-protocol/fees/liquidation-fee) section.

## Minimum Position Size

To ensure decentralization and the security of the protocol, a minimum collateral amount, subject to change by the [governance](/ultimate-synthetic-delta-neutral/the-usdn-protocol/governance), is required to open a long position on the USDN long-only perpetual. This threshold is necessary to ensure that the liquidation penalty (generally a couple of percentage points on the liquidation price) leaves a sufficient amount of collateral upon liquidation to cover the gas fees of the liquidator transaction.

By maintaining this minimum amount, we facilitate the participation of users and bots in managing liquidations without centralized intervention, while ensuring the economic viability of these actions. This choice is essential to achieving our decentralization goals while preserving the protocol’s security and efficiency.

{% hint style="info" %}
The minimum position size is currently set at **0.65 wstETH**
{% endhint %}


# Inside the Protocol

What really happens inside the USDN protocol? This is what we will detail in this section, so you can gain a clear understanding of its operation.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FVlC5w6qkKuT2akPzBS3j%2FCapture%20d%E2%80%99e%CC%81cran%202025-01-24%20a%CC%80%2015.40.37.png?alt=media&amp;token=6719d50e-5dc3-4df3-97a3-573acc7de16f" alt=""><figcaption></figcaption></figure>

When you perform one of the four main actions ([minting](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) or [redeeming](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token), opening or closing a [long position)](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position), several steps take place behind the scenes. The first of these steps is to obtain a price, as the [protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol), operating on the blockchain, does not inherently know market prices. This is why, for every action, the user must provide a price.

Once the price is submitted, the protocol can carry out the necessary calculations to update each position. Here is an overview of the steps the protocol executes:

1. **Calculate long PnLs**: The protocol begins by calculating the profit or loss (PnL) of long positions. The [collaterals](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) of these positions are adjusted accordingly: if a long bet succeeds, its collateral increases.
2. **Apply fundings**: The protocol calculates the amount owed based on the [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) and transfers assets between the long side and the [vault side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault-side-usdn-side), determining who owes and who receives.
3. **Liquidate positions:** The protocol checks if there are any positions to [liquidate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#liquidation). Insolvent positions are automatically liquidated to ensure the system's stability and security.
4. **Trigger the dip accumulator:** If the protocol is heavily imbalanced, the [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#dip-accumulator) will be triggered to safeguard the protocol. Learn more about it [here](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator).
5. **Rebasing the USDN token:** If all of the above pushed the price of the USDN token higher than necessary, it will inflate the holders' balance to compensate. Learn more about it [here](/ultimate-synthetic-delta-neutral/the-usdn-protocol/vault-side/rebase-mechanism).

In the following sections, we will detail each of these steps to give you a deeper understanding of the protocol's inner workings.

{% hint style="info" %}
To avoid duplicating information, only the first 3 steps will be explained in the following sections.
{% endhint %}


# Protocol vs Market Fluctuations

This page provides an overview of the protocol concept and its internal workings. You will gain an understanding of how the long side and vault side collaborate to ensure the most effective strategy.

## What is the Delta-Neutral Strategy?

The delta-neutral strategy is a financial risk management method aimed at neutralizing the impact of market fluctuations on an investment. It involves adjusting positions so that the potential gains from one position are offset by the potential losses from another, making the overall investment stable regardless of market movements.

Simple example to understand the concept:\
Suppose you have $100 to invest. To protect this investment against market fluctuations, you place $50 in a stock that increases in value when the market rises, and $50 in another that increases when the market falls. No matter what happens, the gains from one stock offset the losses from the other, and the total value of your investment remains stable at $100.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2Fs0NegbNGR9LJXfD3pK6m%2FDelta%20Neutral%20Exmple%20Simple.png?alt=media&amp;token=9a34a861-0617-47a3-9c0c-f7e8f376e227" alt=""><figcaption></figcaption></figure>

As illustrated above, the stock portfolio reacts to market ups and downs while maintaining a total value of $100. Now that the concept is clear, let’s examine how the delta-neutral strategy works in the [USDN Protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol).

## USDN and the Delta-Neutral Strategy

The USDN protocol is based on the interaction between two sides: the vault side and the long side, which work together to maintain a delta-neutral strategy, ensuring the stability of the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token).

* **USDN side**: Users who choose this side deposit their assets into the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault) and [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) the USDN token in exchange. Their goal is to gain exposure to the USDN token, a stable asset, while benefiting from potential [yields](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield). Thanks to the interaction with the long side, their investment remains protected from market fluctuations.
* **Long side**: Longs bet on an increase in the price of the underlying asset. They deposit assets as [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) and can use [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage), made possible by the assets present in the vault (deposited by USDN token holders). If the price of the asset rises, longs make a profit. If the price of the asset falls, they incur a loss, and part of their collateral is transferred to the vault to compensate.

The interaction between these two sides maintains a delta-neutral strategy. This means that regardless of price fluctuations, the value of the USDN token remains stable. If longs make gains, it does not affect the value of the USDN token because the protocol automatically adjusts the assets in the vault based on the performance of each side. This ensures that USDN token holders have a stable asset, even during periods of volatility.

### Impact of Asset Price Fluctuations on USDN

As mentioned, the USDN protocol relies on an underlying asset. It is the dollar value of the collateral held in the vault that determines the stability of the USDN token. Let’s see how this works when the price of the asset fluctuates:

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2F9CNeqnxlK6UkjpJVV3JN%2FFigure%205.png?alt=media&amp;token=7353dcff-ec4b-4028-8dbd-c807832b58f8" alt=""><figcaption></figcaption></figure>

***

<mark style="color:green;">When the price of the underlying asset increases:</mark> Longs benefit from the rise, and a portion of the asset held in the vault, corresponding to their gains, is transferred to the long side. Although the vault now holds fewer assets, the increase in value compensates for the decrease in token amount. Thus, the dollar value of the assets in the vault remains sufficient to support the amount of the USDN token in circulation, ensuring that USDN token holders can always exchange their USDN tokens for the underlying asset.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FHVnWrHAMXZWWHwGP6rhM%2FFigure%206.png?alt=media&amp;token=937524de-80c7-4201-9dd9-7e281d067070" alt=""><figcaption></figcaption></figure>

***

<mark style="color:red;">When the price of the underlying asset decreases:</mark> Longs, who bet on a price increase, incur losses. A portion of their collateral is automatically transferred into the vault. This increases the amount of asset available in the vault, which helps maintain the value of the USDN token stable at $1, even if the price of the asset falls.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FmbwLLX5cA78oBz94j00e%2FFigure%207.png?alt=media&amp;token=b4c68cf7-2222-45a8-943e-2f5e0e5943d4" alt=""><figcaption></figcaption></figure>

It is possible for the USDN token to deviate slightly from its peg on certain occasions. However, most of the time, it remains stable around the value of $1 and can generate a yield. These points will be discussed in more detail in the following sections.


# 1. Providing a Price

Interaction with the USDN Protocol

When a user interacts with the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) (by [minting](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint)/[redeeming](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token), opening/closing a [long position](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position), or liquidating positions), providing a price is mandatory. The protocol, operating on the blockchain, does not have direct access to external prices and therefore relies on the information provided by the user. To minimize the risk of fraud, only prices from trusted [oracles](/ultimate-synthetic-delta-neutral/the-usdn-protocol/oracles) such as Pyth and Chainlink are accepted. A redundancy mechanism is in place between these two oracles to ensure continuity of operations if one becomes unavailable.

### Two-Step Mechanism

To protect the protocol against attacks or price manipulation, a two-step system has been implemented:

* **Initiate:** The user begins by initiating the action (minting/redeeming the USDN token or opening/closing a long position) and provides a security deposit of 0.15 ETH. This deposit serves as a guarantee for the subsequent validation of the action.
* **Validate:** After a minimum of 24 seconds, the user must validate their action. The price used for validation is the one from Pyth, recorded at T+24 seconds. If Pyth is unavailable, the protocol then falls back to Chainlink. This redundancy mechanism ensures that validation is always conducted with reliable data.

### **Recovery of the Security Deposit**:

Although the initiator of the operation is typically responsible for validation, any other user can also perform this action. However, specific time intervals determine whether the security deposit is given to the designated validator or claimed by the actual validator.

Here’s a summary of the validation time intervals and who can claim the security deposit at each stage:

* **From T to T+23s:** No validation possible.
* **From T+24s to T+15m:** The designated validator will receive the security deposit on validation (using Pyth).
* **From T+15m to T+20m:** Any validator will receive the security deposit on validation (using Pyth).
* **From T+20m to T+85m:** The designated validator will receive the security deposit (using Chainlink). However, validation must be done using a new Chainlink price available at T+20m. This rule ensures no user can exploit the protocol financially. Note that Chainlink updates its prices at a maximum interval of 60 minutes, potentially creating a "dead zone" between T+20m and T+80m if no new price is published. However, there is a guaranteed window between T+80m and T+85m where the initiator can validate under any circumstances.
* **After T+85m:** Any validator will receive the security deposit on validation (using Chainlink).

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2FpFiANQ3ZkH1yIdlkZB74%2FCapture%20d%E2%80%99e%CC%81cran%202024-10-24%20a%CC%80%2011.58.16.png?alt=media&amp;token=b0760900-3dee-461c-8242-fc0ca4e7b6f2" alt=""><figcaption></figcaption></figure>

### Why a Security Deposit and Validation Delays?

The 0.15 ETH deposit ensures that the user completes their operation, preventing actions from remaining indefinitely pending, which could hinder the functionality of the protocol. Validation delays are designed to encourage timely transaction finalization. By limiting the time available to validate an action, the protocol ensures that operations are executed efficiently and within timelines that preserve the system’s responsiveness and security. This time structure also helps minimize the risks of manipulation or external interference, thus supporting the overall integrity of transactions on the platform.


# 2. Calculating Long PnLs

Once the protocol receives the price of the asset, it calculates the PnLs (profits and losses) for long positions. Longs, as the name suggests, bet on the rise of the asset's price. Therefore, if the price has increased since the last protocol update, longs make a profit. The protocol then transfers this profit from the vault side to the long positions, specifically to their collateral, which represents the portion of the position that the user can withdraw.

Conversely, if the price of the asset decreases, longs incur a loss. The protocol then transfers this loss from the long positions to the vault side, reducing the longs' collateral. This mechanism automatically adjusts positions based on market movements, ensuring a fair distribution of gains and losses.

The next step is to apply the funding rate, which we will detail in the following section.


# 3. Applying the Funding Rate

After calculating the profits and losses (PnL), the protocol applies the [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate). The side with the higher exposure is the one that pays the funding rate. For instance, if the balance of the [vault side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault-side-usdn-side) exceeds the trading expo of the [long side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-side), the vault pays. Conversely, if the trading expo of the long side is higher, the longs are responsible for paying the funding rate.

However, calculating the funding rate is more complex than simply comparing the imbalance between the two sides. It incorporates several elements, including the level of imbalance, a five-day exponential moving average to smooth out fluctuations, and an adjustment factor that adapts to maintain the protocol's balance. For more details on this calculation and its mechanics, please refer to the [whitepaper](https://github.com/SmarDex-Ecosystem/usdn-contracts/blob/main/whitepaper/whitepaper.pdf).

**Impact on SDEX**

With each funding rate payment, 8% of the funding rate is allocated to a "buy back and burn" mechanism for SDEX tokens. This process permanently reduces the supply of SDEX, thereby increasing its value. It rewards SDEX holders and supports the value growth of the SmarDex token.


# 4. Liquidating Positions

The final operation performed by the protocol is liquidating positions. When the liquidation price of a long position is reached, the protocol automatically proceeds with its liquidation. At this point, the position’s [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) is typically depleted or nearly so, triggering a liquidation to prevent the protocol from incurring further losses.

It is important to note that a penalty of approximately 2% is already included in the calculation of the liquidation price. This penalty is designed to protect the protocol during periods of high price volatility. For more details about this penalty and other fees, please refer to the dedicated [fees section](/ultimate-synthetic-delta-neutral/the-usdn-protocol/fees).

This liquidation mechanism helps safeguard the protocol's [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault) and other system participants, ensuring the stability of the system and maintaining a secure trading environment.


# Integration

{% hint style="warning" %}
**Compatibility Limitations:** Before integrating the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) into your project, it is crucial to note that rebasing tokens like USDN are rarely supported by most protocols. This is due to the technical challenges of handling the periodic adjustments in token quantity ([rebase](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#rebase)). As a result, we strongly recommend using the wUSDN token (wrapped USDN token) for integrations.
{% endhint %}

**Integrating the Native USDN Token (Advanced Use Case)**

For advanced projects or protocols that natively support rebasing tokens, it is possible to directly integrate the USDN token. This allows projects to take full advantage of USDN’s rebase mechanism.

* **Considerations:**
  * Ensure the protocol fully supports rebasing tokens.
  * Monitor the adjustments in USDN token quantity to avoid unexpected issues.
  * Refer to the codebase to fully understand how the USDN token operates and ensure proper implementation.

**Integrating the wUSDN Token for Maximum Compatibility**

wUSDN is a wrapped version of the USDN token that provides stability and is supported by a wider range of protocols. Unlike the USDN token, wUSDN does not actively rebase, making integration into platforms that do not natively support rebasing tokens easier.

* **Benefits of the wUSDN Token:**
  * Stability in token quantity without periodic adjustments.
  * Compatibility with [DeFi](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#decentralized-finance-defi) protocols.
  * A direct reflection of the USDN token’s yield in wUSDN’s price (e.g., a 10% yield increases wUSDN’s price from $1 to $1.10).


# WUSDN

* [Source Code](https://github.com/SmarDex-Ecosystem/usdn-contracts/blob/main/src/Usdn/Wusdn.sol)
* [Deployed Contract](https://etherscan.io/address/0x99999999999999cc837c997b882957dafdcb1af9)

### What is Wrapped USDN (wUSDN)?

It's an [ERC-20](https://eips.ethereum.org/EIPS/eip-20) value-accruing token wrapper for the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token). Its balance does not change with each oracle report, but its value in USDN does. Internally, it represents the user's share of the total supply of USDN tokens.

### Why use WUSDN? <a href="#why-use-wsteth" id="why-use-wsteth"></a>

wUSDN is mainly used as a layer of compatibility to integrate the USDN token into other [DeFi](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#decentralized-finance-defi) protocols that do not support rebasable tokens, especially bridges to L2s and other chains, as [rebases](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#rebase) don't work for bridged assets by default.

### How to use WUSDN? <a href="#how-to-use-wsteth" id="how-to-use-wsteth"></a>

The contract can be used as a trustless wrapper that accepts USDN tokens and mints wUSDN in return. When the user unwraps, the contract burns the user's wUSDN and sends the user locked USDN in return.

{% hint style="info" %}
At any moment, any amount of USDN can be converted to wUSDN via a trustless wrapper and vice versa, thus the tokens effectively share liquidity.
{% endhint %}


# Fees

In the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol), several fees are applied to ensure the system’s proper functioning, stability, and security. Fees are a key component of the protocol, as they incentivize active user participation, reward [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) holders, and protect the protocol from market risks.

The following sections provide all the essential information about these fees.


# Protocol Fees

Three different fees are implemented in the USDN protocol. Here’s how each fee works:

### Fee on Actions

* **Long position:** A fee (`_positionFeeBps`) of 0.04% is charged on the provided price at both the opening and closing of a position.
* **Vault:** For each deposit or withdrawal of [USDN tokens](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token), a fee (`_vaultFeeBps`) of 0.04% is charged on the deposited amount of assets.
* **Destination:** These fees are directly transferred to the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault) and, by extension, to USDN token holders.

### Fee on USDN Token Minting

When USDN tokens are minted, a unique mechanism is applied: 5% of the total amount of minted USDN tokens must be paid in SDEX tokens, the native token of the SmarDex ecosystem.

* **How does it work?** If you mint 100 USDN tokens, 5% of that amount must be paid in SDEX tokens, meaning 5 SDEX tokens in this example (not $5 worth of SDEX).\
  This mechanism reduces the supply of SDEX, thereby increasing its value for the benefit of all holders.

<figure><img src="https://2849728541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjYp8YSP5khO4s6xn05rx%2Fuploads%2F9XghsuJrEZXF2kVa8NIe%2FCapture%20d%E2%80%99e%CC%81cran%202025-02-21%20a%CC%80%2016.32.04.png?alt=media&amp;token=a4e013e0-0f72-4437-8224-9496296b0d10" alt=""><figcaption></figcaption></figure>

### Fee on the Funding Rate

Whenever funding is applied on one side or the other, a fee (`_protocolFeeBps`)  of 8% is applied to the transferred amount.

* **Destination:** This fee is accumulated within the protocol until it reaches a predefined threshold. Once the threshold is met, the accumulated fees are sent to a fee collector.
* **Rules**: The protocol governance can change the fee collector address, and the community can independently verify the current address.
* **Goal**: Currently, the fee collector is a safe wallet controlled by the SmarDex team. The team's present practice is to convert wstETH into SDEX and then burn the SDEX tokens. This process is currently performed manually. However, the protocol governance may decide on a different use for these fees in the future, potentially shifting from the current swap-and-burn strategy to a more decentralized approach.


# Liquidation Fee

The liquidation fee, also known as the "liquidation penalty," is applied to protect the protocol. When a user opens a [long position](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position), a liquidation price is determined, and a 2% liquidation penalty is added to this price. This means the user will be liquidated at a slightly higher price than expected.

The penalty serves two main purposes:

1. To safeguard the protocol against risks if liquidation is delayed, potentially causing bad debt.
2. To incentivize liquidators, [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#dip-accumulator) users, and [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) holders.

This penalty is directly included in the calculation, so the user always sees the final liquidation price, including the penalty.

## Penalty Distribution

#### If the Dip Accumulator Is Not Triggered:

* **Liquidator costs and bonus:** A portion of the penalties covers the liquidator's costs, as liquidating a position involves expenses. Additionally, a small bonus is provided to incentivize users to liquidate positions promptly, ensuring dead positions do not remain in the protocol. ([Learn more about liquidations here](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/liquidations-and-minimum-position))
* **Vault allocation:** The remaining penalties are allocated to the [vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault), reinforcing the protocol and benefiting USDN token holders.

#### &#x20;**If the Dip Accumulator Is Triggered:** ([Click Here for More Info](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator))

* **Dip accumulator rewards:** 60% of the penalties are distributed as rewards to users who provided liquidity to the dip accumulator, proportional to their contributions.
* **Liquidator costs and bonus:** A portion of the penalties is used to cover liquidator costs and provide a bonus, as described above.
* **Vault allocation:** The remainder is allocated to the vault.


# Protocol parameters

This page brings together all parameter values in the protocol.

* **Fee collector: `0x1E3e1128F6bC2264a19D7a065982696d356879c5`**
* **Min Leverage:** `1.1x`
* **Max Leverage:** `25x`
* **Low Latency Validator Deadline:** `15 minutes`
* **On-Chain Validator Deadline:** `65 minutes`
* **Safety Margin:** `2%`
* **Protocol Fee:** `8%`
* **Rebalancer Bonus:** `60%`
* **Liquidation Penalty:** `200 ticks (around 2.02%)`
* **EMA Period:** `5 days`
* **Funding Scaling Factor:** `0.12`
* **Fee Threshold:** `1 ether`
* **Open Exposure Imbalance Limit:** `4%`
* **Withdrawal Exposure Imbalance Limit:** `6%`
* **Deposit Exposure Imbalance Limits:** `4%`
* **Close Exposure Imbalance Limit:** `6%`
* **Rebalancer Close Exposure Imbalance Limit:** `2.5%`
* **Long Imbalance Target:** `3%`
* **Position Fee:** `0.04%`
* **Vault Fee:** `0.04%`
* **SDEX Rewards Ratio:** `1%`
* **SDEX Burn On Deposit Ratio:** `5%`
* **Security Deposit Value:** `0.15 ETH`
* **Min Long Position**: `0.65 wstETH`
* **Usdn Price Target:** `1.0047$`
* **Usdn Rebase Threshold**: `1.005$`


# Oracles

For the [USDN Protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) to function properly, precise and up-to-date prices are essential. [Oracles](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#oracle) are critical for providing these prices during every interaction with the protocol.

### **Types of Oracles Used**

The USDN protocol uses two types of oracles to obtain reliable prices:

1. **Pyth (Pull-Based)**: Pyth is the primary oracle used by the protocol. It provides a neutral price accompanied by a confidence interval that varies based on market volatility and data quality. This interval indicates the uncertainty around the average price. The protocol uses this information to select a conservative price, taking 40% of the confidence interval magnitude into account.

   Pyth offers very frequent updates, with price aggregations every 400 milliseconds, ensuring near-instantaneous data. For more information, refer to the [Pyth documentation](https://docs.pyth.network/home).
2. **Chainlink (Push-Based)**: Chainlink provides an average price that is used as-is by the protocol when Pyth data is unavailable. Chainlink prices are pushed on-chain regularly, and updates are triggered either when the price change exceeds a certain threshold (generally 0.5% to 1% on mainnet) or after a predefined interval known as the **heartbeat**. The heartbeat duration varies by data feed but is generally 1 hour on mainnet.

This ensures regular updates even during periods of low volatility, keeping Chainlink data reliable and current regardless of market conditions. For more information, refer to the [Chainlink documentation](https://docs.chain.link/).

In the future, the [governance](/ultimate-synthetic-delta-neutral/the-usdn-protocol/governance) will be able to modify which oracles are used to make full use of new technologies or discard problematic solutions.

***

### **How the Protocol Chooses Prices with Pyth**

Pyth provides a neutral (average) price with a variable confidence interval. For example, suppose the neutral price of the asset is $1,000 with a confidence interval of ± $10 (ranging from $990 to $1,010). This interval is provided as an example to explain the mechanism and does not necessarily reflect the actual values from Pyth, as the confidence interval varies based on market volatility.

The USDN protocol uses 40% of this interval to adjust the price as a protective measure:

* **Neutral price**: $1,000
* **Confidence interval**: $10 (from $990 to $1,010)
* **Adjustment**: The protocol takes 40% of this difference (40% of $10 = $4).

Based on the type of transaction, the final price is adjusted as follows:

* For [minting](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) USDN tokens or closing a [long position](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position), the price used will be adjusted to $996 ($1,000 - $4).
* For [redeeming](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) USDN tokens or opening a long position, the price will be adjusted to $1,004 ($1,000 + $4).

This mechanism allows the protocol to select an accurate price while protecting against risks associated with market volatility.

***

### **Redundancy Mechanism**

In principle, Pyth is the oracle that should always be used. However, due to its pull-based nature, there may be instances where Pyth’s API is unavailable or other issues arise beyond our control. In such cases, to avoid disrupting the protocol or blocking user transactions, the protocol will fall back to using Chainlink prices under certain conditions (see the [Providing a Price](/ultimate-synthetic-delta-neutral/the-usdn-protocol/inside-the-protocol/1.-providing-a-price) section for more information).

This redundancy mechanism ensures the protocol can continue operating seamlessly, even if one oracle fails.


# Governance

Priviledged functionalities managed by roles.

## Why are Priviledged Functions Needed?

The [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) is a complex system. We want to be able to patch any vulnerability found after deployment or simply update settings to better accommodate users once we have data on the usage of the protocol.

There are also great strides made in the blockchain industry every day. Having the ability to update the protocol with any potential improvement allows us to adapt to new challenges.

With great power comes great responsibility. Therefore, to ensure the safety of the protocol, multi-signature wallets are used to prevent access to privileged functions by malicious actors. Additionally, every setting has maximum values that cannot be exceeded, to avoid mistakes or unsafe parameters.

<mark style="color:green;">**100% OF GOVERNANCE PRIVILEGES WILL BE TRANSFERRED TO A DAO.**</mark>

## What can Privileged Functions Do?

### 1. USDN Protocol

* Change the [Imbalance Limits](/ultimate-synthetic-delta-neutral/the-usdn-protocol/protocol-balance/imbalance-protections)
* Change the [Minimum Position Size](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/liquidations-and-minimum-position#minimum-position-size)
* Change the [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage) limits
* Change the amount required as a [Security Deposit](/ultimate-synthetic-delta-neutral/the-usdn-protocol/faq#what-is-the-purpose-of-the-security-deposit)
* Change the [Liquidation Penalty](/ultimate-synthetic-delta-neutral/the-usdn-protocol/fees/liquidation-fee)
* Change the number of ticks that can be liquidated in one transaction
* Change the [funding settings](/ultimate-synthetic-delta-neutral/the-usdn-protocol/inside-the-protocol/3.-applying-the-funding-rate)
* Change the [funding fee](/ultimate-synthetic-delta-neutral/the-usdn-protocol/fees/protocol-fees#fee-on-the-funding-rate)
* Change the [Long Position fee](/ultimate-synthetic-delta-neutral/the-usdn-protocol/fees/protocol-fees#fee-on-actions)
* Change the [Vault deposit fee](/ultimate-synthetic-delta-neutral/the-usdn-protocol/fees/protocol-fees#fee-on-actions)
* Change the [SDEX burn fee](/ultimate-synthetic-delta-neutral/the-usdn-protocol/fees/protocol-fees#fee-on-usdn-minting)
* Change the reward given when burning SDEX fees
* Change the address of the middleware managing [Oracle price validation](#id-3.-oracles)
* Change the length of the [exclusivity period ](/ultimate-synthetic-delta-neutral/the-usdn-protocol/inside-the-protocol/1.-providing-a-price#recovery-of-the-security-deposit)for initiate validation
* Change the address of the middleware managing [Liquidator Rewards ](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/liquidations-and-minimum-position#liquidations)calculation
* Change the address of the [Dip Accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator)
* Change the bonus given to the [Dip Accumulator ](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator)on trigger
* Change the address of the fee collector
* Upgrade the Protocol's [proxy ](https://medium.com/@social_42205/proxy-contracts-in-solidity-f6f5ffe999bd)implementation
* Unblock a stuck pending action
* Pause/Unpause the protocol
* Change the price threshold at which the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) will [rebase](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#rebase), as well as the target price

### 2. USDN Token

* Change the callback to execute after a [rebase](/ultimate-synthetic-delta-neutral/the-usdn-protocol/vault-side/rebase-mechanism)

## 3. Oracles

* Change the time to wait before an action can be validated
* Change the amount of time a Chainlink price is considered valid
* Change the amount of time a Pyth price is considered recent
* Change the confidence ratio
* Change the amount of time an action can be validated using Pyth
* Withdraw any Ether stuck in the contract
  * This smart contract is not meant to hold any asset. Any Ether sent to this contract by mistake can be recovered.

## 4. Liquidation Rewards Manager

* Change the parameters to calculate the rewards given to the user that liquidates positions.

## 5. Dip Accumulator

* Change the maximum leverage of the position
* Change the minimum amount that can be deposited


# Risks

Although the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) is designed to provide a decentralized and stable solution, several risks remain. However, with built-in protection mechanisms, the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) is equipped to manage these risks proactively.

## **1.** Smart Contract Risks

Like any decentralized protocol, the USDN protocol relies on [smart contracts](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#smart-contract) to execute its operations. While these contracts are robust, there is always a risk of bugs or vulnerabilities being exploited, leading to financial losses or disruptions in the protocol’s functionality.

#### **Mitigation Measures**:

* USDN’s smart contracts have undergone multiple rigorous security audits conducted by [**Bailsec**](https://bailsec.io/) and [**Guardian**](https://guardianaudits.com/) to ensure their reliability.
* Additionally, a bug bounty program has been implemented to incentivize developers to report potential vulnerabilities, thereby strengthening the protocol’s ongoing protection.

## **2.** Oracle Risks

The USDN protocol depends on [oracles](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#oracle) to obtain accurate prices. If an oracle becomes unavailable, malfunctions, falls out of sync, or is compromised, it could lead to an incorrect valuation of [collaterals](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral), impacting the protocol in various ways.

#### **Mitigation Measures**:

* A redundancy mechanism has been established. As detailed in the section [Providing a Price](/ultimate-synthetic-delta-neutral/the-usdn-protocol/inside-the-protocol/1.-providing-a-price), if the primary oracle (Pyth) is unavailable, a secondary oracle (Chainlink) is automatically utilized. This ensures continuity and minimizes the risk of disruptions.
* The protocol includes an update mechanism within its oracle section to address situations where one or more oracles become deprecated or unreliable. This mechanism allows the system to switch to accepting prices from an alternative decentralized oracle. Governance retains exclusive authority to define and implement new logic for price retrieval from the updated oracle. Refer to the [Oracle Governance](https://docs.smardex.io/ultimate-synthetic-delta-neutral/the-usdn-protocol/pages/bTOSauWjHRSUerdaWGts#id-3.-oracles) section.

## **3.** Risks Associated with the Underlying Protocol (Lido Protocol)

The Lido protocol enables staking of ETH in exchange for stETH, a tokenized version of staked ETH. The [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether) (underlying asset), used as collateral in the USDN protocol, depends directly on Lido’s proper functioning. If a flaw or bug is discovered in Lido’s smart contracts, it could compromise the management of staked ETH and weaken trust in the platform. Such a situation could disrupt the availability of wstETH, affecting the stability of USDN’s collateral.

#### **Security Measures Implemented by Lido**:

Lido has implemented several safeguards to minimize risks associated with its smart contracts. These include:

* Independent firms conduct regular audits.
* Open-source code that allows the community to identify vulnerabilities.
* A bug bounty program encouraging proactive discovery of flaws.

These combined measures significantly reduce risks and ensure the reliability of Lido’s contracts. For more information, refer to the [Lido Finance Documentation](https://docs.lido.fi/).


# SDEX

## SmarDex: SDEX and Its Role in the Ecosystem

SmarDex is at the forefront of innovation in the [DeFi](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#decentralized-finance-defi) world, with numerous revolutionary projects in the pipeline. Each initiative is designed to transform the ecosystem by introducing new and efficient solutions. All these projects are, or will be, connected in some way to the [SDEX token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token), enhancing its value and utility within our ecosystem.

### Buy Back and Burn Mechanism

To support the value of SDEX, we have implemented a buy back and burn mechanism within the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol), powered by two main sources:

1. 8% of each [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) paid by the vault or long positions is used to purchase and burn SDEX.
2. During each USDN token [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint), 5% of the minted USDN token amount is taken in SDEX to be burned. For example, minting 1,000 USDN tokens will burn 50 SDEX tokens ($0.66 as of release).

This mechanism strengthens SDEX valuation as the [TVL](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#total-value-locked-tvl) in the USDN token grows, reducing the circulating supply of SDEX and increasing upward pressure on its price.

### **Fair and Transparent Tokenomics**

Unlike many other projects, SmarDex has not reserved any tokens for founders or private investors. All participants, including the founders, have purchased their tokens fairly on the public market. This transparent distribution model ensures that there will be no selling pressure from future unlocks, preserving SDEX price stability over the long term.

For more information on token distribution and management, please refer to the [SmarDex Tokenomics](https://docs.smardex.io/overview/what-is-smardex/tokenomics) section.


# Addresses

<table><thead><tr><th width="238">Contracts</th><th>Addresses on Ethereum</th></tr></thead><tbody><tr><td>USDN Token</td><td><a href="https://etherscan.io/address/0xde17a000ba631c5d7c2bd9fb692efea52d90dee2">0xde17a000BA631c5d7c2Bd9FB692EFeA52D90DEE2</a></td></tr><tr><td>sUSDN Token</td><td><a href="https://etherscan.io/address/0xf67e2dc041b8a3c39d066037d29f500757b1e886">0xf67e2dc041b8a3c39d066037d29f500757b1e886</a></td></tr><tr><td>wUSDN Token</td><td><a href="https://etherscan.io/address/0x99999999999999cc837c997b882957dafdcb1af9">0x99999999999999Cc837C997B882957daFdCb1Af9</a></td></tr><tr><td>USDN Protocol</td><td><a href="https://etherscan.io/address/0x656cb8c6d154aad29d8771384089be5b5141f01a">0x656cb8c6d154aad29d8771384089be5b5141f01a</a></td></tr><tr><td>Liquidation Rewards Manager</td><td><a href="https://etherscan.io/address/0x9514D3496F46572e8461da381B200812D5Db202C">0x9514D3496F46572e8461da381B200812D5Db202C</a></td></tr><tr><td>Dip Accumulator</td><td><a href="https://etherscan.io/address/0xaebcc85a5594e687f6b302405e6e92d616826e03">0xaeBcc85a5594e687F6B302405E6E92D616826e03</a></td></tr><tr><td>WstEthOracleMiddleware</td><td><a href="https://etherscan.io/address/0xC1459fcFe23d5db9Ddb04935ab7a426Bd398EAb0">0xC1459fcFe23d5db9Ddb04935ab7a426Bd398EAb0</a></td></tr><tr><td>LongFarming</td><td><a href="https://etherscan.io/address/0xF9D36078A248AF249AA57ae1D5D0c1033d6Bbe27">0xF9D36078A248AF249AA57ae1D5D0c1033d6Bbe27</a></td></tr><tr><td>Router</td><td><a href="https://etherscan.io/address/0x49f66b1616865b2a59caecb8352bbf2ac80983e1">0x49f66b1616865b2a59caecb8352bbf2ac80983e1</a></td></tr></tbody></table>


# FAQ

## Understanding USDN and Its Differences

<details>

<summary>What Are the Benefits of Holding the USDN token Compared to a Traditional Stablecoin?</summary>

The USDN token is designed as a decentralized synthetic dollar, meaning it does not rely on physical dollar reserves like traditional stablecoins. It offers potential yields through [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) and underlying asset rewards (such as the [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether) APR), making it attractive for users looking to generate [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) while maintaining an exposure to a token that gravitates around the value of 1 dollar.

</details>

<details>

<summary>How Do wUSDN and sUSDN Differ From USDN?</summary>

## **wUSDN**

**wUSDN (Wrapped USDN)**: Its value gradually increases over time, similar to how [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether) appreciates relative to ETH. In contrast, holding [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) results in an increasing balance of USDN tokens over time. In short, wUSDN grows in value, whereas USDN token increases in quantity.

* This token is particularly useful for protocols and platforms that do not support USDN’s rebase mechanism, ensuring seamless integration without balance fluctuations.sUSDN

## sUSDN

**sUSDN (Seed USDN)**: A transitional token designed to kickstart USDN’s TVL before its official launch. Initially, sUSDN is backed by sUSDe (Ethena’s staked USDe), but over time, the backing will gradually shift from sUSDe to pure USDN token.

* The value transition happens seamlessly: if you hold $10,000 worth of sUSDN backed by sUSDe, you will receive the same $10,000 worth of sUSDN backed by USDN token once the transition is complete—regardless of price fluctuations between the tokens.
* Users can redeem sUSDN at any time for sUSDe during the transition phase, and later for USDN token once the conversion is finalized.
* Longer lock periods are beneficial, as they allow USDN token to be gradually minted and replace sUSDe in a smooth and controlled manner

</details>

<details>

<summary>Is USDN the Next Luna Token?!?</summary>

No, USDN is fundamentally different from LUNA/UST. LUNA collapsed due to a circular dependency, where UST relied on LUNA for value, and LUNA’s value depended on UST demand. This created an unsustainable loop that collapsed when confidence broke.

The USDN token, on the other hand, is backed by real, appreciating assets ([wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether)) and generates [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) from [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) paid by traders and staking rewards from wstETH, not artificial incentives.

Additionally, USDN is fully decentralized and transparent—anyone can verify the collateral and protocol mechanics on-chain. There is no dependency on minting new tokens to maintain its value.

The USDN token is not another LUNA. It is a sustainable, collateral-backed synthetic dollar with a clear and transparent yield model.

</details>

## Core Mechanics and Functionality

<details>

<summary>How Does the USDN Rebase Work?</summary>

The Rebase mechanism allows the [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) to capture the protocol’s [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) while maintaining its value close to $1.

#### &#x20;**How the Rebase Works**

* When the [protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) generates yield, USDN’s price gradually increases.
* If USDN reaches $1.005, a rebase is triggered, increasing the total supply to bring the price back to $1.0047.
* Each holder receives a proportional increase in their USDN balance, reflecting their share of the protocol’s yield

#### **No Debase Mechanism**

* USDN holders will never see their balance decrease automatically.
* If USDN’s price drops below $1, it signals a temporary protocol imbalance. In this case:
  * [Long](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) traders receive incentives (via [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate)) to open new positions.
  * USDN holders are incentivized to [redeem](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem), naturally restoring balance.
* These mechanisms ensure that the protocol rebalances quickly without significant price drops.

#### **Rebases Are Not Fixed or Linear**

* Rebases do not occur at set intervals or in fixed steps. Each rebase is influenced by current market conditions and protocol performance.
* Displayed APYs are long-term estimates—they should not be applied to short-term USDN holdings, as individual rebases fluctuate based on market dynamics

</details>

<details>

<summary>Where Does the Yield Come From?</summary>

The [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) generates [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) from two main sources:

1. **Funding Rates from Traders** – Traders who open [long positions](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) on the [protocol’s perpetual](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#perpetual-long-only) pay periodic fees (funding rates) to maintain their positions. These fees are collected and distributed to USDN holders.
2. **Yield from Staked Ethereum (wstETH)** – USDN is backed by [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether), which accrues staking rewards over time. As the value of wstETH increases, the [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) backing USDN grows, contributing to yield.

These mechanisms ensure that the USDN token can generate returns while operating within a decentralized and transparent protocol. For more details, please refer to the [Yields](/ultimate-synthetic-delta-neutral/the-usdn-protocol/vault-side/yields) section.

</details>

<details>

<summary>Does USDN Yield With Any Wallet?</summary>

Yes

</details>

<details>

<summary>At What Interval Is the Yield Paid?</summary>

The ield[Glossary](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) is continuously distributed in the [USDN Vault](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault-side-usdn-side), depending on the elapsed time. This increases the dollar value per [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) over time.

When a [rebase](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#rebase) is triggered, it adjusts the price back near $1 by syncing the balance ratios. So, if 1 USDN is worth $1.005 before the rebase, it becomes 1.005 USDN worth $1 after the adjustment (simplified).

</details>

<details>

<summary>Do I Need to Mint USDN token to Benefit From the USDN Yield?</summary>

No, as long as you hold [USDN tokens](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) in your wallet, you will receive [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) automatically through the [rebase](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#rebase) mechanism—regardless of whether your USDN tokens come from [minting](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) or the secondary market.

</details>

## Usage and Protocol Interactions

<details>

<summary>Shall I Mint or Swap USDN?</summary>

The choice between [minting](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) and swapping [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) depends on your priorities:

* Swapping works like a standard liquidity pool. It doesn’t require a security deposit, and there is no SDEX fee, but large swaps may result in price [slippage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#slippage).
* Minting increases the total USDN supply. It requires a 0.15 ETH security deposit (refunded) and incurs an SDEX fee, but it generally offers lower slippage, making it more efficient for large amounts.

For smaller amounts, swapping is often more convenient. For larger amounts, minting may be the better option.

</details>

<details>

<summary>Why Do I See Different USDN Values?</summary>

The [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) price displayed on SmarDex.io always reflects the real market price.

If you see a different price elsewhere, it means [arbitrage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#arbitrage) has not yet occurred. This is a normal market behavior and will typically correct over time as traders take advantage of price differences.

</details>

<details>

<summary>Will USDN Be Available on Other Chains?</summary>

The [USDN token](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) can only be [minted](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) and [redeemed](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) on Ethereum. However, wUSDN (wrapped USDN) will be available on other chains.

</details>

<details>

<summary>Can I Validate Multiple Pending Actions Simultaneously on the USDN Protocol?</summary>

The [USDN Protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) processes one action at a time, requiring each initiated action to be validated before starting another. This ensures orderly and conflict-free transactions.

</details>

## Trading and Position Management

<details>

<summary>What Should I Know Before Opening a Long on the Perpetual?</summary>

* A minimum amount of [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether) is required to open a [long position](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position). For details, see the [Minimum Position Size](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/liquidations-and-minimum-position#minimum-position-size) section.
* [Funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) fluctuate—you may earn [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) if the rate turns negative or pay fees if it remains positive.
* In rare cases, closing a long position may be temporarily restricted. Be aware of this possibility—however, when this happens, funding rates become negative, meaning you earn yield instead of paying fees.
* [Liquidation](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#liquidation) risks apply—monitor your [collateral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#collateral) and liquidation price carefully.
* High [gas fees](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#gas-fees) on Ethereum make [perpetual longs](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#perpetual-long-only) more suitable for long-term exposure rather than active trading.

</details>

<details>

<summary>Why can't I Mint or Redeem USDN token? </summary>

## Mint USDN

If you can’t [mint](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint) USDN, it’s due to a [protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) imbalance between the [vault side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault-side-usdn-side) and the [long side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-side). To restore balance, more USDN must be redeemed, or more long positions need to be opened.

Additionally, make sure you have 0.15 ETH in your wallet as a security deposit (refunded after the transaction), which is required for interacting with the protocol.

## Redeem USDN

If you can't [redeem](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) USDN, it’s due to a protocol imbalance between the vault side and the long side. To restore balance, more USDN needs to be minted, or long positions need to be closed.

Additionally, make sure you have 0.15 ETH in your wallet as a security deposit (refunded after the transaction), which is required for interacting with the protocol

</details>

<details>

<summary>Why Can't I Open or Close a Long Position on the Perpetual?</summary>

## Open a Long

If you can’t open a [long position](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) (or use the highest [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage)), it’s due to a protocol imbalance between the [vault side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault-side-usdn-side) and the [long side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-side). To restore balance, more [USDN](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token) must be [minted](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#mint), or existing long positions need to be closed.

#### You may also lack the minimum required funds:

* 0.15 ETH security deposit (refunded after the transaction)
* At least 0.65 [wstETH](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#wsteth-wrapped-staked-ether) to open a long

For details, see the [Minimum Position Size](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/liquidations-and-minimum-position#minimum-position-size) section.

## Close a Long

If you are unable to open a long position, it is due to a protocol imbalance between the [vault side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#vault-side-usdn-side) and the [long side](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-side). To restore balance, more long positions need to be opened, or more USDN needs to be [redeemed](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem).

Additionally, make sure you have 0.15 ETH in your wallet as a security deposit (refunded after the transaction), which is required for interacting with the protocol.

#### **⚠ What if I’m stuck in a Long position?**

Don’t panic – the [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator) helps rebalance the protocol. While [liquidation](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#liquidation) without the ability to close your position is theoretically possible, the [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator) significantly reduces this risk, making it extremely rare.

Blocked longs benefit from high [funding rates](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) → As long as you’re not liquidated, you keep earning lucrative funding rate rewards until closing is available again.

</details>

<details>

<summary>What If I Am Affected by Protocol Restrictions?</summary>

The [protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) may temporarily restrict certain actions to maintain balance. While this may seem concerning, it actually benefits affected users:

* If you can’t [redeem](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#redeem) [USDN](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#the-usdn-token): The [funding rate](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#funding-rate) increases, significantly boosting USDN [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield). Holding USDN during this period earns high returns.
* If your [long position](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#long-position) is locked: The funding rate turns negative, meaning longs earn yield instead of paying fees.

#### **What about liquidation risks if I can't close my Long?**

The [dip accumulator](/ultimate-synthetic-delta-neutral/the-usdn-protocol/long-side/dip-accumulator) helps rebalance the protocol and facilitates the unlocking of longs. While [liquidation](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#liquidation) without the ability to close is possible, it is extremely rare due to built-in protections.

Reminder: USDN’s [long ETH perpetual](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#perpetual-long-only) is designed for long-term exposure, not frequent short-term trading.&#x20;

</details>

<details>

<summary>What Is the Difference Between Collateral and Trading Exposure in the USDN Protocol?</summary>

* **Collateral**: The real portion of a long trader’s position, meaning the part that the user can withdraw.
* **Trading Exposure**: The synthetic portion of the exposure resulting from [leverage](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage). It increases potential gains or losses but cannot be directly withdrawn by the trader.

Together, these two components form the total exposure.

</details>


# Glossary

## USDN Protocol-Specific Definitions

### **Long Side**:&#x20;

This part of the protocol consists of traders taking leveraged long positions to amplify their exposure to the underlying asset. It represents the perpetual long-only side, enabling traders to bet exclusively on the underlying asset's upward movement while engaging with the USDN token’s rebalancing mechanisms.

### **Vault Side/USDN Side**:&#x20;

The part of the protocol where users deposit the underlying asset to obtain the USDN token, a synthetic dollar whose value hovers around $1, while potentially earning yields.

### **Collateral**:

In the USDN protocol, "collateral" refers to the portion deposited by users to open long positions. This is the real and tangible part of the position that a long trader can withdraw, unlike the trading exposure, which represents the synthetic exposure created by leverage.

### **Dip Accumulator:**

A mechanism designed to rebalance the protocol during significant underlying asset price drops. It activates under specific criteria and ensures that the protocol does not experience excessive imbalances. For users, it provides an opportunity to buy dips in the underlying asset and position themselves at optimal moments.

### **Funding Rate:**

A rate applied between the long side and the vault to rebalance the protocol based on imbalances. Positive funding rates mean longs pay the vault, while negative ones mean the vault pays longs.

### **Mint:**

The creation of new USDN tokens in exchange for underlying asset deposits into the vault.

### **Perpetual Long-Only:**

A type of perpetual contract that only allows traders to take long positions on the underlying asset, with no expiration date. It supports long trading within the USDN protocol.

### **USDN Protocol:**

A decentralized infrastructure that enables the creation, management, and stabilization of the USDN token on the Ethereum blockchain via smart contracts.

### **Redeem:**

The action of retrieving the underlying asset in exchange for returning USDN tokens to the protocol.

### **Total Exposure:**

The sum of collateral and trading exposure, representing the total exposure of a trader to the underlying asset market.

### **Trading Exposure:**

The synthetic portion of a long position's total exposure, resulting from leverage. It cannot be directly withdrawn.

### **The USDN Token:**

A decentralized synthetic dollar designed to hover around $1 in value while offering potential yields through a delta-neutral strategy.

### **Vault:**

The reserve where the underlying asset deposited to mint USDN is stored. It serves as the counterparty to long positions within the protocol.

### **Skew Factor:**

The USDN protocol's skew factor, internally referred to as "EMA," which is the value of the funding rate when the protocol is perfectly balanced.

## General and Financial Definitions:

### **APY (Annual Percentage Yield):**

The annual rate of return, accounting for compounding interest. Used to estimate potential gains from the underlying asset and funding rates within USDN.

### **Arbitrage:**

A financial strategy that profits from price differences of the same asset across multiple markets.

### **Blockchain Layer 1:**

The primary network where the USDN protocol is deployed, such as Ethereum.

### **Collateral:**

An asset used as security to back a loan or a position.

### **Decentralized Finance (DeFi):**

An ecosystem of decentralized financial services offering lending, borrowing, and trading without intermediaries.

### **Delta-Neutral:**

An investment strategy that balances gains and losses to minimize sensitivity to market fluctuations.

### **Synthetic Dollar:**

A digital asset designed to replicate the value of the US dollar (USD) without being backed by physical dollar reserves.

### **Gas Fees:**

Transaction fees on the Ethereum blockchain, paid in ETH.

### **Leverage:**

A method to multiply a trader’s position relative to their collateral.

### **Liquidation:**

The forced closure of a long position when collateral no longer covers potential losses.

### **Long Position:**

A market position where a trader bets on an asset’s price increase.

### **Market Maker:**

An entity providing liquidity on trading platforms, stabilizing markets.

### **Oracle:**

A service that allows smart contracts to fetch external data, such as asset prices.

### **Permissionless:**

A quality of protocols that allows anyone to interact with them without prior authorization.

### **Rebase:**

A mechanism that increases the supply of a digital asset when its value exceeds a predefined threshold, adding tokens directly to holders’ wallets.

### **Short Position:**

A market position where a trader bets on an asset’s price decrease.

### **Slippage:**

The difference between the expected price of a transaction and the actual execution price.

### **Smart Contract:**

Self-executing code on a blockchain that automates operations securely.

### **Smart Contract Audits:**

Security reviews of smart contracts to identify and fix vulnerabilities.

### **Stablecoin:**

A cryptocurrency pegged to a stable asset, such as the US dollar.

### **Stop-Loss:**

A mechanism to limit losses by automatically closing a position if the price hits a specified threshold.

### **Total Value Locked (TVL):**

The total value of assets deposited in a DeFi protocol.

### **wstETH (Wrapped Staked Ether):**

A wrapped version of stETH, used as collateral in the USDN protocol to earn staking rewards.

### **Yield:**

Potential returns from depositing or staking assets in a DeFi protocol.


# Long farming

**Introduction to Long Farming**

Long farming is an annex contract within the [USDN protocol](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#usdn-protocol) that incentivizes long-side users to engage in the system actively. Users can use the long farming mechanism to boost their [yield](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#yield) through rewards. This mechanism aligns with the USDN protocol's decentralized vision, prioritizing transparency, security, and efficiency.

***

**How Long Farming Works**

Long farming allows participants to generate rewards with their USDN protocol positions. Participants can:

* **Earn rewards:** Accumulate rewards based on their contribution to the protocol.
* **Enhance exposure:** Maximize potential gains through [leveraged](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#leverage) positions.
* **Contribute to stability:** Help maintain the protocol's [delta-neutral](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#delta-neutral) structure.

***

Key components

* **Position management:** Users can deposit, withdraw, or harvest rewards from specific USDN protocol positions.
* **Reward distribution:** Rewards are distributed based on the initial [trading exposure](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#trading-exposure) of the position and the reward allocated per block.

Security components

* **Notifier incentives:** The long farming contract must trigger when a position is [liquidated](/ultimate-synthetic-delta-neutral/the-usdn-protocol/glossary#liquidation) in the USDN protocol to halt rewards to the owner and remove the position from the contract. To ensure protocol health, the contract incentivizes notifiers to report liquidations. The notifier receives a part of the position's reward.


# How to Mint and Redeem USDN

## <mark style="background-color:orange;">Coming soon</mark>


# How to Open and Close a Long

## <mark style="background-color:orange;">Coming soon</mark>


# How to use the Dip Accumulator

## <mark style="background-color:orange;">Coming soon</mark>


# Whitepaper

You may find the white paper here:

{% file src="/files/9dlvKH1qRamJgc645ynh" %}

It can also be downloaded here:

{% embed url="<https://github.com/SmarDex-Ecosystem/usdn-contracts/blob/main/whitepaper/whitepaper.pdf>" %}


# Audits

### Guardian

{% embed url="<https://guardianaudits.com/>" fullWidth="false" %}

{% embed url="<https://github.com/GuardianAudits/Audits/blob/main/Smardex/12-18-2024_Smardex_USDN.pdf>" %}

<details>

<summary>Team Response to Acknowledged Issues</summary>

### M-01 | Imbalance Does Not Count Funding

We don’t need the imbalance checks to be so precise. Fundings won’t affect the imbalance in a way that would put the protocol in a critical position, so it is safe to acknowledge this from our point of view.

### M-02 | Positions Opened Above Max Leverage

It is possible for a position to exceed our maximum limits, but we estimate the likelihood and feasibility to be extremely low, as it would require predicting the price in advance. Additionally, holding a position with higher leverage significantly increases the chances of liquidation for users. That being said, if certain positions slightly exceed the maximum leverage in edge cases, it does not introduce any risk to the protocol.

### M-05 | Initiators Avoid A Portion Of Funding

We chose this solution because we estimated it to be the best one. It’s not perfect, but the alternative is even worse, as it would require applying funding retroactively from the last update timestamp to the position’s creation timestamp. Not only does this seem unfair, but if the last update timestamp is very old, it could result in a proportionally larger error at the user’s expense. With the current solution, the error is bounded by the Chainlink heartbeat, ensuring it remains within a reasonable magnitude. Therefore, we believe it is the safer approach.

### M-06 | \_triggerRebalance Does Not Account For Liquidation Rewards

According to both the auditor and us, the value sent to the liquidator is negligible compared to the protocol's balances. This does not justify the additional gas consumption.

### M-13 | Exposure During Closure Unaccounted

The difference in value is negligible, and fixing it would require complex logic just to handle that case.

### M-15 | Fee Change Hurts Traders

We chose not to cache all values in the case of an update made by governance. If we did, it would cost users more gas and have a low positive impact for them. We estimate the risk to be low, as updates will not happen frequently.

### M-18 | No Rebalancer Trigger On Individual Liquidation

This is by design, changing this logic would mean giving users more control over the rebalancer’s trigger, and would mess with the bonus mechanism.

### M-20 | Increased Liquidation Rewards

While the issue is valid, executing it profitably on a consistent basis will be virtually impossible due to the security deposit and various fees (network and protocol). Therefore, from our point of view, it is safe to acknowledge.

### M-27 | Liquidatable Positions Can Be Opened

This issue will occur in a very specific case: when we recalculate the tick due to the max leverage condition, and the new tick results in a higher liquidation penalty than the first one. This would mean the position becomes instantly liquidatable. We estimate the risk to be low, and it is safe to acknowledge.

### M-29 | Sandwich Liquidations

The scenarios explained in this issue are correct, but the protocol fee and the gas cost for making a deposit or a withdrawal will make this case more expensive than staying in the vault.

### M-30 | Validate Withdrawal Ignores Funding

We think that fixing this issue will lead to more issues in the initialization/validation flow. The gain is low since it only accounts for the funding accumulated between initialization and validation, which is currently 24 seconds. The DoS risk exists but only in a very difficult edge case with extremely low liquidity in the protocol.

### M-31 | Remove Pending Position Price Can Be Stale

This is an emergency function, requiring the price to be the latest available is not mandatory and could introduce friction is our operations during a potential incident.

### M-32 | Neutral Price Used In Init Functions

The price used during initiate actions is temporary. Therefore the fact that it doesn’t use the confidence interval doesn’t matter that much. While it could be annoying for the slippage check, it would require some refactoring for a marginal benefit, so we prefer to leave it as is.

### M-33 | Funding Rate Affected By Updates

We know that our funding formula works well when there is activity in the protocol. The funding rates and the protocol's balance will improve with user actions, even though these actions could potentially accentuate its imbalance. Also, the new formula from the recommendation will not work as expected.

### M-34 | Old Vault Validations Swing USDN Price

The potential impact is minimal, while the fix carries a higher risk of introducing new issues.

</details>

### Bailsec

{% embed url="<https://bailsec.io/>" %}

{% embed url="<https://github.com/bailsec/BailSec/blob/main/Bailsec%20-%20Smardex%20USDN%20-%20Final%20Report.pdf>" %}

{% embed url="<https://github.com/bailsec/BailSec/blob/main/Bailsec%20-%20Smardex%20Ecosystem%20-%20Final%20Report.pdf>" %}

{% embed url="<https://github.com/bailsec/BailSec/blob/main/Bailsec%20-%20Smardex%20-%20Router%20-%20Final%20Report.pdf>" %}

<details>

<summary>Answer from the team to acknowledged issues</summary>

### Issue\_01 Wrong wstETH conversion

The price of stETH is almost always extremely close to the price of ETH (because they are backed 1-to-1) and there is no reason to doubt this in this particular scenario. For estimating the liquidator rewards, this simplification is satisfactory.

### Issue\_02 Maximum reward can be bypassed via single liquidations

The 0.5 ETH cap on the reward is already extremely high, and even with very high gas prices, it's unlikely that a single tick liquidation achieves this maximum. Furthermore, ticks are usually liquidated one at a time by automated bots as the price gradually draws down.

### Issue\_08 Rebalancer can remain locked due to frequent rebalances

Because users of the Dip Accumulator (Rebalancer) are exempt from position fee on entry and receive a bonus collateral reward each time it gets triggered, it's important to avoid that they can exit as soon as the reward was collected. This would nullify the rebalancing effect of this component during crucial liquidation events.

### Issue\_09 Possible lost funds due to accMultiplier of zero

### Issue\_12 Closure initiation with lastPrice does not align with validation

During closure initiation, the `_lastPrice` can be more recent than the user-provided price, but never older. As such, it's a better estimate to use the `_lastPrice` for the slippage check, especially knowing that most of the time, the price comes from the push-based oracle, which does not have a confidence interval anyway.

### Issue\_13 Funding rate inconsistency during position closures

The trade-off that was made is to allow users to use the on-chain price for initiation of the position closure, which greatly reduces gas usage compared to using a more recent low-latency price. To avoid other security issues and to remain fair to all users, the unrealized funding is extrapolated to the current timestamp for calculations, so that a user closing a position pays funding up to this moment. This is of course an estimate which can insignificantly affect the calculations of the funding for other users for a short period of time.

### Issue\_14 Vanilla liquidation within closure validation

Because the difference between the position value calculated during closure initiation and closure validation can only be small (they differ in time by only 24 seconds), the amount of assets that will be transferred from/to the vault for correction will not significantly affect the balance of the protocol. Furthermore, we feel that the triggering logic for the Dip Accumulator (Rebalancer) is too complex to be included in the position closure flow for only minimal benefits.

### Issue\_15 Opening validation liquidation check

Since the `_lastPrice` can be more recent than the user-provided price (which is for a timestamp 24 seconds after their *initiation*), but never older, it constitutes a better price to check for a liquidation state here. Moreover, the position can be liquidated at any point and by anyone after the opening has been initiated, which greatly reduces the chances of a user dodging a liquidation.

### Issue\_16 PnL reset can be exploited by vault depositors to gain a benefit

The protocol has many measures in place to avoid that small changes in balance due to protocol state adjustment can profit a malicious user. Position fees and the confidence interval of the low-latency oracle are used to ensure no profit can be made for such small divergences. On the flip side, those adjustments ensure fairness to users while keeping gas costs to a minimum.

### Issue\_17 Lack of opening fee caching can change outcome

The position fee is rarely changed, and if changed, all efforts will be made to do it while no user has a pending action that must be validated. In most cases, the impact on the price slippage check would be very minor anyway.

### Issue\_18 Penalty change for maxLeverage scenario

This behavior is documented in the source code and is expected. It does not constitute a security issue as the protocol can accomodate leverages which are slightly higher than the set maximum without any problems.

### Issue\_19 Incorrect clamping during position closure initiation

As recommended by the auditors, we will not fix the issue.

The position value exceeding the long's balance is a pretty extreme edge case, and the extrapolation should be on at most 1 hour (Chainlink's heartbeat). Therefore, we are confident this issue is safe to acknowledge.

### Issue\_20 Lack of fee application during position closure

Imbalance checks are there to prevent heavy imbalance on one side, they do not need to be extremely precise. As the impact is negligible, we can safely acknowledge this issue.

### Issue\_21 Slippage check uses price without CI

Depending on the oracle used during the initiation phase, the price provided can not include a confidence interval. So, for the sake of consistency, it is not included in the slippage check for any oracle price.

### Issue\_23 Opening and SDEX fee will be lost if pending action is removed

The removal of a blocked pending action is an extreme edge case, the loss of the fee (in wstETH and SDEX) is negligible compared to the cost of storing those values for each and every action. As this does not impact other users, it is safe to acknowledge.

### Issue\_24 Funding rate update frequency impacts outcome

This is an accepted side effect of the current calculation, this is accurately reflected in the funding rate shown on our frontend.

### Issue\_25 Removal of blocked closure validation does not account for new price

If a pending action is blocked, the protocol cannot function properly. We consider it more important to act fast rather than try and get the correct round ID from Chainlink to calculate the proper value. If absolutely necessary, we can call the `liquidate`function with a fresh price before removing the blocked pending action.

As this is an extreme edge case and does not impact other users, we think it is safe to acknowledge.

### Issue\_26 Invariant violation due to maxLongBalance clamping

The clamping of the long balance was added to avoid a potential DoS of the protocol in extreme conditions, including extended protocol inactivity with an aggressive funding and a very low average leverage. While it is not a perfect solution, we find the trade-off acceptable, and thus, the issue safe to acknowledge.

### Issue\_27 Removing actions without cleanup can result in several side effects

The removal of a blocked pending action without cleanup is a "last resort" functionality. While it is not ideal, it is better than having the protocol (and thus, user funds) blocked with no recourse. We are aware of the side-effect and will only use this function if there are no other solutions.

### Issue\_28 Stuck securityDeposit in case of blocked removal without cleanup

As previously stated in `Issue_27`, we will only use `_removeBlockedPendingAction`without cleanup if there are no other solutions.

### Issue\_29 Removal of blocked actions can imbalance the protocol

As previously stated in `Issue_27`, we will only remove a pending action if it is currently blocking the whole protocol. By-passing imbalance checks is an acceptable side effect to unblocking the protocol.

### Issue\_30 Inconsistency in removing initiated opening

We consider that this is an acceptable case and prefer to not change the protocol logic.

### Issue\_31 Incorrect longBalance reset in case of outstanding bad-debt position

Addressing this would require significant changes to the underlying math. Given that this is an edge case, and if `longBalance` reaches zero, the implications of this particular scenario are relatively minor compared to broader concerns.

### Issue\_32 Extrapolation within opening initiation can result in incorrect tick for position

As the solution to this issue is non-trivial, we've followed Bailsec recommendation and added documentation in the code.

### Issue\_33 maxLeverage excess within \_calcRebalancerPositionTick

This issue can only occur when the penalty has been changed and the Rebalancer attempts to open a position on a tick that still has the previous penalty. While this scenario is possible, we accept that the Rebalancer may occasionally have a position with a slightly higher leverage than anticipated.\
Following the Bailsec recommendation, we have added code documentation to explicitly address this behavior.

### Issue\_34 Edge-case can result in lower leverage than expected

Like the issue 35, we acknowledge that this edge-case can happen, but we accept the fact that the Rebalancer can maybe have a lower leverage than expected.

### Issue\_35 Extrapolation can result in inaccurate posId.tick

The two-step action on the protocol means that extrapolations made during the initiation phase may slightly change by the validation phase. This is a design choice, and we accept these cases as part of the system's expected behavior.

### Issue\_36 Rebalancer leverage may often be insufficient to reach target

This is done on purpose to avoid that the Rebalancer has a high leverage, resulting in a riskier position. If the Rebalancer position gets liquidated, its balancing effect is moot. We can safely acknowledge this issue, as it is a design choice.

### Issue\_38 Position value can never become worth more than position expo even with funding application

Clamping the maximum position value to the position's total exposure was a deliberate design choice. As noted in the Bailsec recommendation, altering this logic would require a full rewrite of all mathematical models.\
For a position value to approach its total exposure would necessitate both extreme profits AND consistently increasing funding rates growing its value. We have decided to accept this outcome and acknowledge this limitation as a known issue.

### Issue\_39 Users can frontrun the oracle update

The user can immediately create a profitable position, but they will be locked into the protocol during at least 4 hours. This means they are exposed to price action of the underlying asset for this duration. If the Rebalancer gets triggered again, they could be locked for additional time. In any case, user profits aren't guaranteed.

### Issue\_40 minLongPositionCheck does not include bonus

This issue will limit, in specific cases, the opening of a Rebalancer position.\
We plan to fix this issue in a future update of the protocol, but in the meantime it is safe for us to acknowledge it as it does not represent a security risk for the protocol.

### Issue\_41 Erroneous imbalance check

Like for the issue 40, we plan to fix it in a future update.

### Issue\_42 Payout of liquidation rewards post rebalancing

The calculation of the liquidation reward depends on different factors, of which the Rebalancer action. Those rewards are effectively taken from the vault side, but are clamp to 0.5 ETH.\
So even if the payout put the protocol in an unbalanced state, it will have a minimal impact.

### Issue\_43 Funding is erroneously impacted by temporary bad-debt scenario

The consequences of this issue have a low impact overall. The funding rate being impacted momentarily might result in minor discrepancies in funding payments for users during this brief period.

### Issue\_44 Rebalancer is only triggered if there are no pending liquidations left

It's more beneficial to address and compensate for the imbalance after all liquidations have occurred, particularly when the imbalance is at its peak.

### Issue\_45 Bonus is incorrectly impacted by bad debt scenario

We can attribute this behavior to design choices, as we intentionally wanted to prevent the vault from incurring additional costs.

### Issue\_47 Hindsight changes of parameter settings

The changes to these parameters are inherently governance-related, as they require admin intervention to update. These adjustments, although impactful within their specific domains, do not generally disrupt the core functionality or stability of the protocol.

### Issue\_48 Change of \_liquidationPenalty can result in unexpected leverage change for users

The mechanism where the liquidation penalty is stored at the time of position initiation ensures that each position retains its original penalty value throughout its lifetime. This design choice helps maintain consistency and predictability for users by ensuring they do not experience sudden changes in their positions' leverage due to external modifications.

### Issue\_51 Extrapolation can be different from real funding

By considering the audit recommendations, we will not apply a fix and we will continue to monitor its impact. We will stay vigilant and adapt our strategies as needed based on ongoing monitoring and analysis.

### Issue\_52 Pending vault validations will impact the vault state

The current approach by limiting user action imbalances and ensuring that actions are accompanied by other queued pending actions validation that have been present for more than 15 minutes helps mitigate these risks without necessitating immediate changes to the deposit and withdrawal logic.

### Issue\_53 Several scenarios allow for frontrunning interactions

Taking into account all the necessary conditions, such as a large position nearing liquidation and price timestamp manipulation, as well as the significant size of the refactor and the potential side effects, we have decided not to implement a fix at this time.

### Issue\_54 Funding adjustment can be blocked due to \_pendingBalanceVault mechanism

Since changes in funding rates only occur after deposit or withdrawal validation, there is a 15-minute window where the impact can be observed. However, this temporary fluctuation is relatively minor and usually doesn’t have a significant effect on overall trading conditions.

### Issue\_55 Incorrect imbalance check during deposits

Imbalance checks are designed as virtual evaluations that should closely reflect the actual imbalance state of the protocol, but they do not necessarily need to be exact. The primary goal is to ensure that these checks provide a reasonably accurate representation of the system's state at the time of evaluation. In this context, while incorporating extrapolation into the imbalance check would improve accuracy, it is important to weigh the benefits against the potential complexity and risk of introducing new issues.

### Issue\_56 Missing slippage check for burned SDEX amount

The low SDEX fees mean slippage would only affect the burned amount by a few wei.

</details>


# Overview

**P2P Lending** is a decentralized marketplace that empowers individuals to lend or borrow without permission or intermediaries. It restores a true free market for capital, where two parties freely agree on loan terms. Unlike traditional DeFi protocols, P2P Lending removes liquidation risks through fixed-term, fully-collateralized loans.

<div align="center"><figure><img src="https://343458874-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2KU66asBUFXoL9piKSAA%2Fuploads%2FVVN4JbgUYomkpLojl8tY%2FCapture%20d%E2%80%99e%CC%81cran%202025-05-20%20a%CC%80%2017.43.37.png?alt=media&amp;token=ec68c987-8b34-42a7-9bfa-70020dd34920" alt=""><figcaption></figcaption></figure></div>

***

### Key Principles

* Fully on-chain, peer-to-peer lending
* No liquidation: funds are safe until maturity
* Borrower-defined terms: LTV, interest, deadlines
* Fixed interest — no accrual over time
* ERC721 loan representation (NFTs)
* Permissionless, trustless, and transparent


# Borrow

## How to Create a Borrowing Proposal

1. **Choose your collateral** (any ERC20 token) and deposit it.
2. **Select the asset** you want to borrow.
3. **Define your loan terms:**
   * The [Loan-to-Value (LTV) ratio](#user-content-fn-1)[^1]
   * The fixed interest to be repaid
   * The funding deadline
   * The repayment deadline
4. **Pay the fixed fee of 50 SDEX**, which is burned immediately upon proposal creation.
5. **Submit your offer** — it is instantly visible on-chain.
6. [**Receive funds from lenders**](#user-content-fn-2)[^2] once they accept your terms.
7. **The proposal can be cancelled** at any time as long as it has not yet been funded.
8. **Repay before deadline** (principal + interest) to recover your collateral.
9. **In case of default**, lenders can claim your collateral via smart contract.

***

### **Borrower Protocol Rules**

* **Set your own LTV**: There is no minimum collateral requirement — you choose your Loan-to-Value ratio. Lenders will evaluate the risk.
* **No liquidation risk**: Your collateral stays locked until the repayment deadline, regardless of price movements. It can only be claimed if you fail to repay on time.
* **Flexible repayment**: If multiple lenders funded your loan, you can repay them one by one in any order. Each repayment unlocks the matching share of your collateral.
* **SDEX fee is adjustable**: The creation fee (default 50 SDEX) can be updated by governance, but will never exceed 1,000,000 SDEX. This keeps participation fair, even if the token price changes.

[^1]: The proportion you wish to borrow relative to your collateral’s .

[^2]: Your loan proposal can be funded by multiple lenders, each contributing a portion of the total amount. The proposal may also be only partially filled, depending on lender participation.


# Lend

## How to Lend

1. **Browse offers** on the P2P Lending market.
2. **Evaluate the risk**: check collateral, loan amount, interest, and deadlines.
3. **Choose how much to lend** — minimum 5% of the requested loan amount (max 20 lenders per proposal).
4. **Lend instantly** — funds are transferred immediately to the borrower.
5. **Receive an ERC721 NFT** that represents your loan position.
6. **At maturity:**

   * If repaid: you receive principal + interest.
   * If defaulted: you can claim your share of the collateral.

   &#x20;      → In both cases, the loan NFT is burned.
7. **No fees for lenders** — you keep 100% of the interest.

***

### **Lender Protocol Rules**

* **Minimum 5% per lender**: You must lend at least 5% of the requested amount. If a loan is already 92% funded, you’ll need to lend the full remaining 8%. This avoids leaving unfillable fragments.
* **Fixed interest for all lenders**: All lenders receive the same fixed interest, regardless of when they participated. This creates a competitive dynamic: lend early to secure a spot, or wait and aim for better time-weighted returns.
* **NFTs are transferable**: Your loan position is an NFT. If you sell or transfer it, the repayment goes to the current holder — enabling secondary market activity.


# Advanced Concepts

### Technical Features

* **Permit2 Integration**: Token approvals are handled via signature using [Uniswap's Permit2](https://blog.uniswap.org/permit2-and-universal-router). This simplifies the user experience by eliminating separate approval transactions, while also reducing gas costs and improving security.
* **ERC721 Loan NFTs**: Each loan is represented as a unique NFT containing all relevant loan data. These NFTs can include metadata for display in wallets and platforms, making them easier to track and manage.

### Governance

* **ADMIN-Controlled Parameters:** The protocol is governed by a single ADMIN address, limited to adjusting only the SDEX fee and the minimum lending amount. This ensures controlled evolution while maintaining simplicity and security.
* **Immutable Smart Contracts**: The core contracts are not upgradable, ensuring long-term security and trustlessness. Once deployed, the logic cannot be changed.
* **No Emergency Pause**: There are no pause switches or backdoors — the protocol operates in a fully decentralized and unstoppable manner.


# Audit

### Bailsec

{% embed url="<https://bailsec.io/>" %}

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


