# What is NILE?

NILE is **The Next Generation of Concentrated Liquidity.**

NILE takes concentrated liquidity to the next level, optimizing for high frequency LPs and Layer 2 cost structures. The result is a hyper-efficient liquidity layer designed to attract the most effective liquidity providers, while delivering a clean and simple UX for traders.

As the sister fork to RAMSES on Arbitrum, NILE inherits the proprietary Concentrated Liquidity  ve(3,3) implementation-- bringing unparalleled efficiency to the Linea liquidity scene.


# Why Linea?

Why Did NILE Choose Linea?

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

NILE has made a strategic decision to select Linea as its platform of choice. The decision is rooted in the belief that the Linea ecosystem offers a wealth of high-integrity projects and DeFi pioneers who are at the forefront of the decentralization movement. With the Layer 2 narrative gaining momentum, the upcoming proto-danksharding EIP (Ethereum Improvement Proposal) further strengthens the ecosystem's potential. The combination of these factors contributes to NILE's confidence in Linea's ability to provide a robust and thriving environment for its operations.


# ve(3,3) Fundamentals

ve(3,3) a concept introduced by Andre Cronje's Solidly-- combines a multitude of successful DEX technologies into a cohesive flywheel.

In the subsections of this article, you will be able to learn about how the high-level architecture was built, and the design decisions behind such.


# Dilution Protection (Rebase)

A key function of the ve(3,3) model is the dilution protection rebases, which occur per epoch, to incentivize users to lock their tokens early on. The rebase is a nod to the OHM (3,3) model that was popularized the past couple years.

A practical example to give you a better understanding of how the system works:

**EXAMPLE: 25% Dilution Protection:**

{% hint style="success" %}
Note: NILE has a 25% rebase, increasing 1% per epoch until 50%
{% endhint %}

* You have 1000 NILE, which is 10% of the total supply of 10,000 NILE at the time.
* During this epoch, another 10,000 NILE was emitted to gauges, pushing the total supply of NILE to 20,000
* You can claim your rebase after the epoch ends and receive 250 extra NILE added to your position. This makes you now have 6.25% of the total supply, at 1250 NILE out of 20,000 NILE

The above is a crude but straightforward example that should simply explain the ideology and functionality of the rebase.


# veNILE (veNFT)

<figure><img src="/files/MmhnHNvs8e7ssFTXnRiy" alt=""><figcaption><p>veNILE</p></figcaption></figure>

veNFTs are specialized ERC-721 tokens that implement the vested-vote escrow (ve) model, representing a user's underlying position.

veNFTs have a multitude of benefits in the NILE ecosystem, such as:

* Vote on gauge emissions
* Vote on pools to earn Vote Bribes, and Swap Fees
* Transfer/Merge NFT positions
* Dilution Protection Rebases


# veNILE Revenue Distribution Schedule

{% hint style="info" %}
During epoch 0, since there was no pre-voting, all trading fees will be rolled into Epoch 1.
{% endhint %}

**Vote Bribes:** Users earn vote bribes immediately after the epoch flips. If there is a 1000 USDC bribe on a pair, and you are the only voter, you will receive 1000 USDC claimable at Thursday 0 UTC.

**Swap Fees:** Voters earn trading fees in real-time throughout the week, based on the pool(s) they voted for before the epoch flips. These are pushed on a regular cadence permissionlessly when the fee threshhold is achieved.


# DEX Functionalities


# Swaps

On NILE, similar to other decentralized exchanges (DEXs), users can swap tokens for others. The slippage and trade price are determined based on the total value locked in the liquidity pairs and whether arbitrage activities have balanced the pool to its market rate.

NILE features two types of Liquidity Pools, each with its own swap curve:

* Volatile (UniV2-Style): This is the basic type of pool where tokens are paired with equal weights in terms of dollar value. The volatile swap curve is used to facilitate trades within these pools.
  * The volatile swap curve used is:

$$
x\*y=k
$$

* Correlated (Andre-Style): NILE utilizes a stable swap curve that is an efficient implementation compared to other DEXs. The stable swap curve, originally devised by Andre, offers near-zero slippage and is designed to honor his innovative approach to stable swaps.
  * The stable swap curve used is:

$$
x^{3}y \ +y^{3}x \geq k
$$

## Graphical Representation of The ve(3,3) Swap Curves

To provide a graphical representation of the ve(3,3) swap curves, the graph below illustrates the variance between 0 and 100. It demonstrates that the Green (Correlated) curve exhibits less slippage from the mean as the K value fluctuates.

{% embed url="<https://www.desmos.com/calculator/5l0tnmuqh9>" %}
Green = StableSwap Curve, Red = Volatile Swap Curve
{% endembed %}

This visualization helps users understand the behavior of the swap curves and the corresponding slippage levels associated with different values of K. NILE aims to provide an optimized trading experience with minimal slippage, enhancing liquidity provision and ensuring efficient token swaps for users.


# Swap Fee Structure

Swap Fees of The NILE System

NILE has a competitive fee structure based on the **current market environment**, while also maintaining attractive fee revenue for veNILE holders.\
\
**Default fees:**

* Volatile Pair (vAMM) - 0.25% swap fee
* Correlated Pair (cAMM) - 0.01% swap fee

The protocol native pairs (vAMM - NILE/wETH) will be set at a 2% swap fee initially, to provide further incentive for users who wish to vote aligned to the protocol's native liquidity.

{% hint style="info" %}
Fees are adjustable by the NILE multisig if need be, to ensure the competitiveness and attractiveness for veNILE holders. The average ranges\* of each will be around:\
\- Volatile (0.2-2%)\
\- Correlated (0.01%-0.03%)\
\- Native (2%)

\*In the event of extreme market volatility, the NILEReserve can hike the fees past the ranges, within reason. \
\
The theoretical MIN and MAX for the pair fees is (1<= Fee <= 500bps). This means the minimum fee is 0.01%, and the highest is 5.00%.
{% endhint %}


# Voting

The main purpose of the veNILE NFT is to direct emissions to LP token pairs. This is achieved through voting for the pair. Emissions are distributed proportionally to the total percentage of votes in the epoch.

The expected emissions can be calculated using a simple division formula as such:

$$
emissions(PAIR) \ = \ (% \ of \ total \ votes \ \div 100 % ) \ \* emissions(WEEK)
$$

For example, in the first epoch 1,250 NILE will be distributed. If 10% of all votes are allocated to the vAMM-USDC/WETH pair; that pair will receive 125 NILE tokens distributed linearly throughout the epoch.


# Bribing (Incentivizing)

A fundamental aspect of the ve(3,3) DEX model is the inclusion of bribing as a core feature. NILE implements two types of bribes within the system:

1. **Vote Bribes:** Users and protocols have the ability to offer bribes to voters, influencing them to allocate emissions to specific token pairs. In exchange for their votes, the briber receives a proportionate distribution of the bribes. This mechanism allows stakeholders to shape the allocation of emissions according to their preferences and strategic interests.
2. **Gauge Bribes:** In addition to emissions, tokens can be directly offered as bribes to LP (liquidity provider) stakers. This incentivizes the growth of liquidity in specific token pairs, primarily benefiting protocols seeking to bootstrap liquidity efficiently within the NILE AMM (Automated Market Maker). By offering gauge bribes, protocols can attract liquidity and promote the development of robust trading pairs.

These bribing mechanisms empower users and protocols to actively participate in shaping the NILE ecosystem, fostering liquidity provision, and driving value to specific token pairs. It promotes an inclusive and dynamic environment where stakeholders can engage in strategic collaborations and mutually beneficial arrangements.


# Vesting (veNFT Management)

At the core of it all, managing your veNILE (veNFT) positions is a crucial part of the NILE model. Whether you are a user, or a protocol, it is important to routinely visit the vesting page to adjust your ve lock lengths, merge, or create a new veNILE position.

The existing functions within the vesting page are:

* Create Lock
* Manage Lock
  * Increase Lock Amount
  * Increase Lock Length
  * Merge veNILE Positions

You can learn more about veNILE and veNFTs at [veNILE (veNFT)](/introduction-to-nile/ve-3-3-fundamentals/venile-venft)


# LP Staking

In the NILE model, LP providers do not earn all of the swap fees since a portion of fees go to veNILE holders. Instead, staking gauges are implemented to incentivize users to provide LP tokens to earn attractive APRs.

The more votes allocated to a pair, the more NILE that will be emitted to the gauge in the following epoch.


# Concentrated Liquidity

Concentrated Liquidity is, currently, the most efficient and profitable method of market making that on-chain decentralized exchanges have access to. This was popularized and took the space by storm when Uniswap released their UniV3 model.\
\
To get an idea of what UniV3 offers we can compare it to a more centralized, and well-known, liquidity scheme: A CEX Order Book.

<div data-full-width="true"><figure><img src="/files/ohDIVqdpPt8mmVlSnkTQ" alt=""><figcaption></figcaption></figure></div>

As you can easily see in the CEX Order Book diagram above, the bid (buys) and asks(sells) are clearly shown, and the depth at which a market order would impact the median price is visually discernable.\
\
Interesting enough, the concentrated liquidity model, is represented visually as an inverse histogram of the order book. (Flip the photo upside down and invert the colors).

<figure><img src="/files/9prO7VfeTdmiT4iPYTY8" alt=""><figcaption><p>Concentrated Liquidity Price Range Module</p></figcaption></figure>

The blue area shaded in represents the liquidity ranges summated between all users within the LP pool \[within the same fee-tier, more on this later].

To make it very clear the efficacy differential between x\*y=k  (uniV2) and UniV3's orderbook-style AMM-- it needs to be explained that typical LP positions operate on a **(0,∞) range**.&#x20;

\
\
This means that each individual user in the pool is subject to providing liquidity in every possible positive real-number. Since every trade has to consider this when the swapping algorithms are ran, $100,000 of liquidity spread from 0 to ∞ is exponentially less efficient than, say, one with a defined range of ($1,000-$1,100). \
\
With the latter example of the $1,000-$1,100 liquidity range, it is calculatable that \
the same $100,000 of liquidity is now concentrated in a $100 price range, providing an **EXTREMELY efficient swapping experience**. Providing the lowest slippage currently feasible within the DeFi space.


# Fee Tiers

There are 4 default fee tiers when creating a Concentrated Liquidity position on NILE:

* **0.01% \[1bps Ticks] -** The lowest fee tier available (1 bps), this provides the best rate for highly correlated and pegged assets: e.g. (USDC,USDT)
* **0.05% \[10bps Ticks] -** The second lowest fee tier, this is good for competitive asset classes, such as USDC/WETH, which generate a lot of volume.
* **0.3% \[60bps Ticks] -** This fee tier is the standard for  pairs that do not fall in the other categories.
* **1.0% \[200bps Ticks] -** Currently the highest fee tier available, 100bps provides sufficient fee generation to offset the risk of providing liquidity for highly volatile assets.

{% hint style="info" %}
New fee tiers may be added in the future based on market conditions, and would be creatable through the V2 Pool Factory
{% endhint %}


# Fee Distribution

With the addition of [Concentrated Liquidity](/concentrated-liquidity-core/concentrated-liquidity) , there has to be some changes made to the fee model to adapt. The most notable changes are as such:

* 8% of fees will be routed to the ecosystem incentives fund.
* 20% of swap fees will be distributed to LP positions (to counter Impermanent Loss).
* 72% of swap fees will be distributed to veNILE voters in the same manner traditional ve(3,3) does.

**100% of vote bribes will still go to veNILE holders.**

{% hint style="danger" %}
These parameters regarding the swap fee distribution are variable and can be changed based on the protocol health and discretion of the core-- aligned to sufficient data and analytics.
{% endhint %}


# CL Gauges

The Concentrated Liquidity staking/rewarder solution novel to NILE

NILE introduces a significant enhancement to the CL rewarding model, primarily through the innovative CL Gauge contract infrastructure. This crucial component seamlessly integrates into the ve(3,3) model, and we have chosen to secure it under a BUSL-1.1 license.

**Features of NILE CL Gauges**

* Non-custodial staking solution
  * NILE employs a unique method of staking and rewarding LP providers through a delegation mechanism. This approach allows users to retain their NonFungiblePositions in their wallets while still earning Fees, NILE, and other LP Bribes through emissions.
* Competitive Rewarding Logic

  * The CL Gauges determine rewards based on several factors:
    * Tick Delta (Δ) \[Upper - Lower] of the user's position
    * Position size
    * Position Utilization: In Range? \[True or False]
  * This rewarding methodology offers several benefits. It encourages tighter liquidity ranges, resulting in higher emissions for participants. By concentrating liquidity within these utilized ranges, overall slippage decreases, and volume/fees increase due to more favorable swap routing.

  The following comparison illustrates how NILE's CL Gauge (Derived from RAMSES) solution outperforms other concentrated liquidity staking solutions:


# BUSL-1.1 License

NILE's CL inherits the BUSL License from RAMSES

**Nile, is an authorized fork of RAMSES. The** NILE **CL codebase is protected under RAMSES' BUSL-1.1 license.**

What this means is that the novel code cannot be used by other teams without direct permission from the authorizing entity, which in this case is RAMSES.

Protected Contracts Include, but are not limited to:

* ClGauge.sol & any relevant interfaces
* Any contracts designated with the BUSL-1.1 header.


# Competitive Farming

NILE's CL introduces the concept of competitive farming to ve(3,3)

With concentrated liquidity, there are new dynamics at play when providing liquidity and yield farming. NILE introduces the concept of competitive farming to the ve(3,3) model, which promotes the most optimized positions achievable by users.

**What is Competitive Farming?**\
Competitive farming can be simply explained as a method of rewarding LP providers in which the most 'competitive' and productive liquidity is rewarded the highest. In concentrated liquidity models, users/actors choose their liquidity ranges which they want to provide LP to. This opens the possibility for a user to choose any amount of tick ranges between 0 and infinity.&#x20;

**What are the benefits?**\
The more optimized a user's range is, the higher rewards they earn. This naturally creates an alignment of liquidity provisioning with the growth of the NILE. The ultimate goal of incentivizing liquidity is that you are driving more favorable swap routing towards pairs, for aggregators to pick up on. Concentrated liquidity is multiple times more efficient in bringing volume to a pair with regards to the dollar amount of liquidity provided.\
\
Higher fees are achieved as a result of more swap volume directed towards NILE CL pairs. Thus veNILE holders are able to earn more real-yield in the underlying tokens of the pairs.&#x20;

Visual Representation of Competitive Farming:\
In the figure below, the current price-tick of the pair is within the red area. This red area is the currently used swap-tick for trades to route through. Liquidity positions that have the highest concentration around this red line will earn the most rewards while it stays there. Whenever a large enough swap happens, this price-tick will move to either direction, changing the rewards distribution factors.


# NILE Token Distribution

The distribution of the initial supply of NILE

<figure><img src="/files/XGjeEODy1Dhhphb69jfa" alt="" width="256"><figcaption></figcaption></figure>

<table data-full-width="false"><thead><tr><th width="208" align="center">Initial Supply</th><th width="228" align="center">Max Supply</th><th align="center">Emissions Decay</th></tr></thead><tbody><tr><td align="center"><strong>5,000,000</strong></td><td align="center"><em><strong>∞</strong></em></td><td align="center"><strong>1% / Week</strong></td></tr></tbody></table>

<table data-full-width="true"><thead><tr><th align="center">Airdrop</th><th width="182" align="center">LGE</th><th align="center">Contributors</th><th width="174" align="center">veNFT Allocations</th><th align="center">POL</th><th align="center">Reserves</th></tr></thead><tbody><tr><td align="center"><strong>15%</strong></td><td align="center"><strong>5%</strong></td><td align="center"><strong>25%</strong></td><td align="center"><strong>30%</strong></td><td align="center"><strong>5%</strong></td><td align="center"><strong>20%</strong></td></tr><tr><td align="center"><strong>750,000</strong></td><td align="center"><strong>250,000 - 375,000</strong></td><td align="center"><strong>1,250,000</strong></td><td align="center"><strong>1,500,000</strong></td><td align="center"><strong>250,000</strong></td><td align="center"><strong>1,000,000</strong></td></tr><tr><td align="center">veNILE</td><td align="center">NILE AND/OR veNILE with 50% bonus</td><td align="center">NILE [vested] + veNILE</td><td align="center">veNILE</td><td align="center">NILE</td><td align="center">NILE</td></tr><tr><td align="center">Not Circulating</td><td align="center">Mixed</td><td align="center">Mixed</td><td align="center">Not Circulating</td><td align="center">Circulating</td><td align="center">Not Circulating</td></tr></tbody></table>


# Emissions Schedule

The liquid NILE emissions according to the protocol's tokenomics

**100% of ALL emissions go to gauges**, there are no team emissions or other distributions. Full decentralization of the emission distribution is the main priority.

There is a 1% exponential decay week over week normally, reducing emissions in perpetuity.

{% hint style="success" %}
Emissions can and will be adjusted down or up based on market demand, and monitored to prevent overinflating
{% endhint %}

The formula to calculate an Epoch's emissions is:

$$
Emissions{(t)} = E\_{0}\ \*\ (e^{-rt})
\ \ \ t = Epochs \ E\_{0} = X\ -r = decay \ coefficient
$$

Alternatively, a user can calculate the emissions for an epoch based on the previous, as such:

$$
Emissions(epoch(N)) \ = Emissions(N-1)  \ \* (1.00-decay)
$$


# xNILE (Deprecated)

Escrowed NILE "xNILE"

<figure><img src="/files/7JBzshVL3cK5rgKLD59m" alt=""><figcaption><p>The xNILE token</p></figcaption></figure>

**What is x**NIL&#x45;**?**\
xNILE is a new solution developed by the NILE team to address the sustainability challenge associated with the natural fluctuations in flywheel operations. It serves as a non-transferable representation of 1 unit of NILE, securely stored within the xNILE token smart contract. xNILE provides users with several conversion options to both NILE and veNILE, each with unique penalties and vesting periods.

{% hint style="info" %}
xNILE is not a replacement for NILE. Users still earn NILE emissions, rebases, and other sources.
{% endhint %}


# How is xNILE obtained?

Users can acquire xNILE through vote bribes and emission splits in specific low-impact liquidity pairs. The NILE team intends to utilize xNILE as a means to advance sustainable vote-bribe matching programs. Each gauge will have the opportunity to earn a proportionate split of NILE/xNILE based on the liquidity pair's impact on the health of the DEX. Core pairs, which contribute significantly to the ecosystem's growth and the DEX's longevity, will receive the majority or entirety of emissions in liquid NILE. Conversely, extremely low volume and low fee-generating pairs will receive a higher percentage share of emissions in xNILE. This approach promotes sustainability and discourages purely short-term capital that does not align with the goals of the ecosystem.

The initial Ratios per gauge:

* **Default Ratio:** 20% NILE **/** 80% xNILE

{% hint style="info" %}
These ratios are adjustable by the team/governance depending on the efficacy and necessary precedents set forth.&#x20;
{% endhint %}


# How is xNILE used?

xNILE offers three distinct functionalities that form the basis of the decision matrix:

* **Instant Exit to** NILE **(x**NILE **-->** NIL&#x45;**):** This conversion allows for an immediate transfer of xNILE to NILE at a rate of X\* NILE per xNILE, with a Y\*% haircut applied.
* **Instant Exit to ve**NILE **(x**NILE **--> ve**NIL&#x45;**):** With this functionality, xNILE can be instantly converted to veNILE at a rate of 0.7 veNILE per xNILE.
* **Vesting of x**NILE **(x**NILE **-->** NILE **or ve**NIL&#x45;**):** Vesting allows users to receive the full value of the NILE backing each xNILE, through various methods:

  * Minimum Vesting Length (Cancellation Period): The minimum vesting period for xNILE is set at 14 days (86400s \* 14), during which it cannot be canceled or returned.
  * Maximum Vesting Length (100% Exit): The maximum vesting period for a full exit of xNILE is 120 days (86400s \*120).

  Once the minimum vesting length has been surpassed, it becomes impossible to cancel the vesting to retrieve your initial xNILE.

X\* = Variable changable by governance that represents the amount of xNILE -> NILE conversion from instant exits

Y\* = Variable that represents the haricut % determinable from X


# xNILE "Flywheel"

xNILE incorporates an inherent flywheel mechanism within its exit penalty system. All forfeited or exited xNILE tokens are utilized as bribes for high-impact liquidity pairs that generate significant fees and volume. This ensures that the bribes remain balanced and aligned with the overall health of the DEX.

The amount of xNILE allocated for bribes follows an inverse relationship with the vesting of xNILE. As more vesting periods are completed without any exit penalties, the xNILE bribes decrease. Conversely, if a significant amount of xNILE is being instantly exited, incurring exit penalties, the xNILE bribes naturally increase to compensate for the loss.

This creates a sustainable flywheel within the existing ve(3,3) flywheel framework, fostering long-term growth of the ecosystem while effectively aligning the interests of capital providers.


# Dilution Protection (3,3) Rebases

NILE, adopted the (3,3) model, which includes a mechanism to mitigate dilution.&#x20;

During the initial launch, veNILE holders will benefit from a 25% weekly rebase, which helps counterbalance dilution resulting from the protocol's emissions schedule. With each subsequent epoch (week), this percentage increases by 1% until reaching a maximum cap of 50% anti-dilution per epoch.

NILE strongly believes that rebases/anti-dilution are crucial to the entire model, and without it-- leads to a dangerous misalignment with users.


# Deployed Contract Addresses

Contract Addresses for NILE on Linea:

| Contract              | Address                                    |
| --------------------- | ------------------------------------------ |
| proxyAdmin            | 0x8e01fc0d89b93a6447D6c6Eca6fBd30e6E4a1ce3 |
| contractDeployer      | 0x95120704f4E2D545Aea8b6B3c16d9Da1fa32E30F |
| emissionsToken        | 0xAAAac83751090C6ea42379626435f805DDF54DC8 |
| gaugeFactory          | 0xAAA932839641c037452f826BB9d7B2057129833b |
| feeDistributorFactory | 0xAAA1c31Cc1d1C2da7e634130DeD0ea2043271744 |
| pairFactory           | 0xAAA16c016BF556fcD620328f0759252E29b1AB57 |
| router                | 0xAAA45c8F5ef92a000a121d102F4e89278a711Faa |
| veArtProxy            | 0xAAACF9e4eBaa3f530161477cc49fE4be4Dfc4633 |
| votingEscrow          | 0xAAAEa1fB9f3DE3F70E89f37B69Ab11B47eb9Ce6F |
| rewardsDistributor    | 0xAAA9Ea898ae0b7D3805aF555AF3a2e3BdF06D22C |
| voter                 | 0xAAAf3D9CDD3602d117c67D80eEC37a160C8d9869 |
| minter                | 0xAAA823aa799BDa3193D46476539bcb1da5B71330 |
| factory               | 0xAAA32926fcE6bE95ea2c51cB4Fcb60836D320C42 |
| nfpManager            | 0xAAA78E8C4241990B4ce159E105dA08129345946A |
| nftDescriptor         | 0xAAA04d7751adC79e1525B408Ba38344C5797322b |
| swapRouter            | 0xAAAE99091Fbb28D400029052821653C1C752483B |
| pairFlash             | 0xAAAFC0791b0eF4D4225d1c1F57Dd6a41177F8562 |
| quoter                | 0xAAAbFD1E45Cc93d16c2751645e50F2594bE12680 |
| quoterV2              | 0xAAAEA10b0e6FBe566FE27c3A023DC5D8cA6Bca3d |
| lens                  | 0xAAA75a605C2f245A30Fb4299E5CDfBF6B4FB30B6 |
| tickLens              | 0xAAAD7F8b00B5ce6F8516AC595f0Bb175Ae755c63 |
| gaugeV2Factory        | 0xAAA2D4987EEd427Ba5E2c933EeFCD75C84b446B7 |
| feeCollector          | 0xAAA2A49958a443Dc9d19FdDEe873B5D1d6e84A2f |
| xToken                | 0xAAAE58986b24e422740C8F22B3efB80BCbD68159 |
| commandCenter         | 0xAAA11500dDdB2B67a90d1a154dfB7eaBB518EAE6 |
| protocolWhitelist     | 0xAAAF4269e5aD7D917D346c375B8Ab57f07Ea1553 |
| incentivesController  | 0xAAACd718B331DAe78ED62499A08F387d381a104C |
| permit2               | 0xAAA45c11C2670Bf00F1A4B6B1Cd8A1684C16EB86 |
| universalRouter       | 0xAAAE97a856198e484D149B57A9e5091b5E12E03f |


# dApp and Socials

Website (dApp) URL : <https://nile.build>

Twitter: <https://x.com/NileExchange>

Discord: <https://discord.gg/MUBCjkhpQ2>

Official Telegram: <https://t.me/NileExchange>


# NILE Media Kit

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

{% file src="/files/5fIoNauHgLQjlVcdTno0" %}

{% file src="/files/6SH8BnqCxbH9pQXu0dWo" %}

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

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

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

{% file src="/files/2nCgApa6qwJfU9oVRIQ5" %}

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

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

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

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

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

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

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

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

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


# Bridging To Linea

How you can bridge over to Linea

<figure><img src="/files/7T8O12N4JfCKMEQLGz4T" alt=""><figcaption></figcaption></figure>

Linea, as a Layer 2 Rollup, has a native bridge from Ethereum that can be used to get tokens to the network. You can find the Mainnet bridge at: <https://bridge.linea.build/>

You can also bridge using the metamask wallet native bridge at: <https://portfolio.metamask.io/bridge>


# Fixed Solidly Vulnerabilities

Our team possesses a distinctive skill set and in-depth understanding of the original Solidly system. We have extensive experience in identifying vulnerabilities, bugs, and other architectural issues within the system. Rest assured, all known issues present in previous iterations of The Solidly Exchange have been addressed and resolved.

In the unlikely event that any vulnerabilities or issues are identified, our team is fully prepared to address them promptly and effectively, leveraging our expertise in the field. We prioritize the security and stability of the system, ensuring that any potential risks are handled with utmost diligence.


# Why Proxy Contracts?

**Reason for Proxy Contracts**

* Solidly (ve(3,3) codebase) is a volatile and complex primitive. The list of vulnerabilities that exist in other implementations both on Arbitrum and other chains is long and unfortunately, not addressable because of the initial immutability.
* As noticed, we have a TimeLock that prevents us from upgrading anything without going through the scheduler. (Aside from good security and safe business practice for users, this is also an obvious requirement for many partners (including Beefy Finance) to ensure pools they create for their users are not endangered due to NILE's upgrades).
* For transparency, our Discord has OpenZepplin's defender/sentinel activated so it sends a report to the channel anytime the Time Lock is engaged.
* With respect to the existing vulnerabilities mentioned [Fixed Solidly Vulnerabilities](/security-and-legal-considerations/fixed-solidly-vulnerabilities), we have shared these with other partners and helped them remediate some of those still resident in their models, but, nevertheless, as security experts— our team constantly is looking for ways to ensure that users funds are SAFE and never at any contract risk. Our information security and trad-fi fintech backgrounds, combined with our years spent in DeFi are core to our team’s admittedly nuanced and obsessive approach to security. We’re proud of that.
* Since everything is behind a proxy Time Lock, there is no way for us to maliciously do anything without it being verifiably on chain for multiple hours before it can be executed. Users can use Forta, OpenZepplin's defender, or other tools to ensure they are properly notified, even if they aren't looking at our Discord notifications.
* We are extremely comfortable with moving towards an immutable model over time, but it is bad practice for Solidly implementations to make the same mistake that was made in the original Fantom Solidly. Andre Cronje had made the project immutable from day 1 and all the vulnerabilities found, that were project breaking, were unable to be remediated, thus decimating the project and putting the user's funds at risk. We deeply care about our users and the last thing we want to experience is a situation where their funds are at risk.
* We have a reputation in the space and are more than happy to do whatever it takes to ensure the ecosystem is comfortable with our decisions.

Core to our team is the motto (taken from Naval Ravikant):

**`“Play long-term games with long-term people.”`**

That is our intention and excitement participating here on Linea. We’re in this for the long-term and look forward to building a strong relationship of mutual trust and support.&#x20;


# Contract Timelock

In order to instill further confidence during the early stages of the project, we are implementing a timelock mechanism for all necessary proxies. The inclusion of a timelock offers several benefits, as it prevents the proposer from executing any transaction to upgrade or modify the contracts until the designated timelock period has elapsed. This mechanism enhances security and provides reassurance to the users and protocols utilizing the NILE platform.

To ensure transparency and community awareness, any proposed calls to the timelock will be openly shared with the community. This allows for proper notification of any changes prior to their implementation. We utilize the OpenZeppelin Defender platform (<https://www.openzeppelin.com/defender>) to automate notifications within our Discord community.

The NILE team is committed to regularly providing updates and information to the community. This includes sharing insights into future upgrades, code changes, and upcoming feature implementations. We strive to maintain open communication and keep our community well-informed about the project's development and progress.


# Inherited Security

The Solidly codebase underwent a partial security audit on January 30, 2022, specifically focusing on the AMM component. The audit was conducted by PeckShield, and the full audit report can be downloaded from the Solidly GitHub repository at: <https://github.com/solidlyexchange/solidly/blob/master/audits/e456a816-3802-4384-894c-825a4177245a.pdf>

Furthermore, the inherited codebase used by Velodrome Finance underwent a comprehensive security audit and peer review as part of the Code4rena bug bounty contest. Details of the audit can be found at: <https://code4rena.com/reports/2022-05-velodrome/>. Additionally, a thorough MythX deep scan was performed on the Velodrome contracts.

Velodrome Finance conducted a bug bounty contest from May 23rd to 30th, 2022, on Code4rena (<https://code4rena.com/contests/2022-05-velodrome-finance-contest>). The contest aimed to cover all the new changes to both the new and original contracts, with rewards of up to $75,000 available.

Solidly launched its bug bounty program in February 2022 on Immunefi.com. To date, no claims have been made for the offered $200,000 rewards. Details of the bug bounty program can be found on their GitHub page: (<https://github.com/solidlyexchange/solidly/blob/master/SECURITY.md>).

The NILE team has been instrumental in the development and enhancement of this protocol since its inception over a year ago. We have contributed significantly to various improvements and have deep knowledge of the codebase, making us one of the most knowledgeable teams operating in this space. [Fixed Solidly Vulnerabilities](/security-and-legal-considerations/fixed-solidly-vulnerabilities)

While audits can sometimes be seen as primarily serving marketing purposes, we emphasize that our protocol offers both reputable brand name audits and a track record of over a year without any exploits. Additionally, our team possesses an exceptional understanding of the codebase, providing a strong foundation for security and reliability.


# Formal Audits

{% hint style="warning" %}
NILE is an authorized fork of RAMSES, thus inherits the same security
{% endhint %}

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

**RAMSES CL has commissioned a thorough security audit by yAudit** (Yearn Academy's auditing arm) to formally verify the secure stature of our V2 codebase and the BUSL protected contracts. yAudit has a stellar track record and is a coalition made up of very talented and proven experts within the DeFi landscape.\
\
The formal audit report can be found at: <https://reports.yaudit.dev/reports/06-2023-RAMSES/>

{% hint style="success" %}
The NILE codebase is professionally audited
{% endhint %}


# Risks and Legal Disclosures

In addition to contract-specific risks, it is important for users to be aware of the risks associated with the NILE platform as a whole. We strongly advise all users to thoroughly review the documentation and risk explanations provided before engaging with the platform.

It is important to note that NILE does not regulate, control, or make any promises regarding the monetary value of the NILE token. The value of the NILE token can fluctuate based on various factors, and there are no guarantees of returns or specific benefits associated with holding or using the token. Users should be aware that NILE does not create an investment contract or any obligation for users to participate based on expected returns or benefits.

We emphasize the importance of conducting your own research, understanding the risks involved, and making informed decisions when using the NILE platform. Users should carefully assess their risk tolerance and consider all potential outcomes before engaging with the platform.


