# Nabla Finance

Nabla Finance is a novel yield protocol that generates sustainable organic yield for liquidity providers (LPs) through its underlying hyper-efficient Nabla Automated Market Maker (AMM).\
\
The Nabla AMM is offering its liquidity on most chains exclusively to bots and autonomous agents, which allows for certain optimisations in the pricing algorithm. The Nabla AMM tech is optimised to profitably offer deep liquidity for crypto, certain real world assets (e.g. stables/forex, treasuries, commodities) and yielding assets (e.g. LST and LRT). Its innovative architecture almost entirely avoids impermanent loss (IL), whilst offering the highest possible capital efficiency. This enables much higher risk-adjusted returns for LPs, and lower swap costs for the bots that use this liquidity. \
\
Key features of Nabla AMM include:

* **Intelligent pricing**\
  The swap ratios are calculated based on our HFT pricing engine, and additional onchain slippage curves for the involved assets, which depend on the current pool imbalances and the historic volatility of the respective asset.  This almost entirely avoids Impermanent Loss, and allows for the highest possible capital concentration around the current oracle price.
* **Separation of Asset provision from Risk-taking**\
  Liquidity providers can either deposit into the low-risk single-sided Swap Pools, or into a dedicated risk-taking Backstop Pool. The Backstop Pools may achieve higher ROIs over long time periods, but they cover the residual IL risk, and all other remaining risks in the system - and can thus fluctuate significantly i.e. on short time scales.
* **Low-risk single-sided Swap Pools**\
  Liquidity Providers in the Swap Pools are not exposed to IL or other market making risks (which are covered by the Backstop Pool). These pools therefore have a risk profile closer to lending protocols than to classic AMM pools. Furthermore Nabla works without a pairing asset, which as well reduces the required capital to achieve a certain amount of swap liquidity. All this allows Nabla to attract deep swap liquidity at much lower costs.


# The problem Nabla solves

Classic passive AMMs like Uniswap or Curve are the backbone of DeFi, and optimal designs to trade assets that require onchain price finding (like longtail governance tokens, meme coins, etc.), or to trade likewise stables where no major price deviations are to be expected. But they are not optimized to trade assets where the price finding happens predominantly offchain (e.g. major cryptos, forex, most RWAs) or algorithmically (e.g. staked/yielding assets). \
Providers of liquidity for these tokens thus suffer from unnecessary Impermanent Loss and low capital efficiency. This makes LPing for those tokens in most cases unprofitable (i.e. when considering the opportunity costs), which in turn means that the respective token issuers have to pay for liquidity one way or another (either by providing liquidity themselves, by paying a professional market maker, by “bribing” AMM token holders to steer incentives to their pools, or by paying direct LP incentives). \
These high costs of liquidity are in most cases not sustainable and prohibit to attract deep swap liquidity - which in turn hinders the wide-spread usage of the the respective assets. \
Nabla is on a mission to change that, and to drastically lower the costs of liquidity, povide juicy yields for LPs on single-sided deposits, and reduce the costs for swaps.


# Benefits of using Nabla

Nabla has four main target user groups that profit from using Nabla’s innovations:

* **Liquidity Providers: Better Risk-Adjusted Returns**\
  Nabla's unique design reduces the risks and drastically improves the risk-adjusted returns for liquidity providers by avoiding impermanent loss, and by separating the roles of token provision and risk-taking. This allows low-risk capital to be put to use in the single-sided Swap Pools and profit from swap fees, whilst less risk-averse capital can profit from the high potential ROI in the cash-neutral Backstop Pool.
* **Traders: Lower Slippage** \
  The intelligent HFT pricing allows for maximal capital efficiency (comparable to liquidity on Univ3 which would get rebalanced each block). This, combined with the low-risk single-sided liquidity provision, allows Nabla to operate with significantly lower slippage and competitive fees compared to other AMM designs. This enables DEX aggregators and Solvers that have implemented the Nabla AMM to find better prices for their users.
* **Token Issuers: Drastically Reduced Liquidity Costs**\
  Token issuers can provide or attract deep liquidity for their tokens at much lower costs compared to other AMMs. This is thanks to the single-sided Swap Pools (which reduce the liquidity requirements by 50%), the extreme liquidity concentration (which further drastically reduces the capital needs), and the much higher risk-adjusted organic LP earnings (which reduces the need for additional incentives).
* **Arbitrageurs: Frictionless and Risk-free Arbitrage**\
  The lion share of swap volumes on classic passive AMMs like Uniswap or Curve comes from arbitrage transactions, which are essential for these AMMs to keep token prices updated to the current “fair value” (which is for most tokens found on the big centralized exchanges like Binance and Coinbase). Due to its intelligent HFT pricing, Nabla does not need this kind of arbitrage to keep the prices updated. On the contrary, Nabla can be used as counterparty by arbitrageurs to update the prices on passive AMMs - as Nabla instantly reflects changes in the current “fair token prices”, and offers deep liquidity with almost negligible slippage. The big advantage of using Nabla as counterparty instead of centralized exchanges is that arbitrage transaction can be set up atomically onchain, and thus risk-free for the arbitrageur (the arbitrage transaction on the passive AMM and the counter-trade on Nabla are bundled together - and either both go through, or none) - which is a significant edge over the classic AMM-CEX arbitrage, which can’t be set up atomically, and thus always comes with friction and some residual risks.<br>


# Protocol Overview

In contrast to most other AMMs, Nabla uses single-sided Liquidity Pools (Swap Pools), which work without a pairing asset. These pools are complemented by a Backstop Pool, which covers all the risks in the system\*

Swaps happen directly between the two involved Swap Pools, and have an effect on the “Imbalances” in the system, which in turn influences the quoted token prices. The Backstop Pool is not involved in swaps. Its sole task is to cover the claims of the Swap Pool LPs by allowing them to withdraw assets from the Backstop Pool in case the respective Swap Pools are depleted.

*\*In the future we plan to have more than one “Pool Hubs” to separate the risks of different asset classes into different Backstop Pools. These Hubs (which may contain up to 20 Swap Pools each) will ofc need a shared pairing asset to allow swaps between different ensembles.*


# Swap Algorithm

### Slippage Curves derived from Scalar Potentials&#x20;

Bots swap an amount into a source pool (trade-in) which increases that pool’s balance and then this amount is converted into an amount of the target pool where it is deducted from the balance and credited to the trader (trade-out).

The trade-in and trade-out are executed atomically and the swap rate is based on a quote from our HFT pricing engine, modulated with a function of the states of both involved pools. Swaps furthermore incur a fee which is credited to liquidity providers as a reward (split between the involved trade-out Swap Pool, the Backstop Pool, and the Protocol).&#x20;

The swap activity and withdrawals from liquidity providers can bring a pool into an unfavourable state. If a pool’s balance for example approaches zero while its liabilities (= initial deposits) remain substantial, then meaningful swapping (out) will not be possible anymore, and liquidity providers will not be able to withdraw their funds directly from that pool (but have to fall back to the [“insurance withdrawal” function ](/protocol-overview/liquidity-pools/swap-pools)instead). In a healthy market, the pools should therefore always tend to revert back to a balanced state.

We therefore introduce the concept of potential energy from physics to liquidity pools in order to incentivize traders, arbitrageurs and liquidity providers to contribute to keeping pools healthy. The basic idea is that any action that moves a pool away from a balanced state results in a dynamic slippage that accumulates as a potential. Bringing the pool closer to a balanced state results in the opposite: a dynamic reward that reduces the potential. The idea is analogous to potential energy in other settings, for example the gravitational potential where moving an object away from a large mass requires work to be done while that energy is released when moving the object back to its original location.

Mathematically, we introduce a scalar potential and require all operations on a pool to fulfil certain constraints that keep the pool’s potential consistent with its state. With the potential approach we can prove several desirable mathematical properties with direct benefits for the AMM. For example, operations can be split, merged, and reordered without changing the result - regardless of the exact properties of the scalar potential. That implies fair and predictable behaviour for liquidity providers and traders on the one hand, and that the AMM cannot be exploited through such strategies on the other hand.

This approach thus enables Nabla to support arbitrary scalar potentials (as long as they fulfil a few basic requirements), and thus allows to tailor them to the respective asset’s volatility characteristics.&#x20;

### [Order Routing](#order-routing)

Nabla uses **single-sided liquidity pools** to facilitate all swap orders. These **swaps are routed directly** between two swap pools through the Nabla Router, for the two relevant assets involved in the transaction.

**Multihop swaps** are possible between "pool hubs." A **pool hub** is a combination of a Router, a Backstop Pool, and Swap Pools. If an asset is not available in one pool ensemble but is available in another, the swap is performed using a shared intermediary asset. This means that the asset being swapped out from the initial pool hub is exchanged into a common intermediary asset through the Nabla Portal, and then swapped again into the desired asset in the target pool hub.

This process allows for greater flexibility and liquidity across Nabla, enabling bots to trade between multiple assets even if they are not directly paired within the same pool hub.

### [Swap Fee](/protocol-overview/swap-algorithm)

There is a flat fee on each swap (depending on the chain and asset typicalls between 4 and 10 basis points), which is deducted from the pay-out asset. The collected fee is being split between the swap-out pool LPs, the backstop pool and the protocol. \
\
The current fee split ([Nabla Mainnet Alpha](/mainnet-alpha)) is as follows:\
\- 40% is accruing to the swap-out pool LPs\
\- 60% is accruing to the backstop pool\
\- 0% is accruing to the protocol (the DAO can decide to set this to a non-zero value)

All swap fee parameters can be adapted for each pool individually via governance vote.


# Liquidity Pools

Nabla works with two different types of liquidity pools, with a different purpose and risk profile:\
\- Swap Pools for each tradable asset provide the required token liquidity - the risk profile for LPs is low risk / medium rewards\
\- The Backstop Pool takes on all market making risks, and thus backs the liquidity in the Swap Pools. Providing liquidity to the Backstop pool has a medium risk / high reward risk profile


# Swap Pools

Swap Pools provide token liquidity for swaps.

Providing liquidity to a Swap Pool is to a certain extend comparable to giving an earmarked (and thus self-overcollaterialized) loan to the Backstop Pool, which is doing market making on leverage with the Swap Pool liquidity (and the Backstop Pool liquidity as additional collateral). The Backstop Pool guarantees that Swap Pool liquidity providers can withdraw their deposited amount after a 1 block cool-off period (flashloan protection) at any time (not necessarily in the provided token, though)

Upon withdrawal from a Swap Pool with coverage ratio below 100%, the Swap Pool liquidity provider can choose to either withdraw their deposits in the provided token, accepting a small loss due to applied slippage - or to choose an "insurance withdrawal" through the backstop pool instead. In the latter case, the liquidity provider receive $USDC (or any surplus tokens of his choice) from the backstop pool at the nominal value of their current LP position, according to the oracle prices, minus a fixed "insurance fee" b (for most assets between 0.1% and 0.4%).


# Backstop Pool

Aka "Market Making Pool"

Despite not being directly involved in Swaps, the Backstop Pool plays a central role in the design of the Nabla AMM, as it covers the Swap Pools’ major risks. While the Swap Pool liability tokens represent the right to withdraw a certain share of the pools liabilities, the Backstop Pool LP tokens represents a share of the total backstop liquidity, which is defined as the sum of $USDC from the Backstop Pool, all surplus assets of Swap Pools with coverage ratio >= 1, minus all shortfalls in pools with coverage ratio < 1.&#x20;

The Backstop Pool accepts deposits only in $USDC, but withdrawals can be done in either $USDC or any assets on which Swap Pools have a coverage ratio above one (in the latter case with a small bonus due to positive slippage). All users that choose an asset other than $USDC contribute to the rebalancing of the Backstop Pool towards a healthier pool state.&#x20;

Backstop Pool Liquidity Providers take on the full market making risk on Nabla on leverage. Due to the intelligent HFT pricing, the losses and profits from these market making activities should in the long run (almost) equal out. Small instances of remaining directional losses (= corresponding to "remaining IL") may only occur whenever the delta between the current price engine quote and the current "fair price" occasionally exceeds the swap fee f. \
\
Providing liquidity to the Backstop Pool, therefore, comes close to a cash-neutral strategy, yet it earns a significant share of all swap fees and token incentives. To ensure the system's solvency at all times and give the protocol time to react to large withdrawals, Backstop Pool LPs cannot withdraw their funds instantly but have to wait 30 days after withdrawal initiation before finalizing their withdrawal.


# HFT pricing engine

Nabla's HFT pricing engine plays a crucial role in ensuring the accurate pricing of assets within the Nabla protocol. It provides low latency real-time data on all listed tokens, allowing users and the protocol to make informed decisions based on the latest market information. \
\
In this section, we'll discuss the importance of the HFT pricing engine for Nabla


# Architecture

Nabla is employing a powerful proprietary HFT pricing engine, and additionally uses external price feeds from decentralized oracles for constant sanity checks.\
Price feeds are integrated through Oracle Adapters, which conform to a standardised interface, and thus ensure seamless interoperability within the Nabla protocol. These adapters are responsible for registering the price feeds of the tokens traded on the platform and fetching the necessary price data to facilitate protocol operations.

The following Oracle Adapters are currently available for Nabla:

* Nabla's HFT pricing engine\
  This is our main pricing source, which is generated with the lowest possible latency from a combination of CEX orderbook data and geographical considerations. Providing the fairest possible prices with the lowest possible latency is fundamental for a healthy protocol and profitable Backstop Pools.
* [**Pyth**](/protocol-overview/hft-pricing-engine/pyth) **Adapter**\
  This adapter provides reliable and up-to-date price information for various assets using Pyth Network price feeds. It includes all the functionalities you need to register, unregister and update price feeds, and it ensures accurate price information by requiring periodic updates to the price feeds. The Pyth price feeds are being used to sanity-check the HFT pricing engine feeds, and automatically pause trading in case of major price deviations.
* [**Chainlink**](/protocol-overview/hft-pricing-engine/chainlink) **Adapter (coming soon)**\
  The Chainlink Adapter will extend the protocol's capability by integrating Chainlink's decentralised oracle network. This will provide additional options for sourcing price data, enhancing the robustness and reliability of the price feed mechanism within Nabla.


# Nabla's HFT pricing engine

The proprietary HFT pricing engine plays a central role for Nabla, as accurate pricing is a precondition for a healthy and profitable protocol. Any time lag or price imprecision could lead to arbitrage bots taking profits at the cost of the respective backstop pool. So it's crucial to our mission to ever improve our HFT pricing engine.\
In the current v1.0, we're combining order book data from leading Centralized Exchanges with chain-specific geographical considerations. In the future we plan to digest even more relevant data, e.g. volatility  metrics - whilst further optimizing the already superlow latency.


# Pyth

[Pyth](https://pyth.network/) is the first external oracle integrated into Nabla, adding an additional security layer to our protocol for on-chain asset pricing. Leveraging Pyth's decentralized network of validators, our smart contracts seamlessly interact with the oracle to source real-time, high-fidelity market data. This integration enhances the accuracy and reliability of on-chain asset pricing, safeguarding the Backstop Pools from potential losses due to HFT pricing engine failures and mitigating market risks.&#x20;

Pythnet Price Feeds are integrated with over 12 blockchains and function as a pull oracle. Unlike push oracles, [pull oracles](https://docs.pyth.network/price-feeds/pull-updates) update on-chain prices only when requested.


# Redstone

[RedStone](https://www.redstone.finance/) is a Modular Oracle that delivers frequently updated, reliable, and diverse data feeds, including yield-bearing assets like LSTs, LRTs, Bitcoin LSTs and yield-accruing stablecoins.

Nabla integrated RedStone price feeds as our primary source of data for assets; we leverage RedStone oracles for main pools across all chains that support Redstone Bolt.


# Chainlink

coming soon..


# EV:GO (not in use anymore)

Excessive Volatility Guard Oracle

In order to mitigate toxic order flow generated by unavoidable lags in price propagation we’ve built a novel, ultra fast on-chain oracle to complete the used external price oracles in the early days of Nabla. It was able to signal potentially dangerous price movements before the actual price reaches the chain. Due to our novel inhouse HFT pricing engine, we don't need the additional EV:GO protection anymore.


# Roadmap

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


# Protocol-owned Liquidity (POL)

Nabla is designed to over time own a growing share of the liquidity in all its pools, with an initial focus on the Backstop Pool. This Protocol-owned Liquidity (POL) will not only reduce the costs of operations for the protocol (as a lower share of swap fees and $NABLA incentives have to be paid to external LPs), but as well serve as a growing liability reserve which will stay in the pools forever\*. Such a liability reserve in all pools, but i.e. in the Backstop Pool, will over time further reduce the risks for other LPs.\
\
*\*unless the DAO decides otherwise*


# Trading Fees and LP Incentives

Nabla charges a certain percentage for each swap as a trading fee, which is deducted during a trade in the trade-out asset. A certain share of these swap fees are being kept as protocol fees, of which a share p will be used to grow the POL in the respective Backstop Pool.


# Nabla as an autonomous protocol

The POL turns the protocol from a pure service provider for third-party LPs into a vertically integrated end-to-end product. This design allows Nabla to become increasingly independent from external LPs, and thus develop over time into a fully autonomous protocol.


# Security

Security is a core priority in the Nabla Protocol. We have put significant effort into the design, testing, and audits to ensure it remains reliable and safe for our users.

\
If you discover any vulnerability or bug within the protocol, please contact us via

$$
<security@nabla.fi>
$$


# Risks and Mitigation


# Audits

Nabla has gone through several audits, including&#x20;

* Omniscia,&#x20;
* [Auditbase](https://www.auditbase.com),&#x20;
* and private security expert code reviews.&#x20;

The final audit was carried out by [Pashov Audit Group](https://www.pashov.net). Here is the [audit report](https://github.com/pashov/audits/blob/master/team/pdf/Nabla-security-review.pdf).


# Bug Bounty Program

coming soon..


# Mainnet Alpha

Nabla Finance is live on&#x20;

* Arbitrum One,
* Base and
* Berachain.

You can see our stats on [Defillama](https://defillama.com/protocol/nabla-finance?volume=true).&#x20;

\
We also have analytics for Arbitrum and Base on Dune:

* Arbitrum Analytics: <https://dune.com/nablafinance/arbitrum-analytics>
* Base Analytics: <https://dune.com/nablafinance/base-analytics><br>


# Risks and Benefits of being a Mainnet Alpha LP

## Risks Disclaimer

Nabla’s Smart Contracts have been rigorously tested, reviewed, and audited. Yet they introduce a completely novel approach that is not yet battle-tested. Therefore, there is a non-negligible risk that the Smart Contracts may not be safe, and exploits or economic attacks cannot be fully ruled out. Please be aware that your deposited funds are at risk, and you might, worst case, lose your entire deposits. Therefore, never deposit more than you can afford to lose.\
In general, the Backstop Pool carries a higher risk than the Swap Pools.

## Backstop Pool LPs

### Risks:

* In early Mainnet Alpha, there is a **30-day delay period** for Backstop Pool withdrawal requests. After the delay period passes, there is a 14-day Claim Period during which you can withdraw your funds. This delay period serves the initial system stability and will be reduced to a shorter delay period (most likely 14 days) once the Mainnet Alpha phase has concluded.
* The Backstop Pool, by design, takes on all risks in the system, most notably:
  * **Inventory Risks:** Imbalances in the system (= under- and/or overfull Swap Pools) lead to inventory risk if the price of an asset that is in shortage (or surplus) changes. This results in a direct profit or loss to the Backstop Pool. This risk is significant yet non-directional (“cash-neutral”).
  * **Residual Impermanent Loss:** Whilst our oracle-informed pricing is expected to almost entirely avoid Impermanent Loss (IL), there can be instances of residual directional IL, i.e. in cases of high price volatility, which would accrue as losses to the Backstop Pool.
  * **Oracle Risks:** Nabla’s pricing algorithm depends on external oracles to derive fair prices. In case of oracle failures or manipulation, this might lead to losses to the Backstop Pool. We have several security measures in place (and more on our roadmap) to mitigate this risk, but we cannot rule it out entirely.
  * **Smart Contract Risks:** By design, the Backstop Pool covers all system losses, including potential losses due to bugs or economic exploits.

### Benefits:

* The Backstop Pool earns a share of all swap fees during the Mainnet Alpha phase, leading to a higher organic APR than the Swap Pool average.
* Backstop Pool deposits earn  $AMBER points as explained  [here](/amber-tokenized-points-program/mainnet-alpha-rewards)

## Swap Pool LPs

In contrast to the BSP, Swap Pool (SP) deposits are, in theory, protected on Nabla. However, as Nabla is still in an experimental stage, this protection can’t be taken as guaranteed, as we cannot fully rule out the risk of critical smart contract bugs or catastrophic black swan events.

### Risks:

As long as Nabla works as intended, the risks of LPing in a Swap Pool (apart from the risks concerning the deposited asset itself) are very limited and boil down to:

* Unfavorable slippage during withdrawal: If the Swap Pool you want to withdraw from is out of balance, you’ll incur a slippage. While this slippage is minimal for overfull pools, due to the flatter shape of our slippage curve in this area, it may get substantial if you want to withdraw almost all (or even more than there is) remaining liquidity from an underful pool. In this case, you can redeem USDC from the backstop pool instead - which only comes with a minor fixed “security fee.”
* In the very unlikely edge case of a completely emptied/worthless Backstop Pool, the Swap Pool deposits would no longer be protected. During normal operations, several security mechanisms are in place to prevent this scenario (although not all of them are already live during the Mainnet Alpha phase). But in case of a catastrophic event (e.g., a devastating economic exploit), there is a residual possibility for such a scenario to happen. In this hypothetical case, Swap Pool LPs would not be able anymore to redeem through the Backstop Pool and would have to accept the incurring slippage when withdrawing (which could, in theory, be up to 100% in case of a completely empty pool).&#x20;

### Benefits:

* Swap Pool deposits are always and instantly withdrawable
* Protected by the Backstop Pool
* Swap Pools earn a share of all swap fees (accrues in the pool whose balance gets reduced in a swap)
* The **first stage** of the Mainnet Alpha rewards is described [here](/amber-tokenized-points-program/mainnet-alpha-rewards) for the swap pools.&#x20;


# Monad Testnet

You can find more information on Nabla's  Monad Testnet deployment below. \
\
[Add Monad Testnet to Metamask](/monad-testnet/add-monad-testnet-to-metamask)

[Contract addresses for Monad Testnet](/developers/contract-addresses/monad-testnet)

[Get Monad test tokens](/monad-testnet/get-monad-test-tokens)

[Monad Testnet Tasks](/monad-testnet/monad-testnet-tasks)


# Add Monad Testnet to Metamask

Follow this quick guide to add Monad Testnet to your MetaMask wallet.

1. Open MetaMask

![open metamask](https://docs.monad.xyz/assets/images/1-c389b43e3fbfe59a04e542b667ab3951.png)

2. Click on the "Add a Custom Network" button.

![add custom network](https://docs.monad.xyz/assets/images/2-382bd0e588d492ebc1a611290dcf9219.png)

3. Add the Network name, add a RPC URL by clicking the "Add RPC URL" button.

![add network name](https://docs.monad.xyz/assets/images/3-31a8111dd3265d48656f0e51efa96431.png)

4. Enter the RPC details.

```
https://testnet-rpc.monad.xyz
```

![add rpc details](https://docs.monad.xyz/assets/images/4-85bc88099e3cd3d478e6e42372620f5e.png)

5. Enter the Chain ID, Currency Symbol, add the Block Explorer URL by clicking the "Add a block explorer URL" button.

![add chain id explorer](https://docs.monad.xyz/assets/images/5-e927cfc8d274f4100717a03b7462e739.png)

6. Enter the Block Explorer URL

```
https://testnet.monadexplorer.com
```

<img src="https://docs.monad.xyz/assets/images/6-34bd6eee485e6acbabb20f6be074da61.png" alt="add block explorer" height="1556" width="1920">

7. Finally you can click on the "Save" button.

<img src="https://docs.monad.xyz/assets/images/7-4b84ef08f590f88e49712f7ef540f61d.png" alt="save" height="1556" width="1920">

8. You should see a success message.

<img src="https://docs.monad.xyz/assets/images/8-4c8d4fcff7c21581d2230d8a23aae889.png" alt="monad testnet sucess message" height="1556" width="1920">

9. You can now see and use the Monad Testnet network in your MetaMask wallet.

<img src="https://docs.monad.xyz/assets/images/9-91662a00701b521c71caac60cdab00f8.png" alt="monad testnet" height="1556" width="1920">

10. You should be able to see your Monad Testnet assets.

<img src="https://docs.monad.xyz/assets/images/10-76884e7384125b73be05f56a8148842d.png" alt="monad testnet assets" height="1556" width="1920">

The next step is to get MON tokens from the Monad Testnet Faucet.


# Get Monad Test Tokens

You can get test tokens from Nabla's Discord server, the "Monad-Faucet" channel.

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

You will receive one of the test tokens, either WBTC, WETH, USDT or USDC.&#x20;


# Monad Testnet Tasks

You can do the following tasks to test the Nabla Finance app on Monad Testnet fully.&#x20;

### Add liquidity to the pools

{% embed url="<https://www.loom.com/share/02799f34fed0446a947f4504332abdd0?sid=24242fc6-7f9c-4abe-b4d6-3f5ca6011961>" %}

### Withdraw liquidity from the pools

{% embed url="<https://www.loom.com/share/a2a11c9c762e4d8396f8da65b111a4fc?sid=9cb7acdc-a115-4228-9078-e65c152016fb>" %}

### Swap tokens

{% embed url="<https://www.loom.com/share/c64ff249fdaf46bd8d87b120ecf9a986?sid=39decb9a-72e5-4904-9166-4986c457b28b>" %}

### Redeem Swap Pool shares via the Backstop Pool

> You can redeem shares from the Backstop Pool only for the pools with more liabilities than the reserves. This is a unique future for Nabla Finance that protects LPs.

{% embed url="<https://www.loom.com/share/f3f52e42f73d4829875aae144f7295b9?sid=3f61238f-eba5-4fcb-827a-5c9d54ec0aea>" %}


# Nabla Testnets


# Testnet Beta

Testnet Beta will be conducted on three chains, starting with Base Sepolia. Users must complete some test tasks and, depending on the tasks completed, earn up to 1000 $AMBER points.&#x20;

600 wallets per chain will be allowed to participate in the testnet. Read the official post here:&#x20;

<https://paragraph.xyz/@nablafi/testnet-beta-launch>


# Connect  Wallet to Base Sepolia

### Compatible Wallets

Any EVM-based wallet is suitable for using Nabla. Here are some of the wallets you can use:&#x20;

* [**MetaMask**](https://metamask.io/)
* [**Coinbase Wallet**](https://www.coinbase.com/wallet)
* [**Brave Wallet**](https://brave.com/wallet/)
* [**Frame**](https://frame.sh/)

### Connecting to Nabla on Base Sepolia Testnet

To access the testnet, select **Base Sepolia** in your wallet's available networks.

### Adding Base Sepolia Testnet Manually

To add the network manually, click the drop-down in the top-left corner of your MetaMask wallet.

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

Select **Add Network** in the pop-up.

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

Select **Add a network manually** in the following screen.

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

Enter these credentials into the network configuration details :

| Key                    | Value                                                                                          |
| ---------------------- | ---------------------------------------------------------------------------------------------- |
| **Network Name**       | Base Sepolia                                                                                   |
| **New RPC URL**        | <https://sepolia.base.org>                                                                     |
| **Chain ID**           | 84532                                                                                          |
| **Currency Symbol**    | ETH                                                                                            |
| **Block explorer URL** | <p><a href="https://sepolia-explorer.base.org"><https://sepolia-explorer.base.org></a><br></p> |

After entering the data as above, click **save**.

After saving the network configuration, you can switch to Base Sepolia.

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


# Testnet Beta Tasks

3 categories of tasks can be performed by  Testnet Beta participants:&#x20;

### 1. Swaps

You can complete swaps between several pools. In the testnet alpha, we provide 8 assets. Since Nabla pools are single-sided, you can trade any combination of assets.&#x20;

* Swap Task 1: Do at least one [swap](/nabla-testnets/testnet-beta/performing-a-swap) between assets ( *100 $AMBER points*)

### 2. Liquidity Provisioning

An AMM without LPs is unimaginable. Please provide liquidity in:

1. Swap Pools: Nabla offers low-risk LPing thanks to its novel pool architecture. Provide liquidity to the pools using your test tokens.
   * LP Task: [Add liquidity](/nabla-testnets/testnet-beta/managing-swap-pool-liquidity#depositing-into-the-swap-pool) to at least one swap pool ( *100 $AMBER points*)
2. Backstop Pool (BSP): The swap pool market-making risks (inventory risk and other risks) are confined to the backstop pool.&#x20;
   * BSP LP Task: Provide [liquidity to BSP](/nabla-testnets/testnet-beta/managing-backstop-pool-liquidity#depositing-into-the-backstop-pool) to secure the liquidity of the protocol. ( *200 $AMBER points*)

### 3. Liquidity Withdrawal

As an LP you can withdraw liquidity anytime, and Nabla offers several options to withdraw liquidity

1. Withdraw your asset from the swap pool: LPs can provide liquidity and withdraw liquidity as in any AMM. You'll get your share of the pool assets depending on the pool coverage.&#x20;
   * Task: [Withdraw](/nabla-testnets/testnet-beta/managing-swap-pool-liquidity#withdrawing-from-the-swap-pool) liquidity from a swap pool ( *100 $AMBER points)*<br>
2. Withdraw assets from the backstop pool: Nabla's innovation allows both BSP LPs and swap pool LPs to withdraw tokens from BSP.&#x20;
   1. BSP pool LPs can withdraw their assets from the BSP. This is the default option.
      * Task:[ Withdraw](/nabla-testnets/testnet-beta/managing-backstop-pool-liquidity#withdrawing-from-the-backstop-pool) liquidity from the BSP. ( *150 $AMBER points)*<br>
   2. Swap pool LPs can withdraw from the BSP: If a swap pool  is not 100% full the LP has the option to withdraw liquidity from the backstop pool in the BSP asset (currently USDC)&#x20;
      * Task: [Redeem the swap pool’s](/nabla-testnets/testnet-beta/redeem-swap-pool-shares-via-backstop-pool) LP shares via the Backstop pool(BSP). ( *200 $AMBER points)*<br>
   3. BSP LPs can withdraw assets from any swap pool if that pool has more assets compared to its liabilities (Coverage ratio >100%)
      * Task: Withdraw Backstop Pool Liquidity via [Excess Swap Pool](/nabla-testnets/testnet-beta/withdraw-backstop-pool-liquidity-via-excess-swap-pool) ( *150 $AMBER points)*

### Your feedback is appreciated!

If you encounter any bugs or have questions, please use the "Feedback" link on the right-hand side of the page.

We appreciate all the feedback you can give to help us build a better product. To provide more detailed feedback, please use [this form](https://tally.so/r/mRzrkP).&#x20;


# Obtaining Base Sepolia Ether for Gas

To use the Nabla Testnet Beta on Base Sepolia, users must pay gas fees in Base Sepolia ETH.\
Most faucets allow users to claim Base Sepolia ETH every 24 hours.

We've curated two faucets. PoW Faucet does not require you to sign up and is recommended. The second one requires you to hold some ETH and sign up.&#x20;

1. Base Sepolia PoW Faucet: <https://www.ethereum-ecosystem.com/faucets/base-sepolia>
2. Alchemy's Base Sepolia Faucet: <https://www.alchemy.com/faucets/base-sepolia> ( This faucet requires you to hold 0.001 ETH on Mainnet)


# Test Assets

Please find the full list of test assets [here.](/developers/contract-addresses/nabla-testnet-beta-contracts/base-sepolia)


# Connect  Wallet to Base Sepolia Testnet

### Compatible Wallets

Any EVM-based wallet is suitable for using Nabla. Here are some of the wallets you can use:&#x20;

* [**MetaMask**](https://metamask.io/)
* [**Coinbase Wallet**](https://www.coinbase.com/wallet)
* [**Brave Wallet**](https://brave.com/wallet/)
* [**Frame**](https://frame.sh/)

### Connecting to Nabla on Base Sepolia Testnet

Wallets usually connect to Ethereum by default. To access the testnet, select **Base Sepolia** in your wallet's available networks.

### Adding Base Sepolia Testnet Manually

To add the network manually, click the drop-down in the top-left corner of your MetaMask wallet.

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

Select **Add Network** in the pop-up.

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

Select **Add a network manually** in the following screen.

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

Enter these credentials into the network configuration details :

| Key                    | Value                                                |
| ---------------------- | ---------------------------------------------------- |
| **Network Name**       | Base Sepolia                                         |
| **New RPC URL**        | <https://base-sepolia.blockpi.network/v1/rpc/public> |
| **Chain ID**           | 84532                                                |
| **Currency Symbol**    | SepoliaETH                                           |
| **Block explorer URL** | <https://sepolia.basescan.org/>                      |

After entering the data as above, click **save**.

After saving the network configuration, you should get automatically connected to Base Sepolia.

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


# Performing a Swap

1 - Go to the Swap page[ **here**](https://app.nabla.fi/swap)**.**

2 - Connect your wallet by selecting the **Connect wallet** option.

3 - Your wallet will prompt you to connect to Base Sepolia automatically. If not, connect to the Base Sepolia Testnet via these Instructions [**here**](/nabla-testnets/testnet-beta/connect-wallet-to-base-sepolia).&#x20;

4 - Select the asset you want to trade from the dropdown menu in the upper section. Your balance is shown after selecting an asset in the dropdown menu.

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

5 -  Select the asset you want to trade to in the lower section as above.

6 - A wallet pop-up with transaction details will appear. First you need to grant Nabla permission to spend your assets. Click **Next** and then **Approve** to enable spending USDC.

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

7 - After checking the transaction details, click the **Swap** button. Your wallet will ask you to confirm the action.

8 - That's it! A popup will inform you of the success or failure of your transaction.

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


# Managing Swap Pool Liquidity

Learn more about Swap Pools [**here**](https://docs.nabla.fi/liquidity-pools/swap-pools)**.**

1 - Go to the Swap Pool page [**here.**](https://app.nabla.fi/swap)

2 - Connect your wallet by selecting the option in the top right corner.

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

3 - Select **Manage** next to the asset you wish to add or withdraw from the Swap Pool.

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

## Depositing into the Swap Pool

1 - Select **Add Liquidity.**

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

2 -  A wallet pop-up with transaction details will appear. First, you need to grant Nabla permission to spend your assets. Click **Next** and then **Approve** to enable spending USDC.

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

3 - After approving Nabla to spend your USDC, click **Deposit.**

A wallet pop-up with transaction details will appear.  Click **Confirm** to complete the deposit.

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

## Withdrawing from the Swap Pool

1 -  Select **Manage** next to the asset you wish to withdraw from the Swap Pool.

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

&#x20;2 - Enter the amount you want to withdraw from the Swap Pool.

A wallet pop-up with transaction details will appear.  Click **Confirm** to complete the withdrawal.

<figure><img src="/files/9lBLJ7wqEOHmt3EGqRPw" alt=""><figcaption></figcaption></figure>


# Redeem Swap Pool Shares via Backstop Pool

Depending on the Swap Pool weightage of assets, you may be unable to withdraw the asset you provided to the Swap Pool fully.\
\
If that happens, you may withdraw what is owed to you from the Backstop Pool.\
Regardless of available liquidity in the swap pool, withdrawing via the Backstop Pool is always an option.

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

Rates may differ when withdrawing via either the Swap Pool or the Backstop Pool.\
It is recommended to compare rates between the pools before withdrawing to yield best results.\
\
In the example below, redeeming via the Backstop Pool is the more feasible option.

<table data-full-width="false"><thead><tr><th>Withdrawing from Swap Pool</th><th>Redeeming from Backstop Pool</th></tr></thead><tbody><tr><td><img src="/files/R90VVh4nz90I9vaLSF0X" alt="" data-size="original"></td><td><img src="/files/dejsJ40N47hisnmTWTeN" alt="" data-size="original"></td></tr></tbody></table>


# Managing Backstop Pool Liquidity

Learn more about the Backstop Pool [**here**](https://docs.nabla.fi/liquidity-pools/backstop-pool)**.**

1 - Go to the Backstop Pool page[ ](https://nabla-app.vercel.app/backstop-pools)[**here.**](https://app.nabla.fi/backstop-pools)

2 - Connect your wallet by selecting the option in the top right corner.

3 - Select **Manage**.

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

4 - Select **Add Liquidity** or **Withdraw** to provide USDC to the Backstop Pool.&#x20;

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

## Depositing into the Backstop Pool

Deposit to the Backstop Pool(BSP) is subject to a time lock (*Delay Period*). For the Testnet Beta, the delay period is set to 3 hours. Please check [#withdrawing-from-the-backstop-pool](#withdrawing-from-the-backstop-pool "mention")to learn more.&#x20;

1 - Select **Add Liquidity.**

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

2 - Enter the amount of USDC you want to convert to nabUSDC by depositing it into the BSP.

A wallet pop-up with transaction details will appear. First, you need to grant Nabla permission to spend your assets. Click **Next** and then **Approve** to enable spending USDC.

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

3 - After approving Nabla to spend your USDC, click **Deposit.**

A wallet pop-up with transaction details will appear.  Click **Confirm** to complete the deposit.

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

## Withdrawing from the Backstop Pool

Firstly, you need to "Initiate withdrawal" and wait until the time lock (*Delay Period*) expires. For the Testnet Beta on Arbitrum, the *Delay Period* is set to 3 hours.&#x20;

1 - Select **Withdraw.**

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

&#x20;2 - Enter the amount of USDC you want to withdraw from the BSP and click **Initiate Withdrawal**.&#x20;

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

Once you initiate withdrawal, the *Delay Period* starts.  Please note that you can only have one pending withdrawal. If you initiate a new withdrawal during the Claim Period, your withdrawal request is overwritten, and time lock restarts.&#x20;

After the timelock expires, the withdrawal enters the *Claim Period*.  You can finalize withdrawal from the BSP anytime during the *Claim Period* which runs for 72 hours.&#x20;

If you fail to finalize the withdrawal within the claim period, you need to initiate a new withdrawal.

3 - Finalize the Withdrawal

During the claim Period, your pending withdrawals will show as in the image below.

Click **Withdraw** and confirm the prompt in your wallet.

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

A popup in the bottom right corner will confirm the success of your transaction.


# Withdraw Backstop Pool Liquidity via Excess Swap Pool

Liquidity providers to the Backstop Pool are entitled to withdraw their nabUSDC from any Swap pool with excess liquidity.

Learn more about the Backstop Pool [**here**](https://docs.nabla.fi/liquidity-pools/backstop-pool)**.**

1 - Go to the Backstop Pool page[ ](https://nabla-app.vercel.app/backstop-pools)[**here.**](https://app.nabla.fi/backstop-pools)

2 - Connect your wallet by selecting the option in the top right corner.

3 - Select the backstop pool and click **Withdraw.**

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

4 - Enter the amount of USDC you want to withdraw from the BSP and click **Initiate Withdrawal**.&#x20;

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

Once you initiate withdrawal, the *Delay Period* starts.  Please note that you can only have one pending withdrawal. If you initiate a new withdrawal during the Claim Period, your withdrawal request is overwritten, and time lock restarts.&#x20;

After the timelock expires, the withdrawal enters the *Claim Period*.  You can finalize withdrawal from the BSP anytime during the *Claim Period* which runs for 72 hours.&#x20;

If you fail to finalize the withdrawal within the claim period, you need to initiate a new withdrawal.

5 - Your withdrawal will be processed in USDC by default.

To withdraw from the Backstop pool in another asset, select the dropdown menu marked with the red box.

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

6 - Your liquidity can be withdrawn from pools with excess liquidity.&#x20;

Only those pools will be displayed when choosing to withdraw in another wallet.

Select any asset from the list.

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

7 - Click **Withdraw**  to innitiate your **Pending Withdrawal** and click **Confirm** in the wallet prompt.

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

A popup in the bottom right corner will confirm the success of your transaction.


# Testnet Alpha

After months of hard work and several weeks of running internal testnet deployments, we are proud to start a new development phase that will enable our community's contribution. Incentivized Testnet Alpha is running on Ethereum Sepolia.&#x20;

Testnet Alpha users will earn [$AMBER points](/amber-tokenized-points-program) for their contribution.

[Whitelisting for testnet](/nabla-testnets/testnet-alpha/whitelisting-for-testnet)

[Connect  Wallet to Sepolia Testnet](/nabla-testnets/testnet-alpha/connect-wallet-to-sepolia-testnet)

[Requesting Testnet Gas](/nabla-testnets/testnet-alpha/requesting-testnet-gas)

[How to contribute to testing](/nabla-testnets/testnet-alpha/how-to-contribute-to-testing)

[Performing a Swap](/nabla-testnets/testnet-alpha/performing-a-swap)

[Managing Swap Pool Liquidity](/nabla-testnets/testnet-alpha/managing-swap-pool-liquidity)

[Managing Backstop Pool Liquidity](/nabla-testnets/testnet-alpha/managing-backstop-pool-liquidity)

[Redeem Swap Pool Shares via Backstop Pool](/nabla-testnets/testnet-alpha/redeem-swap-pool-shares-via-backstop-pool)

[Withdraw  Backstop Pool Liquidity via Excess Swap Pool](/nabla-testnets/testnet-alpha/withdraw-backstop-pool-liquidity-via-excess-swap-pool)

###


# Testnet Alpha Results

{% embed url="<https://paragraph.xyz/@nablafi/testnet-alpha-results>" %}

Testnet tasks details: <https://docs.google.com/spreadsheets/d/1l6FVO67xqYICk_l_Eeb0Ac0dvUKH-8nbwyu0zKDj6t8/edit?usp=sharing>

Testnet results summary: <https://nablafi.notion.site/Incentivized-Testnet-Alpha-Results-7c5c7a5047ef464087260dcb983bc096>

Feedback bounty results: <https://nablafi.notion.site/a7aef57759644193bab6fa62fa9886b3?v=b030c800147342419e7a6c26c0773166>


# Whitelisting for testnet

Alpha testnet deployment is technically permissionless however, the tester will need to hold "test tokens" to be able to "test" the product. There is a whitelisting process and several ways testers can obtain those test tokens. You need to complete the step 1 OR step 2 below:

1. Any member of the Nabla community can apply to be whitelisted (to receive test tokens) by completing social quests ([Galxe](https://galxe.com/NablaFinance/), etc. ). This is a guaranteed method for whitelisting.  OR
2. You can apply as a "test user" by filling out [this form](https://tally.so/r/wadKZq) as well (not a guaranteed method) :
   * If your wallet is holding assets or Defi positions worth more than  $5000  or,&#x20;
   * If you have a referral code. <br>

**Important**

* The above criteria are indicative and might not guarantee approval of your application.
* You can receive test tokens from other test users, but as an anti-sybil measure, we don't allocate $AMBER points to users who are not whitelisted for Testnet Alpha.


# Whitelist Campaigns List

Participants of the below campaigns have met the testnet participation requirement: \
(✅: Ongoing , ☑️: Ended )

☑️ Any past campaigns on Nabla's  [Galxe](https://galxe.com/DHPTGZBw6Cd6rQLBqDjtBf?hideFooter\&id=37709) space.&#x20;

✅450,000 $AMBER - Incentivized Testnet Alpha - Week 3 WL on [Galxe](https://galxe.com/NablaFinance/campaign/GCXWrtweNk)

✅1,000,000 $AMBER for $PYTH Stakers on [Galxe](https://galxe.com/NablaFinance/campaign/GCp6stwUyb)&#x20;

☑️ 450,000 $AMBER - Incentivized Testnet Alpha - Week 2 WL on [Galxe ](https://galxe.com/DHPTGZBw6Cd6rQLBqDjtBf/campaign/GCQr1tw2da)

☑️"Celebrating Humanode <> Nabla partnership: Win 50,000 $AMBER and many more!" on Humande's [Galxe](https://galxe.com/Humanode/campaign/GCKhUtwFrh) space

&#x20;☑️"125,000 $AMBER & 2,500 limited Nabla Finance CAP NFT! FCFS!" on [TaskOn.xyz](https://taskon.xyz/campaign/detail/31477)


# $PYTH Stakers Whitelist

**$PYTH Staker Whitelist:** [Click here](https://docs.google.com/spreadsheets/d/1eLaJ1OKYvuOqn_HMM__jOBqd8_cwfpA_6cVSDKQJzwg/edit?usp=sharing) to open the Google Sheet

The spreadsheet contains three sheets that correspond to 2 snapshots:

1. Feb 8th snapshot of stakers 250 or more $PYTH
2. Feb 14th snapshot  of stakers 10 to 500 $PYTH
3. Feb 14th snapshot of stakers 500 or more $PYTH

Wallet addresses are not complete for privacy purposes. To confirm your eligibility, you should search your EVM wallet's first 8 characters (including 0x) in the corresponding sheets.


# Connect  Wallet to Sepolia Testnet

### Compatible Wallets

Any EVM-based wallet is suitable for using Nabla. Here are some of the wallets you can use:&#x20;

* [**MetaMask**](https://metamask.io/)
* [**Coinbase Wallet**](https://www.coinbase.com/wallet)
* [**Brave Wallet**](https://brave.com/wallet/)
* [**Frame**](https://frame.sh/)

### Connecting to Nabla on Ethereum Sepolia Testnet

Wallets usually connect to Ethereum by default. To access the testnet, select **Sepolia** in your wallet's available networks.

### Adding Ethereum Sepolia Testnet Manually

To add the network manually, click the drop-down in the top-left corner of your MetaMask wallet.

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

Select **Add Network** in the pop-up.

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

Select **Add a network manually** in the following screen.

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

Enter these credentials into the network configuration details :

| Key                    | Value                                                                                |
| ---------------------- | ------------------------------------------------------------------------------------ |
| **Network Name**       | Ethereum Sepolia                                                                     |
| **New RPC URL**        | <https://rpc.sepolia.org>                                                            |
| **Chain ID**           | 11155111                                                                             |
| **Currency Symbol**    | SepoliaETH                                                                           |
| **Block explorer URL** | <p><a href="https://sepolia.etherscan.io"><https://sepolia.etherscan.io></a><br></p> |

After entering the data as above, click **save**.

After saving the network configuration, you should get automatically connected to Ethereum Sepolia.

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


# Requesting Testnet Gas

To use the Nabla Testnet on Ethereum Sepolia, users are required to pay gas fees in SepoliaETH.\
Most faucets allow users to claim SepoliaETH every 24 hours.\
One claim suffices to obtain enough gas to test all Nabla functions thoroughly.

We've curated two faucets that do not require sign-up.

Claim SepoliaETH via QuickNode [**here**](https://faucet.quicknode.com/ethereum/goerli).\
Claim SepoliaETH via Sepolia PoW Faucet [**here**](https://sepolia-faucet.pk910.de/).


# How to contribute to testing

3 categories of tasks can be performed by Alpha Testnet participants:&#x20;

### 1. Swaps

You can complete swaps between several pools.

Since Nabla pools are single-sided you can trade any combination of 6 assets (calculated as 15 pairs)&#x20;

* Swap Task 1: Do at least 3 [swaps](/nabla-testnets/testnet-alpha/performing-a-swap) between assets
* Swap Task 2: Swap into a swap pool [that is depleted](/nabla-testnets/testnet-alpha/how-to-swap-into-a-swap-pool-that-is-depleted) (*A SP where the Liabilities>Reserve*)

### 2. Liquidity Provisioning

An AMM without LPs is unimaginable. Please provide liquidity in:

1. Swap Pools: Nabla offers low-risk LPing thanks to its novel pool architecture. Provide liquidity to the pools using your test tokens.
   * LP Task: [Add liquidity](/nabla-testnets/testnet-alpha/managing-swap-pool-liquidity#depositing-into-the-swap-pool) to at least 3 swap pool
2. Backstop Pool (BSP): The swap pool market-making risks (inventory risk and other risks) are confined to the backstop pool.&#x20;
   * BSP LP Task: Provide [liquidity to BSP](/nabla-testnets/testnet-alpha/managing-backstop-pool-liquidity#depositing-into-the-backstop-pool) to secure the liquidity of the protocol.&#x20;

### 3. Liquidity Withdrawal

As an LP you can withdraw liquidity anytime, and Nabla offers several options to withdraw liquidity

1. Withdraw your asset from the swap pool: This is what any AMM enables. LPs can provide liquidity and withdraw liquidity. Depending on the pool coverage, you'll get your share of the pool assets.&#x20;
   * Task: [Withdraw](/nabla-testnets/testnet-alpha/managing-swap-pool-liquidity#withdrawing-from-the-swap-pool) liquidity from  swap pools.<br>
2. Withdraw assets from the backstop pool: The innovation of Nabla allows both BSP LPs and swap pool LPs to withdraw tokens from BSP.&#x20;
   1. BSP pool LPs can withdraw their assets from the BSP. This is the default option.
      * Task: [Withdraw](/nabla-testnets/testnet-alpha/managing-backstop-pool-liquidity#withdrawing-from-the-backstop-pool) liquidity from the BSP.<br>

   2. Swap pool LPs can withdraw from the BSP: If a swap pool  is not 100% full the LP has the option to withdraw liquidity from the backstop pool in the BSP asset (currently USDC)&#x20;

      * Task: [Redeem the swap pool’s](/nabla-testnets/testnet-alpha/redeem-swap-pool-shares-via-backstop-pool) LP shares via the Backstop pool(BSP).<br>

      > There is a 1000-block (4-5 hours)  lockup period for withdrawal from BSP after adding liquidity

   3. BSP LPs can withdraw assets from any swap pool if that pool has more assets compared to its liabilities (Coverage ratio >100%)
      * Task: Withdraw Backstop Pool Liquidity via [Excess Swap Pool](/nabla-testnets/testnet-alpha/withdraw-backstop-pool-liquidity-via-excess-swap-pool)

### Your feedback is appreciated!

If you encounter any bugs or for any questions, please use the "Feedback" link on the right-hand side of the page.

We appreciate all the feedback you can give to help us build a better product. To give more detailed feedback please use [this form](https://tally.so/r/31V6JO). You can use the "Feedback" button on the right side of the app for more general feedback.&#x20;


# Performing a Swap

1 - Go to the Swap page[ **here**](https://app.nabla.fi/swap)**.**

2 - Connect your wallet by selecting the **Connect wallet** option.

3 - Your wallet will prompt you to connect to Ethereum Sepolia automatically. If not, connect to the Ethereum Sepolia Testnet via these Instructions [**here**](https://docs.nabla.fi/incentivized-testnet-alpha/connect-wallet-to-sepolia-testnet).&#x20;

4 - Select the asset you want to trade from the dropdown menu in the upper section. Your balance is shown after selecting an asset in the dropdown menu.

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

5 -  Select the asset you want to trade to in the lower section as above.

6 - A wallet pop-up with transaction details will appear. First you need to grant Nabla permission to spend your assets. Click **Next** and then **Approve** to enable spending USDC.

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

7 - After checking the transaction details, click the **Swap** button. Your wallet will ask you to confirm the action.

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

8 - That's it! A popup will inform you of the success or failure of your transaction.


# Managing Swap Pool Liquidity

Learn more about Swap Pools [**here**](https://docs.nabla.fi/liquidity-pools/swap-pools)**.**

1 - Go to the Swap Pool page [**here.**](https://app.nabla.fi/swap)

2 - Connect your wallet by selecting the option in the top right corner.

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

3 - Select **Manage** next to the asset you wish to add or withdraw from the Swap Pool.

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

## Depositing into the Swap Pool

1 - Select **Add Liquidity.**

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

2 -  A wallet pop-up with transaction details will appear. First, you need to grant Nabla permission to spend your assets. Click **Next** and then **Approve** to enable spending USDC.

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

3 - After approving Nabla to spend your USDC, click **Deposit.**

A wallet pop-up with transaction details will appear.  Click **Confirm** to complete the deposit.

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

## Withdrawing from the Swap Pool

1 -  Select **Manage** next to the asset you wish to withdraw from the Swap Pool.

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

&#x20;2 - Enter the amount you want to withdraw from the Backstop Pool.

A wallet pop-up with transaction details will appear.  Click **Confirm** to complete the withdrawal.

<figure><img src="/files/9lBLJ7wqEOHmt3EGqRPw" alt=""><figcaption></figcaption></figure>


# How to swap into a swap pool that is depleted

Depleted pool means a pool has more liabilities then reserves.

Check pool liabilities and reserves on the [swap pools](https://app.nabla.fi/swap-pools) page.

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

## Pool Liabilities

\
Liabilities describe the amount of assets deposited by the LPs. The pool is liable since LPs are entitled to withdraw their assets any time.

## Pool Reserves

\
Reserves describe the amount of assets in the pool at a given time. <br>

## Balancing Pools

\
For example, if the USDC pool has 1M liabilities but 800k reserves, this means you need to "swap into" the USDC pool to balance it. \
\
You should [swap](https://app.nabla.fi/swap) USDC for any other asset. By swapping, you add USDC to the USDC pool reserve, while subtracting from the pool reserve of the asset you swap for.

\
LPing does not change the depletion because if you add more as an LP, the liabilities increase as the pool needs to pay back more tokens. &#x20;


# Managing Backstop Pool Liquidity

Learn more about the Backstop Pool [**here**](https://docs.nabla.fi/liquidity-pools/backstop-pool)**.**

1 - Go to the Backstop Pool page[ ](https://nabla-app.vercel.app/backstop-pools)[**here.**](https://app.nabla.fi/backstop-pools)

2 - Connect your wallet by selecting the option in the top right corner.

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

3 - Select **Manage** next to the USDC ticker.

4 - Select **Add Liquidity** or **Withdraw** to provide USDC to the Backstop Pool.&#x20;

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

## Depositing into the Backstop Pool

1 - Select **Add Liquidity.**

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

2 - Enter the amount of USDC you want to convert to nabUSDC by depositing into the Backstop Pool.

A wallet pop-up with transaction details will appear. First, you need to grant Nabla permission to spend your assets. Click **Next** and then **Approve** to enable spending USDC.

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

3 - After approving Nabla to spend your USDC, click **Deposit.**

A wallet pop-up with transaction details will appear.  Click **Confirm** to complete the deposit.

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

## Withdrawing from the Backstop Pool

1 - Select **Withdraw.**

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

&#x20;2 - Enter the amount of USDC you want to withdraw from the Backstop Pool.

A wallet pop-up with transaction details will appear.  Click **Confirm** to complete the withdrawal.

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


# Redeem Swap Pool Shares via Backstop Pool

Depending on the Swap Pool weightage of assets, you may be unable to withdraw the asset you provided to the Swap Pool fully.\
\
If that happens, you may withdraw what is owed to you from the Backstop Pool.\
Regardless of available liquidity in the swap pool, withdrawing via the Backstop Pool is always an option.

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

⚠️ Redeeming Swap Pool shares via the Backstop Pool has a timelock. (1000 blocks, approx: 5 hours)&#x20;

Rates may differ when withdrawing via either the Swap Pool or the Backstop Pool.\
It is recommended to compare rates between the pools before withdrawing to yield best results.\
\
In the example below, redeeming via the Backstop Pool is the more feasible option.

<table data-full-width="false"><thead><tr><th>Withdrawing from Swap Pool</th><th>Redeeming from Backstop Pool</th></tr></thead><tbody><tr><td><img src="/files/R90VVh4nz90I9vaLSF0X" alt="" data-size="original"></td><td><img src="/files/dejsJ40N47hisnmTWTeN" alt="" data-size="original"></td></tr></tbody></table>


# Withdraw  Backstop Pool Liquidity via Excess Swap Pool

Liquidity providers to the Backstop Pool are entitled to withdraw their nabUSDC from any Swap pool with excess liquidity.

Swap pools <mark style="color:green;">**highlighted in green**</mark> are available for withdrawal.

Swap pools <mark style="color:red;">**highlighted in red**</mark> are momentarily unavailable for withdrawal.

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

Select any available asset and click **Confirm** in the wallet prompt.

<figure><img src="/files/9XcHsdIhPI33LJiIQRPi" alt=""><figcaption></figcaption></figure>


# Liquidity Provision

### Providing Liquidity at Launch

In the early phases, providing liquidity will be capped per pool. This is a security measure, and the cap will be increased over time.&#x20;

### Liquidity Rewards

Liquidity providers can earn rewards from up to four different sources:

* LPs accrue trading fees in pool tokens, as “organic” APR. This fee is subject to governance but will initially be set to 50% of the trading fee for the involved Swap Pool, and 30% for the associated Backstop Pool (see above)
* Eligible LPs earn a boost on their organic APR if they’re holding $sNABLA, as described above.
* Nabla incentivizes selected pools with $AMBER points rewards (users will have to stake their LP tokens to receive those rewards). Due to the limited number of pools and the liquidity cap during the launch period, the initial $AMBER distribution will be defined by the team. However, this will be handed over to governance over time, and $NABLA will be used for incentives instead of $AMBER. The distribution mechanism will consider different factors when rewarding pools, such as trading volume, organic APRs or pool liquidity.
* In addition to the above, the integrated incentive mechanism as well allows other protocols to incentivize “their” pools. They can incentivize liquidity to a pool by directly rewarding LPs with their native token or any token of their choice (e.g. USDC, ETH, points). These reward pools can be filled at any time, and 80% of those incentives will gradually be distributed to LPs, according to the share of staked LP tokens they hold (with the other 20% going to $NABLA stakers, see above).&#x20;

Both “external” token incentives and $AMBER rewards can be claimed at any point in time, whilst the swap fees auto-compound through increased LP tokens.&#x20;

### Removing liquidity

Liquidity can be removed at any point in time (cooldown periods apply for Backstop Pool liquidity)

<br>


# $NABLA

$NABLA token is issued on Base Chain.

```
$NABLA : 0x01ED85D73645523B0d62C7A8E35d03601CFd679b
```

The Nabla protocol uses the $NABLA token to align the interests of its different groups of users and contributors. $NABLA can be staked to participate in protocol [governance](/nablatoken/governance) and profit from several utility mechanisms.


# $sNABLA Token Utility

Staking $NABLA tokens unlocks certain rights and benefits.

### Protocol Governance (live)

First and foremost, $sNABLA conveys governance rights, granting control over key decisions. Nabla will decentralize progressively over time, increasing the control of token holders over the protocol. Initially, the protocol is launched with recommended parameters that can later be adjusted by governance.

### Pool Governance (planned for 2026)

Besides general protocol governance, stakers can also propose e.g. adding new pools, changing parameters, or allocating rewards to certain pools. This is particularly interesting for protocols that aim to bootstrap liquidity for their own tokens.

### Staking Rewards (live)

Stakers receive a 20% share of all LP incentives that are being allocated to Swap Pools, e.g. by the respective token issuers. This also applies to the $AMBER rewards allocated by the Nabla protocol itself. The reward share for each staker is based on his voting power.

### LP APR Bonus (planned for 2026)

Nabla stakers also profit from supercharged APRs for their deposits in any Swap Pool. 20% of all swap fees are being shared as “bonus rewards” between all eligible LP positions in the respective pool. Nabla stakers can profit from this bonus in each pool up to a total LP share corresponding to their voting power share.

\
**Example:** A Nablan holds 1% of the total $sNABLA voting power, and the pools contain US$2 m worth of BTC and $1m worth of ETH. In this case, Nablan can profit from this APR bonus on up to $20k worth of BTC deposits and $10k worth of ETH deposits.

<br>


# Staking Mechanism

### &#x20;Staking $NABLA

Staked $NABLA ($sNABLA) allows users to submit proposals and vote on key decisions regarding the protocol’s strategic direction, main parameters, and reward distribution. It furthermore allows to profit from several reward mechanisms.

### Boost and Voting Power

To incentivize loyal users, stakers accrue a boost over time, which increases their voting power. The longer they stake their $NABLA tokens, the higher that boost (linear, up to 2x after one year of staking). The voting power is calculated as the product of $sNABLA and the accrued boost.

### Unstake & Cooldown Period

Token holders can choose to unstake at any time without a cost, but need to wait for a cooldown period of 2 weeks before the tokens can be withdrawn from the staking contract. If $NABLA tokens are unstaked, the accumulated boost for those tokens will be forfeited. Furthermore, the tokens don’t profit anymore from the utility of staked tokens during the cooldown period.

<br>


# Fee Distribution

Nabla generates fees based on liquidity usage, levying a fee on every swap. These are currently split in the following way (details depend on the chain and the respective Swap Pool):\
\- 20-30% go to the LPs of the respective Swap Pool\
\- 40-80% go to the LPs of the associated Backstop Pool\
\- 0-30% are being deducted as protocol fees\
\
The deducted protocol fees may be used e.g. to:

* buy back $NABLA to increase the treasury holdings
* buy back $NABLA and use it to increase the liquidity in the $NABLA-$ETH pool
* buy back $NABLA and distribute it amongst stakers
* deposit protocol-owned liquidity into the Backstop Pools
* finance gas and infrastructure costs and further protocol development<br>


# Tokenomics

<figure><img src="/files/12epsHnxz3Y7dX94cGYO" alt=""><figcaption></figcaption></figure>


# Token Utility Summary

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


# Governance

### Overview

Nabla aims to become a permissionless, decentralized, and trustless protocol. To steer the protocol and its strategic direction, Nabla aims to build a DAO consisting of key contributors, partner protocols, investors, users, and community members. They can express their opinion through various governance channels (Forum, Discord, TG) and vote with $sNABLA tokens.

The DAO will gradually receive more responsibilities and essentially be responsible for the following areas:

* Adjust protocol parameters (e.g. fee percentage, fee split, token incentives)
* [Adding new pool hubs/pools\*](#user-content-fn-1)[^1] and removing pools
* Setting and adjusting slippage parameters and pool caps
* Treasury expenditures (e.g. grants, contributor rewards, marketing activities)
* New strategic initiatives (e.g. new chain deployment, partnerships)

The above list is not exhaustive. However, Nabla aims to become as trustless as possible. This requires the impact of governance on the core protocol to be as minimal as possible and the use of automation where possible. Thus, reliance on human interaction is reduced, and security is simultaneously increased by eliminating any attack vectors.

<br>

[^1]: Given Nabla’s unique design, setting up new pools comes with specific requirements for the underlying asset and its oracles. Hence, adding pools is initially not permissionless. Over time, however, the DAO should also be able to cover this via on-chain governance.


# Initial Governance Implementation

All relevant protocol parameters and the fee split are set by default at launch. A governance council manages the treasury via a Safe multi-sig (3-of-5 with signers from the core team and investors).

A governance council will operate another multi-sig to implement changes to the protocol. Token holders will be able to propose changes to the protocol by submitting NIPs (Nabla Improvement Proposals). Each NIP needs to pass a discussion period in the forum and reach some social consensus before it gets submitted to a vote by a DAO representative. A NIP then needs to pass a Snapshot vote and reach a certain quorum (initially set to 1%) for the team and the DAO to implement the changes. Voting power depends on the amount of $sNABLA and the boost. Voting can be delegated to other $sNABLA holders.

The governance council retains veto rights for proposals for about 1 year after launch before the protocol is fully controlled by the DAO.

<br>


# Governance structure

### Roles and responsabilties

The Nabla governance will have the following roles and responsibilities :

* **Nablans:** They can participate in discussions, make proposals, and vote on Snapshot.
* **Nabla Guardians**: A small group of trusted community members who contribute to the Nabla ecosystem.&#x20;
* **Proposal Champions**: Members who propose and advocate for specific proposals. They are responsible for drafting the proposal, leading discussions, and addressing feedback.
* **Technical Committee**: A group of individuals with expertise in the project's technical aspects. They review and provide feedback on technical proposals, ensuring they align with the project's long-term vision.

Here is the link to the [code of conduct](https://docs.nabla.fi/protocol-owned-liquidity-pol/governance/code-of-conduct).


# Discussion and Proposal process

**Forum and Discord Tags**

The Nabla community will use a combination of dedicated Forum posts and Discord tags to facilitate governance discussions:

* **General Governance**: For general discussions related to DAO governance, members can use the tag `#general-governance` on Discord and create or contribute to threads in the "Governance" category on the Forum.
* **Proposal Drafting**: For collaborating on drafting proposals, members can use the tag `#proposal-drafting` on Discord and create or contribute to threads in the "Proposal Drafting" category on the Forum.
* **Proposal Discussion**: For discussing specific proposals and providing feedback, members can use the tag `#proposal-discussion` on Discord and create or contribute to threads in the "Proposal Discussion" category on the Forum.
* **Technical Discussion**: For discussing technical aspects of proposals with the Technical Committee, members can use the tag `#technical-discussion` on Discord and create or contribute to threads in the "Technical Discussion" category on the Forum.
* **Voting Announcements**: For announcing Snapshot votes and sharing the corresponding links, members can use the tag `#voting-announcements` on Discord and create or contribute to threads in the "Voting Announcements" category on the Forum.

**Proposal Stages**

1. **Idea Discussion**: Members can share and discuss ideas in the "Governance" category on the Forum and use the `#general-governance` tag on Discord. This stage is for brainstorming and gathering community feedback on potential proposals.
2. **Proposal Drafting**: If an idea gains enough support, a Proposal Champion will create a draft in the "Proposal Drafting" category on the Forum and use the `#proposal-drafting` tag on Discord. Members can provide feedback and collaborate on refining the proposal.
3. **Proposal Discussion**: Once the draft is complete, it will be moved to the "Proposal Discussion" category on the Forum and discussed using the `#proposal-discussion` tag on Discord. Here, the community will engage in a more in-depth discussion, and the Proposal Champion will address feedback and concerns.
4. **Technical Review**: If the proposal has a technical component, it will be reviewed by the Technical Committee in the "Technical Discussion" category on the Forum and discussed using the `#technical-discussion` tag on Discord. The committee will provide feedback and suggest changes to align the proposal with the project's vision.
5. **Finalization and Voting**: After addressing the feedback, the Proposal Champion will submit the final proposal for a vote on Snapshot. A link to the vote will be shared in the "Voting Announcements" category on the Forum and announced using the `#voting-announcements` tag on Discord. Voting will be open for a predetermined period (e.g., 72 hours).

<br>


# Voting process

1. **Voting Platform**: [Snapshot.org](http://Snapshot.org) will be used for voting. It enables token-weighted voting without requiring on-chain transactions, ensuring minimal gas costs for participants.
2. **Voting Duration**: A standard voting duration (e.g., 72 hours) will be set to give members enough time to review the final proposal and cast their votes.
3. **Quorum Requirements**: A minimum quorum (e.g., 20% of total token supply) must participate in the vote for the decision to be valid.
4. **Decision Threshold**: A proposal will be considered approved if it receives a majority (e.g., 50% + 1) of the votes cast.


# Transparency and record-keeping

All proposals, discussions, and votes will be available on Discord (or future platform of governance). This ensures traceability and allows new members to understand the historical context of decisions made by the DAO.

1. **Proposal Archive**: All proposals, both approved and rejected, will be archived but available in Discord.&#x20;
2. **Meeting Summaries**: When Nabla holds regular meetings (e.g., community calls, technical committee meetings), summaries and minutes will be documented and published in the public repository for transparency and reference.


# Code of conduct

The DAO Code of Conduct promotes a harmonious and productive community by emphasizing respect, openness, collaboration, innovation, and fairness, while clearly delineating unacceptable behaviors.

### DAO Code of Conduct

#### Our Commitment

In the interest of fostering an open and welcoming environment, we as members, contributors, and leaders pledge to make participation in our DAO and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

#### Standards of Behavior

**Respect**

* Treat all members with respect and dignity.
* Engage in constructive and respectful discussions. Avoid personal attacks, insults, or derogatory language.
* Acknowledge that we all have differing perspectives, which are critical to a diverse and dynamic community.
* Act with the best interests of the DAO and its broader community in mind.

**Openness**

* Welcome newcomers and encourage diverse voices and contributions.
* Approach every discussion and challenge with an open mind and a willingness to learn.

**Collaboration**

* Seek out opportunities to build and create together, recognizing each member's contributions.
* Offer help to fellow members and ask for help when needed—collaboration is central to our success.

**Innovation**

* Encourage members to explore new ideas and appreciate creative thinking.
* Innovate responsibly, with consideration for the privacy and security of others' data and the impact on the broader ecosystem.

**Fairness**

* Judge members by their actions and contributions, not personal criteria.
* Respect the inherent value of everyone's work and time.

#### Unacceptable Behavior

* Harassing, abusive, discriminatory, derogatory, or demeaning conduct.
* Harassment includes but is not limited to harmful verbal or written comments, deliberate intimidation, stalking, sustained disruption of discussions, inappropriate physical contact, and unwelcomed attention.
* Inappropriate use of sexual or violent imagery, activities, or other offensive content.

#### Reporting and Enforcement

* Moderators are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
* Members who violate the Code of Conduct may be subject to temporary or permanent bans from governance activities, at the discretion of moderators.
* If you are subjected to or witness unacceptable behavior, or have other concerns, please promptly contact a moderator or submit a report to \[insert reporting mechanism here].

We hold the right to amend or change this Code of Conduct at any time to ensure it continues to align with the core values and goals of our DAO.

#### Inspiration drawn from&#x20;

[ETHBerlin](https://github.com/ethberlin-hackathon/ETHBerlin-KnowledgeBase/blob/master/code-of-conduct.md)


# Amendments to the Governance Framework

As the DAO evolves, it may become necessary to amend or update the governance framework. Any changes to the framework must follow the standard proposal and voting process outlined in above sections. Proposed amendments must receive majority support from the community to be adopted.


# Template for a vote

To enable structured discussions around proposals, once suffitiently matured (and ready to be posted as a draft) proposal will take the following format :

Here's a simple example that you can use as a starting point:

* Title: \[Proposal Title]
* Proposal: \[Short Description of the Proposal]
* Snapshot Vote Link: \[Link to the Snapshot vote]
* Voting Duration: \[Start Date and Time] - \[End Date and Time] (\[Timezone])
* Context: \[Provide a brief background on why this proposal is being put forth, any relevant discussions, and the problem or opportunity it addresses]
* Detailed Description: \[Describe the proposal in detail, including specific changes or actions, rationale, and expected outcomes]
* Implementation Plan: \[Outline the steps for implementing the proposal, including timelines, resource allocation, and any dependencies]
* Benefits: \[List the potential benefits and positive impacts of the proposal for the DAO and the broader community]
* Risks and Considerations: \[Discuss potential risks, challenges, or negative consequences that may arise from implementing the proposal]
* Alternatives Considered: \[Describe any alternative solutions that were considered and why they were not selected]
* Additional Resources: \[Provide any relevant links, such as previous discussions, research, or supporting materials]
* Quorum Requirement: \[Percentage of total token supply required for the vote to be valid]
* Decision Threshold: \[Percentage of votes required for the proposal to pass]


# $AMBER Onchain Points Program

$AMBER / $AMBER2 is distributed as the on-chain community reward in the Nabla Finance ecosystem.<br>

Read about $AMBER in depth in the following article:

{% embed url="<https://paragraph.xyz/@nablafi/introducing-amber-tokenized-points-program>" %}

***

## Season 2 - $AMBER2  (live)

**Amber Tokenized Points Season 2** (ERC20) have been deployed on Base (chain id: 8453) and are bridged to Arbitrum One (chain id: 42161).

### Base

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x36b5d8b243fbede90d6b655f6471b66266cc9426
</code></pre></td></tr><tr><td>Name</td><td>Amber Tokenized Points Season 2</td></tr><tr><td>Symbol</td><td>AMBER2</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>

### Arbitrum One

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xfe9e30182b28a0eb36a222bd328f6a88e1c882a3
</code></pre></td></tr><tr><td>Name</td><td>Amber Tokenized Points Season 2</td></tr><tr><td>Symbol</td><td>AMBER2</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>

***

***

## Season 1 - $AMBER

**Amber Tokenized Points** (ERC20) have been deployed on Base (chain id: 8453).

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x5872841A3207DC145Ce0348A334178CC9eE188aE
</code></pre></td></tr><tr><td>Name</td><td>Amber Tokenized Points</td></tr><tr><td>Symbol</td><td>AMBER</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>


# Mainnet Alpha Rewards

Liquidity providers earn $AMBER2 points  by staking their LP tokens on "LP staking" page

Below pages describe $AMBER and $AMBER2 emissions for Mainnet Alpha in detail:

{% content-ref url="/pages/3uIKVdXzNIrsWnAL2HSc" %}
[Arbitrum-Mainnet Alpha Rewards](/amber-tokenized-points-program/mainnet-alpha-rewards/arbitrum-points)
{% endcontent-ref %}

{% content-ref url="/pages/1AZzBuBEJ8hGGjC2PvwQ" %}
[Base-Mainnet Alpha Rewards](/amber-tokenized-points-program/mainnet-alpha-rewards/base-points)
{% endcontent-ref %}


# Arbitrum-Mainnet Alpha Rewards

During the Mainnet Alpha, the $AMBER reward allocation is as follows. Please note that LPs need to stake their LP token in order to earn $AMBER

### The Swap Pools

The swap pools were launched on Aug-13-2024 10:00:00 PM UTC (1723586400).&#x20;

Caps and rewards for the pools are **currently** as follows:

<table><thead><tr><th>Swap Pool asset</th><th width="293">Daily $AMBER point emmission</th><th>Pool cap</th></tr></thead><tbody><tr><td>USDC</td><td>2,500</td><td>30,000</td></tr><tr><td>WETH</td><td>14,000</td><td>75</td></tr><tr><td>WBTC</td><td>14,000</td><td>2.5</td></tr><tr><td>ARB</td><td>0</td><td>0</td></tr></tbody></table>

**Update 7:** Effective June-5-2025 00:00 UTC ARB pool LP staking emission has been stopped, and the pool  became inactive.

**Update 6:** Effective May-1-2025 12:00 PM UTC WETH, WBTC, and ARB LP staking rewards are set to 14,000, 14,000, and 2,500 $AMBER2, respectively.&#x20;

**Update 5:** Effective Dec-13-2024 01:00 PM UTC (1734094800), USDC, WETH, WBTC, and ARB pool caps are updated as 30k, 75, 2.5, and 60k, respectively. There are no changes in point emissions.&#x20;

**Update 4:** Effective Nov-20-2024 09:30 AM UTC (1732095000), the **WETH** pool cap is **50**, the **USDC** pool cap is **20,000**, and the **WBTC** pool cap is **1.5**. \
**USDC** pool point emission is not changed. **WBTC** and **WETH** pools daily $AMBER emission are 15,000.&#x20;

**Update 3**: Effective Oct-31-2024 12:30 PM UTC, the USDC pool cap will be increased to 15,000, WETH to 25, WBTC to 0.69, and ARB to 50,000. There are no changes in point emission.&#x20;

**Update 2:** Effective Sep-11-2024 00:00:00 AM UTC (1726012800), the **USDT** pool has been deprecated, and its $AMBER emission has stopped. Also, the USDC pool cap has dropped to 12,500, and the daily point emission has dropped to **2500 $AMBER**.

**Update 1:** Effective Aug-23-2024 11:09:10 AM UTC (1724411350), the **WETH** pool cap increased to **20 WETH**, and the daily **$AMBER** emission increased to **12,000** points. <br>

&#x20;Launch day point emissions were defined as follows:

<table><thead><tr><th>Swap Pool asset</th><th width="293">Daily $AMBER point emmission</th><th>Pool cap</th></tr></thead><tbody><tr><td>USDC</td><td>5,000</td><td>25,000</td></tr><tr><td>USDT</td><td>5,000</td><td>25,000</td></tr><tr><td>WETH</td><td>6,000</td><td>10</td></tr><tr><td>WBTC</td><td>7,000</td><td>0.42</td></tr><tr><td>ARB</td><td>7,000</td><td>40,000</td></tr></tbody></table>

### The Backstop Pool

The BSP was launched on Aug-09-2024 at 08:00:00 AM UTC (1723190400).&#x20;

The reward scheme for the Backstop pool is currently set as follows:

<table><thead><tr><th>Backstop Pool asset</th><th width="293">Daily $AMBER point emmission</th><th>Pool cap</th></tr></thead><tbody><tr><td>USDC</td><td>10,000</td><td>100,000</td></tr></tbody></table>

**Update 2:** Effective May-01-2025 12:00 PM UTC **BSP LP staking** emission is set to 10,000 $AMBER2

**Update 1:** Effective Dec-13-2024 13:00 UTC (1734094800), the pool cap of the BSP on Arbitrum is updated to 100k, and the daily point emission to 15k.&#x20;

The table below shows the cap and $AMBER emission of the BSP on the launch day.&#x20;

<table><thead><tr><th>Backstop Pool asset</th><th width="293">Daily $AMBER point emmission </th><th>Pool cap</th></tr></thead><tbody><tr><td>USDC</td><td>35,000</td><td>75,000</td></tr></tbody></table>


# Base-Mainnet Alpha Rewards

$AMBER points emissions on Base are as follows:

### The Swap Pools

The swap pools were launched on Nov-13-2024 15:00 UTC (1731510000).&#x20;

Caps and rewards for the pools are currently as follows:

<table><thead><tr><th>Swap Pool asset</th><th width="293">Daily $AMBER points emmission</th><th>Pool cap</th></tr></thead><tbody><tr><td>WETH</td><td>14,000</td><td>75</td></tr><tr><td>cbBTC</td><td>14,000</td><td>2.5</td></tr><tr><td>DEGEN</td><td>0</td><td>0</td></tr></tbody></table>

**Update 6:** Effective May-1-2025 12:00 PM UTC  WETH and cbBTC LP staking reward emission are set to 14,000.&#x20;

**Update 5:** Effective Jan-17-2025 12:00 UTC(1737104400), the **DEGEN** pool has been deprecated, and its point emissions ended.&#x20;

**Update 4:** Effective Dec-20-2024 12:00 UTC(1734696000), the pool cap of **WETH** and **cbBTC** are updated as **75** and **2.5**, respectively. Both of the pools emit **18,000 $AMBER** daily.&#x20;

**Update 3:** Effective Dec-13-2024 13:00 UTC(1734094800), the pool cap of **cbBTC** is updated to 2 without any changes to the point emission.&#x20;

**Update 2:** The **DEGEN** pool was added on Nov-28-2024 at 11:00:00 AM UTC. The pool emits &#x32;**,000 $AMBER** points daily. \
\
**Update 1: WETH and cbBTC pool caps are increased to 42 and 1.5, respectively, on Nov-25-2024 00:15:00 PM UTC (1732536900).** Both pools emit **14,000 $AMBER** points daily&#x20;

Swap pool emissions and caps are shown below for the launch day.

<table><thead><tr><th>Swap Pool asset</th><th width="293">Daily $AMBER point emission</th><th>Pool cap</th></tr></thead><tbody><tr><td>WETH</td><td>10,000</td><td>20</td></tr><tr><td>cbBTC</td><td>10,000</td><td>0.69</td></tr></tbody></table>

### The Backstop Pool

The BSP was launched on Nov-13-2024 03:00:00 PM UTC (1731510000).&#x20;

The reward scheme for the Backstop pool is currently set as follows:

<table><thead><tr><th>Backstop Pool asset</th><th width="293">Daily $AMBER point emission</th><th>Pool cap</th></tr></thead><tbody><tr><td>USDC</td><td>5,000</td><td>40,000</td></tr></tbody></table>

**Update 3:** Effective Dec-20-2024 12:00 UTC(1734696000), the pool cap of the BSP is 40,000.&#x20;

**Update 2:** Effective Dec-13-2024 13:00 UTC(1734094800), the pool cap of the BSP on Base is updated to 20,000, and the daily point emission to 5,000.&#x20;

**Update 1**: The Backstop pool cap is increased to 20,000 on Nov-25-2024 00:15:00 PM UTC (1732536900). The BSP emits 7,000 points daily.

The backstop pool emission and cap for launch day are shown below.

<table><thead><tr><th>Backstop Pool asset</th><th width="293">Daily $AMBER point emission</th><th>Pool cap</th></tr></thead><tbody><tr><td>USDC</td><td>5,000</td><td>10,000</td></tr></tbody></table>

### Meme Hub

&#x20;The point emissions for meme hub LP staking are currently as follows:

<table><thead><tr><th>Swap Pool asset</th><th width="293">Daily $AMBER point emission</th><th>Pool cap</th></tr></thead><tbody><tr><td>WETH</td><td>0</td><td>0</td></tr><tr><td>DEGEN</td><td>0</td><td>0</td></tr><tr><td>MOG</td><td>0</td><td>0</td></tr></tbody></table>

**Update 2:** Effective June-27-2025 12:00 PM UTC Meme Hub(All pools) has become inactive and its LP staking rewards stopped.&#x20;

**Update 1:** Effective May-1-2025 12:00 PM UTC  WETH, DEGEN and MOG LP staking rewards are set to 1000 $AMBER2.&#x20;

Meme hub launched on Jan-02-2025 12:00 UTC (1736251200) with below emissions.&#x20;

<table><thead><tr><th>Swap Pool asset</th><th width="293">Daily $AMBER point emission</th><th>Pool cap</th></tr></thead><tbody><tr><td>WETH</td><td>1,500</td><td>5</td></tr><tr><td>DEGEN</td><td>4,000</td><td>2 Million</td></tr><tr><td>MOG</td><td>4,000</td><td>10 Billion</td></tr></tbody></table>

<table><thead><tr><th>Backstop Pool asset</th><th width="293">Daily $AMBER point emission</th><th>Pool cap</th></tr></thead><tbody><tr><td>USDC</td><td>0</td><td>0</td></tr></tbody></table>


# $AMBER FAQ

Frequently asked questions about $AMBER .

### What is $AMBER?

$AMBER is named after the Amber element which can only be found on the Nabla planet. It is distributed as the on-chain community reward in the Nabla Finance ecosystem.&#x20;

### How can I get some $AMBER?

100% of $AMBER will be distributed to the community and never sold. The only way to get a hold of $AMBER is by active participation in the Nabla ecosystem. You can earn it by taking an active role in the Nabla community, completing quests, or using the product. Keep an eye on the Nabla Guardians program which is planned to launch in Q1 2024.

### Is $AMBER a transferable & tradeable token?

$AMBER is a permissionless & [transferable ](#user-content-fn-1)[^1]ERC-20 token. However, there are no plans to enable trading of $AMBER. We have no plans to launch a pool or do a CEX listing of $AMBER.&#x20;

### Is $AMBER a protocol token or a governance token?

No, it's not. Holding $AMBER won't earn you any trading fees or you won't be able to take part in protocol governance using $AMBER.&#x20;

### Does $AMBER have any financial value?&#x20;

Financially you should not have any expectations for holding $AMBER. That being said the amount of $AMBER you hold is a display of the contributions you have made to the Nabla Community.&#x20;

[^1]:


# Developers

## Overview

The Nabla Protocol is made up of a number of smart contracts. These include the Nabla core contracts, which include the fundamental AMM logic, as well as a combination of contracts forming a pool ensemble/pool hub and Nabla periphery contracts, which e.g. enable cross-pool swaps.

<figure><img src="/files/RixHkNzHzCHO8968t2pw" alt=""><figcaption><p>Nabla Protocol contracts overview</p></figcaption></figure>

### Nabla Portal

The NablaPortal contract is the main entry point for users to interact with the Nabla ecosystem. It facilitates token swaps through the [NablaRouter](/developers/contract-interfaces/nablarouter) contracts, supporting advanced features such as multi-hop swaps and optional interactions with native ETH.

User key functions include **swapExactTokensForTokens** (swap ERC20 tokens for other ERC20 tokens), **swapEthForExactTokens** & **swapExactTokensForEth** (swap from or to native ETH) and **quoteSwapExactTokensForTokens** (retrieve quotes for token swaps, providing estimates of the amount of tokens that can be swapped for a given amount of tokens).

{% content-ref url="/pages/knUQhOP8SgRAYpiKU7DT" %}
[NablaPortal](/developers/contract-interfaces/nablaportal)
{% endcontent-ref %}

### Nabla Router

The [NablaRouter](/developers/contract-interfaces/nablarouter) contract facilitates seamless token swaps and real-time price feed updates.

User key function include **swapExactTokensForTokens** and **getAmountOut**, which are used to swap tokens and get a quote for a swap, respectively.

{% content-ref url="/pages/c9ynMJJ0YiUcKvR9FfMP" %}
[NablaRouter](/developers/contract-interfaces/nablarouter)
{% endcontent-ref %}

### Nabla Backstop Pool

The [NablaBackstopPool](/protocol-overview/liquidity-pools/backstop-pool) is a specialised contract and pool built on BackstopPoolCore. It allows users to deposit and withdraw liquidity from the backstop pool and redeem LP tokens from associated swap pools.&#x20;

The backstop pool serves as an insurance mechanism, mitigating risks across a set of swap pools it supports. If a swap pool has low reserves, liquidity providers can perform an insurance withdrawal. This involves burning their swap pool shares in exchange for backstop liquidity.&#x20;

The backstop pool owns all excess liquidity from its [swap pools](/developers/contract-interfaces/swappool). It also assumes liability for any liquidity shortfalls. In return for this risk, the pool earns a share of the swap fees.

{% content-ref url="/pages/vSxdKSyoTyboo6vh7hdc" %}
[NablaBackstopPool](/developers/contract-interfaces/nablabackstoppool)
{% endcontent-ref %}

### Swap Pool

The [SwapPool](/developers/contract-interfaces/swappool) contract facilitates token swaps and liquidity management with features like capped deposits, configurable swap fees, and safe redeem mechanisms. It integrates with the [NablaBackstopPool](/developers/contract-interfaces/nablabackstoppool) for risk coverage.

User key functions include **deposit** (swap tokens for pool shares), **withdraw** (redeem pool shares for tokens), **backstopBurn** (burn shares for underlying tokens), and **backstopDrain** (withdraw excess tokens).

{% content-ref url="/pages/mJNJBuFUoMyNc6E13MWH" %}
[SwapPool](/developers/contract-interfaces/swappool)
{% endcontent-ref %}


# Integration Guide (onchain quoting)

Two modes of integration are possible. **Onchain quoting** - described in this guide, and offchain state syncing and simulation. While the former is trivial to implement, the latter is better suited for Nabla's High Frequency Pricing engine and will result with greater volumes and revenues over time.

If you are new to Nabla, we recommend you start with the [Developer overview](https://docs.nabla.fi/developers) section first and explore our [Nabla Swap API](/developers/swap-api) for reference.

We will go through the steps to **discover pools** and **get an on-chain swap quote** and show you how to **execute a swap** via `NablaPortal` contract.\
\
(The integration guides for both modes are as well published on [Github](https://github.com/NablaFinance/integration-guide))

***

### 1. Pool Discovery

#### ABI

1. **Fetch available routers**\
   [`Portal.getRouters()`](https://docs.nabla.fi/developers/nablaportal#getrouters) → returns all supported routers.

   ```solidity
   function getRouters() external view returns (address[] memory routers)
   ```
2. **Get pools and assets of router**\
   `Portal.getRouterPools(router)` → returns assets and pools supported by that router.

   ```solidity
      function getRouterPools(address router) external view returns (address[] memory assets, address[] memory pools)
   ```

Note that currently (and in the forseeable future) we are deploying a single router only.

#### Ethers.js example

```typescript
import { ethers } from "ethers";

const portalAddress = process.env.PORTAL_ADDRESS;

const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);

const portalAbi = [
  "function getRouters() external view returns (address[])",
  "function getRouterPools(address router) external view returns (address[])"
];

const portal = new ethers.Contract(
  portalAddress,
  portalAbi,
  provider
);

async function discoverPools() {
  const routers = await portal.getRouters();
  console.log("Routers:", routers);

  const pools = await portal.getRouterPools(routers[0]);
  const [poolAddresses, assetAddresses] = pools;
  console.log("Pools and assets for router 0:");
  poolsAddresses.forEach((pool, i) => {
    console.log("Pool:", pool, "Asset:", assetAddresses[i])
  })

  return {router: routers[0], assets: assetAddresses};
}

discoverPools();
```

### 2. Quoting

#### ABI

```solidity
function quoteSwapExactTokensForTokens(
    uint256 _amountIn,
    address[] calldata _tokenPath,
    address[] calldata _routerPath
) external view returns (uint256 amountOut_)
```

`_amountIn`: input token amount

`_tokenPath`: ordered list of token addresses (swap path).

`_routerPath`: ordered list of routers

#### Ethers.js example

```typescript
const portalAddress = process.env.PORTAL_ADDRESS;

const portalQuoteAbi = [
  "function quoteSwapExactTokensForTokens(uint256 amountIn, address[] tokenPath, address[] routerPath) external view returns (uint256)"
];

const portal = new ethers.Contract(
  portalAddress,
  quoterAbi,
  provider
);

async function getQuote(assetA, assetB, router) {
  const quote = await portal.quoteSwapExactTokensForTokens(
    ethers.parseUnits("1.0", 18), 
    [assets[0], assets[1]],
    [router]
  );
  console.log("Quoted output:", quote.toString());
}
```

### 3. Swapping

#### ABI

```solidity
function swapExactTokensForTokens(
    uint256 _amountIn,
    uint256 _amountOutMin,
    address[] calldata _tokenPath,
    address[] calldata _routerPath,
    address _to,
    uint256 _deadline
) external returns (uint256 amountOut_)
```

#### Ethers.js example

```ts
const wallet = new ethers.Wallet(PRIVATE_KEY, provider);
const portalAddress = proces.env.PORTAL_ADDRESS;

const portalAbiSwap = [
  "function swapExactTokensForTokens(uint256,uint256,address[],address[],address,uint256,bytes[]) external returns (uint256)"
];

const portalWithSigner = new ethers.Contract(
  portalAddress,
  portalAbiSwap,
  wallet
);

async function doSwap(assetA, assetB, router, quotedOut) {
  const tx = await portalWithSigner.swapExactTokensForTokens(
    ethers.parseUnits("1.0", 18),     // amount in
    quotedOut * 9975n / 10000n,       // slippage tolerance (eg 0.25%)
    [assets[0], assets[1]],           // token path
    [router],                         // router path
    wallet.address,                   // recipient
    Math.floor(Date.now() / 1000) + 1, // deadline  
);
  console.log("Swap tx:", tx.hash);
}
```

### 4. Full flow example

```ts
import { ethers } from "ethers";

const RPC_URL = process.env.RPC_URL;
const PRIVATE_KEY = process.env.PRIVATE_KEY;

const provider = new ethers.JsonRpcProvider(RPC_URL);
const wallet = new ethers.Wallet(PRIVATE_KEY, provider);

// ---- ABIs ----
const portalAbi = [
  "function getRouters() external view returns (address[])",
  "function getRouterPools(address router) external view returns (address[])",
  "function quoteSwapExactTokensForTokens(uint256,uint256,address[],address[],address,uint256,bytes[]) external returns (uint256)"
  "function swapExactTokensForTokens(uint256,uint256,address[],address[],address,uint256,bytes[]) external returns (uint256)"
];

// ---- Contract addresses ----
const portalAddress = process.env.PORTAL_ADDRESS;


async function discoverPools() {
  const [router] = await portal.getRouters();

  const [poolAddresses, assets] = await portal.getRouterPools(routers[0]);

  return {router, assets};
}

async function main() {
  const portal = new ethers.Contract(PORTAL, portalAbi, wallet);

  // 1. Discover pools
  const {router, assets} = await discoverPools();

 
  // 2. Quote swap
  const amount = ethers.parseUnits("1", 18);

  const quotedOut = await portal.quoteSwapExactTokensForTokens(
    amount,
    [asset[0], asset[1]],
    [router]
  );
  console.log("Quoted output:", quotedOut.toString());

  // 3. Execute swap
  const minAmountOut = quotedOut * 9990n / 10000n; // 0.1 % slippage tolerance
  const tx = await portal.swapExactTokensForTokens(
    amount,
    minAmountOut,
    [asset[0], asset[1]],
    [router],
    wallet.address,
    Math.floor(Date.now() / 1000) + 1
  );
  console.log("Swap tx hash:", tx.hash);
}

main().catch(console.error);
```

***

## Done :relaxed:

Thanks for integrating with Nabla :raised\_hands: \
If you have questions, please do not hesitate to get in contact and ask in our Discord or Telegram.


# Integration Guide (offchain state syncing and simulation)

Two modes of integration are possible. Onchain quoting, and offchain state syncing and simulation. While the former is trivial to implement, the latter is better suited for Nabla's High Frequency Pricing engine and will result with higher volumes and revenues over time.

For the time being, please find our simulation-based integration guide on [Github](https://github.com/NablaFinance/integration-guide)\
\
If you are new to Nabla, we recommend you start with the [Developer overview](https://docs.nabla.fi/developers) section first and explore our [Nabla Swap API](/developers/swap-api) for reference.


# Old Integration Guide (deprecated)

Welcome to the Nabla integration guide.

If you are new to Nabla, we recommend you start with the [Developer overview](/developers) section first.

We will go through the steps to **get an on-chain swap quote** and show you how to **execute an ERC20-to-ERC20 swap** with Nabla. \
For this, we are going to call the following functions at the [NablaPortal ](/developers/contract-interfaces/nablaportal)contract as our entry point:

* quoteSwapExactTokensForTokens   and
* swapExactTokensForTokens<br>

***

## Let's begin

### 1. Retrieve price update data

Nabla is an oracle based DEX.

{% hint style="warning" %}
You need to submit **signed price update data** to Nabla contracts, for hubs either using **Pyth** or **Nabla Oracle** price feeds.
{% endhint %}

You can check what **price update data** is needed, either

* Pyth price update data   or
* Nabla price update data

for a pool ensemble/hub in the [deployed contracts section](/developers/contract-addresses) under "Router".

<details>

<summary>Pyth price update data</summary>

#### Get the price feed ids (one time task)

You can retrieve the Pyth price feed ids (bytes32) from the [PythAdapter](/developers/contract-interfaces/pythadapter) \`[getPriceFeedIdByAsset](https://docs.nabla.fi/developers/pythadapter#getpricefeedidbyasset)\` for the assets you are interested in.\
\
In case of USDC and WETH on Arbitrum:

```
# WETH
cast call 0x4cC48Fde2296E49E7dA73159c0bf0f89Bd8AF4aa "getPriceFeedIdByAsset(address)(bytes32)" 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 --rpc-url $ARBITRUM_MAINNET_RPC_URL 
0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace

# USDC
cast call 0x4cC48Fde2296E49E7dA73159c0bf0f89Bd8AF4aa "getPriceFeedIdByAsset(address)(bytes32)" 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 --rpc-url $ARBITRUM_MAINNET_RPC_URL 
0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a
```

Basically these are the price feeds from Pyth, also listed here:\
<https://www.pyth.network/developers/price-feed-ids>

#### Query Pyth's Hermes API

Example (curl):

```
curl -X 'GET' \
  'https://hermes.pyth.network/v2/updates/price/latest?ids%5B%5D=0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace&ids%5B%5D=0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a' \
  -H 'accept: application/json'
```

Response (snippet, parsed section):

```json
...
  "parsed": [
    {
      "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
      "price": {
        "price": "305192675883",
        "conf": "153073812",
        "expo": -8,
        "publish_time": 1737975905
      },
...
{
      "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
      "price": {
        "price": "100003959",
        "conf": "117800",
        "expo": -8,
        "publish_time": 1737975905
      },
```

In this example the prices come with 8-decimal accuracy.&#x20;

{% hint style="warning" %}
The `price` data field is needed for getting a most up-to-date **quote**
{% endhint %}

Full response:

```json
{
  "binary": {
    "encoding": "hex",
    "data": [
      "504e41550100000003b801000000040d005ac409b82275b0f4581f0b6811974cc248d573f0b3a2150fc51f29f34e3ce6590c5afbb6751d96c2b888181fd97e6666aa2f59c661129b744c68920b3440beab000283426c73cbe491cd752d30a69c45d9fde6fe23040743d9dcb228ebd96efd785e12a61d39fc0ede203846e4bc11000fea59cf15f68c8956a8e0b2ab1bd5cc9cf200035791c4ae302ea0981d6c59a24ad83c5c52f2de48327c8fd79a6844a17bcba8a061af7ec15cbb93fbabce85d57f85102efddb0f9eb2dfed3776861f113d320ffb00047edb291f562eae0298ecd3863759f225f6da140fc1abe75e8fb2193ffedfdaa44895da1874dc4d385e6ec248af4aedba7c44842cda59df01b8dc2cef61abd13c0006c077eab40dc27a24622075c3477e837c098678a498b435e2c0a51eaba38b833543ebc93e0580815df106f4c33b8af0be9ae2e57a1429d0168bdc13ad16cb859b0108b496b670f8287721c4ef47d59ea3d117310abf6954d952883e160ea3154372720b398175a5d58c78d24d13f22c3ee465bf2e74fad91762b9f13d489d8458a6e6010ac07ce5fd5d56c89128ac9b064e8ae776da3f79a30446755f4e01d4b4db709e7c7a859c15ef4e302720e2c1f80a35ad469069c1bed440a679cc827d4d7d60ab90000bf8d0ab54e8dabbb1b0e8e6ec94ffd9b26915f1eaea6248774d8d6da8e995ff3455bc287362498a534541516fd8e931a6f91b30aa9305326c8005297fd9ed76fb010ca3127f7d4232b16aaaf9b528445b6219f1c1fe1a045677ea3dd095428e2a5e356d7fa8e28d6ad9696ae2adaf5ced471d20f06411f9711ebbe6f5d9d7737e4848000dd57293c785f4e43f0078df31b9be587f1d1e72336a08387b38737337994ff54a170bacc2f512550fb37a99d2f603a6acd140536999da093239f58d92f0b01609010e49c95d1badf53ceef358c7ae2852e2db2fc6999111bdff9dfbf855baf05abe863af6c5f2205bcc457ffc59c9cd36aabf96493a886f08c1691bb0fdc6036b351b000fbc02a92c1d94ac517e5844882b37b24f5097ad3ae246e3db9197a518d028e600622634b66bdec568a1fcff7291abcd0eeda7d747a0461da2a79a545935eff1660011006e9c665f83b9f4c32ddfa015ad9b56adae4214155e0dcae1dc69d9b53266742491b2ec95acdcb223af499d911df177956d89c27157211c006815c8ac5b93e90067976c2a00000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa71000000000684a2f8014155575600000000000b9189b30000271046ce0774a317ccaebc81d3c486f14d96faafbcc302005500ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace0000004760ec68200000000007fcfb98fffffff80000000067976c2a0000000067976c2900000047324fd2500000000009b2196a0bdc38644b353ef712c262043f6acf1aeca2ded131c37aab82271a1086e80957fcb03ff4707a920d2d5d62e4aad732b67f4ceb2192f61fe78e6e6ab46a15b45eac3728e4ad5f855960af2d10e512ef2e5cb57cb45eb93cb9b1b1cdfbc7bef79ca60599fbe8a67117d5bea1279f2ae39d350842484aeef2874c565559d6c4ab7693d98123b8600bd7acab21483545fa41c4d1e341fd2771f11395a2f8b67b78b7fd298439aa89bfedc10ecdc17d59ba2e6ae1a659d36ed3bdd02e40f9245ae51f15edf6e39ed91de880ed19773f8b7662cb6147e203afc1c5389e8ee83a005500eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a0000000005f5eb3f000000000001c939fffffff80000000067976c2a0000000067976c290000000005f5efd6000000000001b8190b9318da3665983c37b51bfe867db74406319810b9d0baa775344898275de3a5f93feaf82e9be5af47653daba796886dcd54f74c6b26dce797b455275d795ce318d7daa1cb788662a736d6f918bfe7021eb7e01606b69139ad4544ea31be423c2aef7a2f19ce4108c397c5e454d4194a4da0c005af34b9277dc07cd01a1ea4d832cd9d2159d5b1e17c8dd0f4ea45fa41c4d1e341fd2771f11395a2f8b67b78b7fd298439aa89bfedc10ecdc17d59ba2e6ae1a659d36ed3bdd02e40f9245ae51f15edf6e39ed91de880ed19773f8b7662cb6147e203afc1c5389e8ee83a"
    ]
  },
  "parsed": [
    {
      "id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
      "price": {
        "price": "306568783904",
        "conf": "134019992",
        "expo": -8,
        "publish_time": 1737976874
      },
      "ema_price": {
        "price": "305786770000",
        "conf": "162666858",
        "expo": -8,
        "publish_time": 1737976874
      },
      "metadata": {
        "slot": 194087347,
        "proof_available_time": 1737976875,
        "prev_publish_time": 1737976873
      }
    },
    {
      "id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
      "price": {
        "price": "100002623",
        "conf": "117049",
        "expo": -8,
        "publish_time": 1737976874
      },
      "ema_price": {
        "price": "100003798",
        "conf": "112665",
        "expo": -8,
        "publish_time": 1737976874
      },
      "metadata": {
        "slot": 194087347,
        "proof_available_time": 1737976875,
        "prev_publish_time": 1737976873
      }
    }
  ]
}
```

{% hint style="warning" %}
The `data` field is the needed **price update data** for moving forward with a **swap**.
{% endhint %}

{% hint style="info" %}
For Pyth price update data, there is also a SSE streaming endpoint available\
<https://hermes.pyth.network/docs/#/rest/price_stream_sse_handler>
{% endhint %}

</details>

<details>

<summary>Nabla price update data</summary>

**Get the price feed ids (one time task)**

The price feed ids used for Nabla price update data are identical to Pyth. This is to ensure alignment with pool ensembles/hubs that still using Pyth price feeds and to ensure ease of integration.

The price feed ids from Pyth are listed here:\
<https://www.pyth.network/developers/price-feed-ids>

#### Query Nabla Quote API

{% hint style="warning" %}
Please contact us if you're interested in integrating Nabla Quote API
{% endhint %}

Response (snippet, parsed section):

```json
...
    {
      "id": "3fa4252848f9f0a1480be62745a4629d9eb1322aebab8a791e344b3b9c1adcf5",
      "metadata": {

      },
      "price": {
        "price": 29225000,
        "publish_time": 1744383661422
      }
    },
...
```

In this example the prices come with 8-decimal accuracy.&#x20;

{% hint style="warning" %}
The `price` data field is needed for getting a most up-to-date **quote**
{% endhint %}

Full response:

```json
{
  "binary": {
    "data": [
      string
    ],
    "encoding": "hex"
  },
  "parsed": [
    {
      "id": "3fa4252848f9f0a1480be62745a4629d9eb1322aebab8a791e344b3b9c1adcf5",
      "metadata": {

      },
      "price": {
        "price": 29480000,
        "publish_time": 1744379324061
      }
    }
  ]
}
```

{% hint style="warning" %}
The `data` field is the needed **price update data** for moving forward with a **swap**.
{% endhint %}

{% hint style="info" %}
For Nabla price update data, there is also a SSE streaming endpoint available.
{% endhint %}

</details>

### 2. Get an on-chain quote

We have just received the price information about the assets we are interested in.\
Now we can feed the prices directly into the [NablaPortal](/developers/contract-interfaces/nablaportal) quoting function:

```solidity
NablaPortal.quoteSwapExactTokensForTokens(
    uint256 _amountIn, 
    address[] _tokenPath, 
    address[] _routerPath, 
    [priceTokenA, priceTokenB]
) external view returns (uint256 amountOut_)
```

Example quote with foundry's cast for 1k USDC (6 decimal precision) to WETH through [Nabla's Main Crypto Hub on Arbitrum](https://app.nabla.fi/):

```solidity
cast call 0xcB94Eee869a2041F3B44da423F78134aFb6b676B \
	"quoteSwapExactTokensForTokens(uint256 amountIn, address[] tokenPath, address[] routerPath, uint256[] tokenPrices)(uint256)" \
	1000000000 \
	"[0xaf88d065e77c8cC2239327C5EDb3A432268e5831,0x272dF896f4D0c97F65e787f861bb6e882776a155]" \
	"[0x7bcFc8b8ff61456ad7C5E2be8517D01df006d18d]" \
	"[100003959,305192675883]" \
	--rpc-url $(ARBITRUM_MAINNET_RPC_URL)
```

### 3. Perform a swap

We have received **price updata data** and are happy with the quote, we can now perform a swap through [NablaPortal](/developers/contract-interfaces/nablaportal).\
For this to work we need to feed the **price update data** into the swap function as \`[\_priceUpdateData](https://docs.nabla.fi/developers/nablaportal#swapexacttokensfortokens)\`.

```solidity
NablaPortal.swapExactTokensForTokens(
        uint256 _amountIn,
        uint256 _amountOutMin,
        address[] calldata _tokenPath,
        address[] calldata _routerPath,
        address _to,
        uint256 _deadline,
        bytes[] calldata _priceUpdateData
    )
```

{% hint style="warning" %}
The **price updata data** is considered as valid if on-chain update is "not too ol&#x64;*"*.\
Also, if another bot or user updates the price on-chain that is newer than the one you have submitted, this newer price is taken.
{% endhint %}

If all requirements are met (e.g. minimum amount to accept & price update data not too old) the swap will execute successfully. :tada:<br>

***

## Done :relaxed:

Thanks for integrating with Nabla :raised\_hands: \
If you have questions, please do not hesitate to get in contact and ask in our Discord or Telegram.


# Contract interfaces


# NablaPortal

### oracleAdapter

```solidity
address oracleAdapter
```

### assetsByRouter

```solidity
mapping(address => mapping(address => bool)) assetsByRouter
```

### routers

```solidity
address[] routers
```

### routerAssets

```solidity
mapping(address => address[]) routerAssets
```

## Events

### EthForExactTokensSwapped

```solidity
event EthForExactTokensSwapped(
    address sender, 
    address to, 
    address[] routerPath, 
    address[] tokenPath, 
    uint256[] swapAmounts
)
```

### ExactTokensForEthSwapped

```solidity
event ExactTokensForEthSwapped(
    address sender, 
    address to, 
    address[] routerPath, 
    address[] tokenPath, 
    uint256[] swapAmounts
)
```

### ExactTokensForTokensSwapped

{% code overflow="wrap" %}

```solidity
event ExactTokensForTokensSwapped(
    address sender, 
    address to, 
    address[] routerPath, 
    address[] tokenPath, 
    uint256[] swapAmounts
)
```

{% endcode %}

## Functions

### swapEthForExactTokens

{% code overflow="wrap" %}

```solidity
function swapEthForExactTokens(
    uint256 _amountIn, 
    uint256 _amountOutMin, 
    address[] _tokenPath, 
    address[] _routerPath, 
    address _to, 
    uint256 _deadline, 
    bytes[] _priceUpdateData
) external payable returns (uint256 amountOut_)
```

{% endcode %}

Swap ETH for tokens using the NablaRouter

*By calling this function the price feed gets be updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

<table><thead><tr><th width="184">Name</th><th width="133">Type</th><th>Description</th></tr></thead><tbody><tr><td>_amountIn</td><td>uint256</td><td>The amount of input ETH to swap</td></tr><tr><td>_amountOutMin</td><td>uint256</td><td>The minimum amount of output token that the user will accept</td></tr><tr><td>_tokenPath</td><td>address[]</td><td>Array of tokens to swap along the route (first token must be WETH)</td></tr><tr><td>_routerPath</td><td>address[]</td><td>Array of routers to use</td></tr><tr><td>_to</td><td>address</td><td>The recipient of the output tokens</td></tr><tr><td>_deadline</td><td>uint256</td><td>Unix timestamp after which the transaction will revert</td></tr><tr><td>_priceUpdateData</td><td>bytes[]</td><td>Array of price update data</td></tr></tbody></table>

#### **Return Values**

<table><thead><tr><th width="188">Name</th><th width="133">Type</th><th>Description</th></tr></thead><tbody><tr><td>amountOut_</td><td>uint256</td><td>Output amount of tokens</td></tr></tbody></table>

### swapExactTokensForEth

{% code overflow="wrap" fullWidth="false" %}

```solidity
function swapExactTokensForEth(
    uint256 _amountIn, 
    uint256 _amountOutMin, 
    address[] _tokenPath, 
    address[] _routerPath, 
    address _to, 
    uint256 _deadline, 
    bytes[] _priceUpdateData
) external payable returns (uint256 amountOut_)
```

{% endcode %}

Swap tokens using the NablaRouter and receive ETH

*By calling this function the price feed gets be updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

<table><thead><tr><th width="188">Name</th><th width="124">Type</th><th>Description</th></tr></thead><tbody><tr><td>_amountIn</td><td>uint256</td><td>The amount of input tokens to swap</td></tr><tr><td>_amountOutMin</td><td>uint256</td><td>The minimum amount of ETH that the user will accept</td></tr><tr><td>_tokenPath</td><td>address[]</td><td>Array of tokens to swap along the route (last token must be WETH)</td></tr><tr><td>_routerPath</td><td>address[]</td><td>Array of routers to use</td></tr><tr><td>_to</td><td>address</td><td>The recipient of ETH</td></tr><tr><td>_deadline</td><td>uint256</td><td>Unix timestamp after which the transaction will revert</td></tr><tr><td>_priceUpdateData</td><td>bytes[]</td><td>Array of price update data</td></tr></tbody></table>

#### **Return Values**

| Name        | Type    | Description          |
| ----------- | ------- | -------------------- |
| amountOut\_ | uint256 | Output amount of ETH |

### swapExactTokensForTokens

{% code overflow="wrap" %}

```solidity
function swapExactTokensForTokens(
    uint256 _amountIn, 
    uint256 _amountOutMin, 
    address[] _tokenPath, 
    address[] _routerPath, 
    address _to, 
    uint256 _deadline, 
    bytes[] _priceUpdateData
) external payable returns (uint256 amountOut_)
```

{% endcode %}

Swap tokens using the NablaRouter

*By calling this function the price feed gets be updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

<table><thead><tr><th width="189">Name</th><th width="133">Type</th><th>Description</th></tr></thead><tbody><tr><td>_amountIn</td><td>uint256</td><td>The amount of input tokens to swap</td></tr><tr><td>_amountOutMin</td><td>uint256</td><td>The minimum amount of output token that the user will accept</td></tr><tr><td>_tokenPath</td><td>address[]</td><td>Array of tokens to swap along the route</td></tr><tr><td>_routerPath</td><td>address[]</td><td>Array of routers to use</td></tr><tr><td>_to</td><td>address</td><td>The recipient of the output tokens</td></tr><tr><td>_deadline</td><td>uint256</td><td>Unix timestamp after which the transaction will revert</td></tr><tr><td>_priceUpdateData</td><td>bytes[]</td><td>Array of price update data</td></tr></tbody></table>

#### **Return Values**

<table><thead><tr><th width="189">Name</th><th width="136">Type</th><th>Description</th></tr></thead><tbody><tr><td>amountOut_</td><td>uint256</td><td>Output amount of tokens</td></tr></tbody></table>

### quoteSwapExactTokensForTokens

{% code overflow="wrap" %}

```solidity
function quoteSwapExactTokensForTokens(
    uint256 _amountIn, 
    address[] _tokenPath, 
    address[] _routerPath, 
    uint256[] _tokenPrices
) external view returns (uint256 amountOut_)
```

{% endcode %}

Get a quote for how many `_toToken` tokens `_amountIn` many `tokenIn` tokens can currently be swapped for.

#### **Parameters**

<table><thead><tr><th width="189">Name</th><th width="141">Type</th><th>Description</th></tr></thead><tbody><tr><td>_amountIn</td><td>uint256</td><td>The amount of input tokens to swap</td></tr><tr><td>_tokenPath</td><td>address[]</td><td>Array of tokens to swap along the route</td></tr><tr><td>_routerPath</td><td>address[]</td><td>Array of routers to use</td></tr><tr><td>_tokenPrices</td><td>uint256[]</td><td>Array of token prices fetched off-chain</td></tr></tbody></table>

#### **Return Values**

<table><thead><tr><th width="191">Name</th><th width="142">Type</th><th>Description</th></tr></thead><tbody><tr><td>amountOut_</td><td>uint256</td><td>Number of <code>_toToken</code> tokens that such a swap would yield right now</td></tr></tbody></table>

### getRouters

```solidity
function getRouters() external view returns (address[] routers_)
```

Retrieves the list of routers.

#### **Return Values**

<table><thead><tr><th width="185">Name</th><th width="155">Type</th><th>Description</th></tr></thead><tbody><tr><td>routers_</td><td>address[]</td><td>An array of addresses representing the routers.</td></tr></tbody></table>

### getRouterAssets

{% code overflow="wrap" %}

```solidity
function getRouterAssets(address _router) external view returns (address[] routerAssets_)
```

{% endcode %}

Retrieves the list of assets associated with a specific router.

#### **Parameters**

<table><thead><tr><th width="158">Name</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>_router</td><td>address</td><td>The address of the router for which to retrieve the assets.</td></tr></tbody></table>

#### **Return Values**

<table><thead><tr><th width="156">Name</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>routerAssets_</td><td>address[]</td><td>An array of addresses representing the assets associated with the specified router.</td></tr></tbody></table>


# NablaRouter

### oracleAdapter

```solidity
contract IPriceOracleGetter oracleAdapter
```

***

### poolByAsset

```solidity
mapping(address => contract ISwapPoolPermissioned) poolByAsset
```

***

### swapExactTokensForTokens

```solidity
function swapExactTokensForTokens(
    uint256 _amountIn, 
    uint256 _amountOutMin, 
    address[] _tokenInOut, 
    address _to, 
    uint256 _deadline, 
    bytes[] _priceUpdateData
) external payable returns (uint256[] amounts_)
```

Swap some `_fromToken` tokens for `_toToken` tokens, ensures `_amountOutMin` and `_deadline`, sends funds to `_to` address `msg.sender` needs to grant the router contract a sufficient allowance beforehand

*By calling this function the price feed gets be updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

| Name              | Type       | Description                                                  |
| ----------------- | ---------- | ------------------------------------------------------------ |
| \_amountIn        | uint256    | The amount of input tokens to swap                           |
| \_amountOutMin    | uint256    | The minimum amount of output token that the user will accept |
| \_tokenInOut      | address\[] | Array of size two, indicating the in and out token           |
| \_to              | address    | The recipient of the output tokens                           |
| \_deadline        | uint256    | Unix timestamp after which the transaction will revert       |
| \_priceUpdateData | bytes\[]   | Array of price update data                                   |

#### **Return Values**

| Name      | Type       | Description                                                             |
| --------- | ---------- | ----------------------------------------------------------------------- |
| amounts\_ | uint256\[] | <p>Array of size two, containing </p><p>the input and output amount</p> |

***

### getAmountOut

```solidity
function getAmountOut(
    uint256 _amountIn, 
    address[] _tokenInOut, 
    uint256[] _tokenPrices
) external view returns (uint256 amountOut_, uint256 swapFee_)
```

Get a quote for how many `_toToken` tokens `_amountIn` many `tokenIn` tokens can currently be swapped for.

#### **Parameters**

| Name          | Type       | Description                                                                 |
| ------------- | ---------- | --------------------------------------------------------------------------- |
| \_amountIn    | uint256    | The amount of input tokens to swap                                          |
| \_tokenInOut  | address\[] | Array of size two, indicating the in and out token                          |
| \_tokenPrices | uint256\[] | Array of size two, indicating the in and out token prices fetched off-chain |

#### **Return Values**

| Name        | Type    | Description                                                        |
| ----------- | ------- | ------------------------------------------------------------------ |
| amountOut\_ | uint256 | Number of `_toToken` tokens that such a swap would yield right now |
| swapFee\_   | uint256 | The fee that is charged for the swap (in `_toToken` tokens)        |


# SwapPool

Swap pool contract. May or may not be covered by a backstop pool. Conceptionally, there are two ways to temporarily disable a pool: The owner can either pause the pool, disabling deposits, swaps & backstop, or the owner can set the pool cap to zero which only prevents deposits. The former is for security incidents, the latter for phasing out a pool.

***

### SwapFees

```solidity
struct SwapFees {
  uint32 lpFee;
  uint32 backstopFee;
  uint32 protocolFee;
}
```

***

### totalLiabilities

```solidity
uint256 totalLiabilities
```

The liabilities of the pool Cannot just use totalSupply() as the totalLiabilities will accumulate also the LP fees from swaps. This is fixed point number using the decimals of this pool

***

### reserve

```solidity
uint256 reserve
```

The amount of pool tokens usable for swaps This is fixed point number using the decimals of this pool

***

### reserveWithSlippage

```solidity
uint256 reserveWithSlippage
```

The amount of pool tokens plus the slippage The relationship with reserve is: reserveWithSlippage = slippageCurve.psi(reserve, totalLiabilities) However this relationship will never hold precisely and will deviate slightly for numerical reasons!! All code needs to work even if this relationship does not hold This is fixed point number using the decimals of this pool

***

### maxCoverageRatioForSwapIn

```solidity
uint256 maxCoverageRatioForSwapIn
```

***

### safeRedeemPercentage

```solidity
uint256 safeRedeemPercentage
```

***

### safeRedeemInterval

```solidity
uint256 safeRedeemInterval
```

***

### lastBackstopBurnTimestamp

```solidity
uint256 lastBackstopBurnTimestamp
```

***

### lastAvailableAmountForSafeRedeem

```solidity
uint256 lastAvailableAmountForSafeRedeem
```

***

### protocolTreasury

```solidity
address protocolTreasury
```

***

### lastDepositAt

```solidity
mapping(address => uint256) lastDepositAt
```

***

### lastDepositAmount

```solidity
mapping(address => uint256) lastDepositAmount
```

***

### backstop

```solidity
contract IBackstopPool backstop
```

***

### router

```solidity
contract IRouter router
```

router instance for this swap pool

***

### slippageCurve

```solidity
contract ISlippageCurve slippageCurve
```

***

### deposit

```solidity
function deposit(uint256 _depositAmount, uint256 _minLPAmountOut, uint256 _deadline) external returns (uint256 sharesToMint_, int256 fee_)
```

Deposits amount of tokens into pool Will change cov ratio of pool, will increase delta to 0

#### **Parameters**

| Name             | Type    | Description                                            |
| ---------------- | ------- | ------------------------------------------------------ |
| \_depositAmount  | uint256 | The amount to be deposited, an amount of pool tokens   |
| \_minLPAmountOut | uint256 | Minimum amount of pool lp tokens to mint               |
| \_deadline       | uint256 | Unix timestamp after which the transaction will revert |

#### **Return Values**

| Name           | Type    | Description                                                                      |
| -------------- | ------- | -------------------------------------------------------------------------------- |
| sharesToMint\_ | uint256 | Total number of pool lp tokens minted                                            |
| fee\_          | int256  | The slippage reward (a negative fee), fixed point number using the pool decimals |

***

### quoteDeposit

```solidity
function quoteDeposit(uint256 _depositAmount) external view returns (uint256 sharesToMint_, uint256 slippageReward_)
```

Get a quote for the effective amount of tokens for a deposit

#### **Parameters**

| Name            | Type    | Description                |
| --------------- | ------- | -------------------------- |
| \_depositAmount | uint256 | The amount to be deposited |

#### **Return Values**

| Name             | Type    | Description                                                            |
| ---------------- | ------- | ---------------------------------------------------------------------- |
| sharesToMint\_   | uint256 | Total number of pool LP tokens to be minted (incl. slippage)           |
| slippageReward\_ | uint256 | The reward due to slippage, fixed point number using the pool decimals |

***

### withdraw

```solidity
function withdraw(uint256 _sharesToBurn, uint256 _minimumAmount, uint256 _deadline) external returns (uint256 payoutAmount_, int256 fee_)
```

Withdraws liquidity amount of asset ensuring minimum amount required

#### **Parameters**

| Name            | Type    | Description                                                              |
| --------------- | ------- | ------------------------------------------------------------------------ |
| \_sharesToBurn  | uint256 | The liquidity to be withdrawn, an amount of LP tokens                    |
| \_minimumAmount | uint256 | The minimum amount of returned pool tokens that will be accepted by user |
| \_deadline      | uint256 | Unix timestamp after which the transaction will revert                   |

#### **Return Values**

| Name           | Type    | Description                                                                              |
| -------------- | ------- | ---------------------------------------------------------------------------------------- |
| payoutAmount\_ | uint256 | Amount of pool tokens withdrawn after applying withdrawal fee                            |
| fee\_          | int256  | The penalty due to slippage (a positive fee), fixed point number using the pool decimals |

***

### quoteWithdraw

```solidity
function quoteWithdraw(uint256 _sharesToBurn) external view returns (uint256 payoutAmount_, uint256 slippagePenalty_)
```

Get a quote for the effective amount of tokens for a withdrawal

#### **Parameters**

| Name           | Type    | Description                                 |
| -------------- | ------- | ------------------------------------------- |
| \_sharesToBurn | uint256 | Total number of pool LP tokens to be burned |

#### **Return Values**

| Name              | Type    | Description                                 |
| ----------------- | ------- | ------------------------------------------- |
| payoutAmount\_    | uint256 | The amount to be withdrawn (incl. slippage) |
| slippagePenalty\_ | uint256 | The penalty due to slippage                 |

***

### backstopBurn

```solidity
function backstopBurn(address _owner, uint256 _sharesToBurn) external returns (uint256 amount_)
```

Burns swap pool LP tokens of owner, will get compensated using backstop liquidity (reedem swap pool shares) Can only be invoked by backstop pool, disabled when pool is paused

#### **Parameters**

| Name           | Type    | Description                                       |
| -------------- | ------- | ------------------------------------------------- |
| \_owner        | address | The LP's address whose LP tokens should be burned |
| \_sharesToBurn | uint256 | The number of LP tokens of this pool to burn      |

#### **Return Values**

| Name     | Type    | Description                                                      |
| -------- | ------- | ---------------------------------------------------------------- |
| amount\_ | uint256 | The amount of `asset()` tokens that the burned shares were worth |

***

### getMaxRedeemSwapPoolShares

```solidity
function getMaxRedeemSwapPoolShares() external view returns (uint256 maxShares_)
```

Get the maximum amount of swap pool LP tokens that can be burned (CR <= 100%)

#### **Return Values**

| Name        | Type    | Description                                        |
| ----------- | ------- | -------------------------------------------------- |
| maxShares\_ | uint256 | The maximum amount of LP tokens that can be burned |

***

### backstopDrain

```solidity
function backstopDrain(uint256 _amount, address _recipient) external returns (uint256 swapAmount_)
```

For backstop pool to withdraw liquidity if swap pool's coverage ratio > 100% Can only be invoked by backstop pool

#### **Parameters**

| Name        | Type    | Description                                                 |
| ----------- | ------- | ----------------------------------------------------------- |
| \_amount    | uint256 | The amount of `asset()` tokens to be moved out of swap pool |
| \_recipient | address | Address to send the funds to                                |

#### **Return Values**

| Name         | Type    | Description                                                       |
| ------------ | ------- | ----------------------------------------------------------------- |
| swapAmount\_ | uint256 | The amount of `asset()` tokens that are transfered to \_recipient |

***

### quoteBackstopDrain

```solidity
function quoteBackstopDrain(uint256 _amount) external view returns (uint256 swapAmount_)
```

Get a quote for the effective amount of tokens for a backstop drain

#### **Parameters**

| Name     | Type    | Description                                                 |
| -------- | ------- | ----------------------------------------------------------- |
| \_amount | uint256 | The amount of tokens to be withdrawn for backstop liquidity |

#### **Return Values**

| Name         | Type    | Description                                 |
| ------------ | ------- | ------------------------------------------- |
| swapAmount\_ | uint256 | The amount to be withdrawn (incl. slippage) |

***

### quoteSwapInto

```solidity
function quoteSwapInto(uint256 _amount) public view returns (uint256 effectiveAmount_)
```

Get a quote for the effective amount of tokens for a swap into

#### **Parameters**

| Name     | Type    | Description                                     |
| -------- | ------- | ----------------------------------------------- |
| \_amount | uint256 | The amount of pool tokens to swap into the pool |

#### **Return Values**

| Name              | Type    | Description                                           |
| ----------------- | ------- | ----------------------------------------------------- |
| effectiveAmount\_ | uint256 | Effective amount, incl. slippage (penalty or rewards) |

***

### quoteSwapOut

```solidity
function quoteSwapOut(uint256 _amount) public view returns (uint256 effectiveAmount_, uint256 protocolFeeWithSlippage_, uint256 effectiveLpFee_, uint256 backstopFee_)
```

Get a quote for the effective amount of tokens, incl. slippage and fees

#### **Parameters**

| Name     | Type    | Description                                      |
| -------- | ------- | ------------------------------------------------ |
| \_amount | uint256 | The amount of pool asset to swap out of the pool |

#### **Return Values**

| Name                      | Type    | Description                                                              |
| ------------------------- | ------- | ------------------------------------------------------------------------ |
| effectiveAmount\_         | uint256 | Effective amount, incl. slippage and fees                                |
| protocolFeeWithSlippage\_ | uint256 | The protocol fee that is to be sent to the treasury                      |
| effectiveLpFee\_          | uint256 | The actual LP fee – totalLiabilities should be incremented by this value |
| backstopFee\_             | uint256 | The effective backstop fee                                               |

***

### coverage

```solidity
function coverage() external view returns (uint256 reserves_, uint256 liabilities_)
```

returns pool coverage ratio

#### **Return Values**

| Name          | Type    | Description                                                  |
| ------------- | ------- | ------------------------------------------------------------ |
| reserves\_    | uint256 | Current amount of usable `asset()` tokens (without slippage) |
| liabilities\_ | uint256 | total amount of `asset` deposited by liquidity providers     |

***

### getExcessLiquidity

```solidity
function getExcessLiquidity() external view returns (int256 excessLiquidity_)
```

Computes the excess liquidity that forms that valuation of the backstop pool is defined as b + C - B - L where

* b is reserve
* C is the amount of `asset()` tokens in the pool
* B is reserveWithSlippage
* L is totalLiabilities The excess liquidity is a fixed point number using the decimals of this pool

#### **Return Values**

| Name              | Type   | Description                                              |
| ----------------- | ------ | -------------------------------------------------------- |
| excessLiquidity\_ | int256 | The total excess liquidity of this pool, can be negative |

***

### sharesTargetWorth

```solidity
function sharesTargetWorth(uint256 _sharesToBurn) public view returns (uint256 amount_)
```

Returns the worth of an amount of pool shares (LP tokens) in underlying principle

#### **Parameters**

| Name           | Type    | Description                     |
| -------------- | ------- | ------------------------------- |
| \_sharesToBurn | uint256 | The number of LP tokens to burn |

#### **Return Values**

| Name     | Type    | Description                                              |
| -------- | ------- | -------------------------------------------------------- |
| amount\_ | uint256 | The amount of `asset()` tokens that the shares are worth |

***

### swapFees

```solidity
function swapFees() public view returns (uint256 lpFee_, uint256 backstopFee_, uint256 protocolFee_)
```

Return the configured swap fees for this pool

#### **Return Values**

| Name          | Type    | Description                                                           |
| ------------- | ------- | --------------------------------------------------------------------- |
| lpFee\_       | uint256 | Fee that benefits the pool's LPers, in 0.0001% (e.g. 300 -> 0.0300%)  |
| backstopFee\_ | uint256 | Fee that benefits the backstop pool, in 0.0001% (e.g. 150 -> 0.0150%) |
| protocolFee\_ | uint256 | Fee that benefits the protocol, in 0.0001% (e.g. 50 -> 0.0050%)       |

***

### depositingUnfreezesAt

```solidity
function depositingUnfreezesAt() public view returns (uint256 depositingUnfreezesAt_)
```


# GenericPool

Abstract contract containing common logic for all pools Each pool manages can hold a specific pool asset, which is an ERC20 token At the same time the pool is itself an ERC20 contract representing an LP token ("pool shares"). This contract takes care of - depositing pool tokens and at the same time minting LP tokens - withdrawing pool tokens and at the same time burning LP tokens It is abstract and does not take any assumptions about how the amount of pool tokens and LP tokens are related

***

### poolAsset

```solidity
contract IERC20 poolAsset
```

Asset held by the pool

***

### poolAssetDecimals

```solidity
uint8 poolAssetDecimals
```

The decimals of the pool asset

***

### poolCap

```solidity
uint256 poolCap
```

Maximum amount of `poolAsset` that can be deposited into this pool

***

### asset

```solidity
function asset() public view returns (address _token)
```

Returns the pooled token's address

#### **Return Values**

| Name    | Type    | Description                 |
| ------- | ------- | --------------------------- |
| \_token | address | Address of the pooled asset |

***

### assetDecimals

```solidity
function assetDecimals() public view returns (uint8 _decimals)
```

Returns the decimals of the pool asset

#### **Return Values**

| Name       | Type  | Description            |
| ---------- | ----- | ---------------------- |
| \_decimals | uint8 | The number of decimals |


# NablaBackstopPool

The backstop pool takes most of the risk of a set of swap pools backed by it. Whenever a swap pool is low on reserves and a LPer wants to withdraw some liquidity, they can conduct an insurance withdrawal (burn swap pool shares, reimbursed in backstop liquidity) to avoid paying a high slippage. The backstop pool owns all excess liquidity in its swap pools, but is also liable for potential liquidity gaps. In return, the backstop pool receives a cut of the swap fees.

***

### Withdrawal

```solidity
struct Withdrawal {
  uint128 startClaimPeriod;
  uint128 endClaimPeriod;
  uint256 sharesToBurn;
}
```

***

### SwapPoolConfig

```solidity
struct SwapPoolConfig {
  uint128 insuranceFeeBps;
  bool isCovered;
}
```

***

### router

```solidity
contract IRouter router
```

router instance for this backstop pool

***

### getBackedPool

```solidity
function getBackedPool(uint256 _index) external view returns (address swapPool_)
```

enumerate swap pools backed by this backstop pool

#### **Parameters**

| Name    | Type    | Description                                        |
| ------- | ------- | -------------------------------------------------- |
| \_index | uint256 | index of the swap pool in `coveredSwapPools` array |

#### **Return Values**

| Name       | Type    | Description       |
| ---------- | ------- | ----------------- |
| swapPool\_ | address | swap pool address |

***

### getBackedPoolCount

```solidity
function getBackedPoolCount() external view returns (uint256 count_)
```

get swap pool count backed by this backstop pool

#### **Return Values**

| Name    | Type    | Description          |
| ------- | ------- | -------------------- |
| count\_ | uint256 | number of swap pools |

***

### getInsuranceFee

```solidity
function getInsuranceFee(address _swapPool) external view returns (uint256 feeBps_)
```

get insurance withdrawal fee for a given swap pool

#### **Parameters**

| Name       | Type    | Description              |
| ---------- | ------- | ------------------------ |
| \_swapPool | address | address of the swap pool |

#### **Return Values**

| Name     | Type    | Description                                      |
| -------- | ------- | ------------------------------------------------ |
| feeBps\_ | uint256 | insurance witdrawal fee, in basis points (0.01%) |

***

### deposit

```solidity
function deposit(uint256 _depositAmount, uint256 _minLPAmountOut, uint256 _deadline, bytes[] _priceUpdateData) external payable returns (uint256 sharesToMint_)
```

Deposits amount of tokens into pool Will change cov ratio of pool, will increase delta to 0

*By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

| Name              | Type     | Description                                                                                                       |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| \_depositAmount   | uint256  | The amount of backstop pool tokens to be deposited                                                                |
| \_minLPAmountOut  | uint256  | The minimum amount of backstop pool LP tokens to mint                                                             |
| \_deadline        | uint256  | Unix timestamp after which the transaction will revert                                                            |
| \_priceUpdateData | bytes\[] | Array of price update data of all assets involved (backstop pool and all swapPools as within coveredSwapPools\[]) |

#### **Return Values**

| Name           | Type    | Description                                    |
| -------------- | ------- | ---------------------------------------------- |
| sharesToMint\_ | uint256 | Total number of backstop pool LP tokens minted |

***

### initiateWithdraw

```solidity
function initiateWithdraw(uint256 _sharesToBurn) external returns (bool success_)
```

Starts the withdrawal process or overrides an existing one The user must finalize the withdrawal after the delay period has passed but before the claim period ends through `finalizeWithdrawBackstopLiquidity()` or `finalizeWithdrawExcessSwapLiquidity()`

#### **Parameters**

| Name           | Type    | Description                                                         |
| -------------- | ------- | ------------------------------------------------------------------- |
| \_sharesToBurn | uint256 | The liquidity to be withdrawn, an amount of backstop pool LP tokens |

#### **Return Values**

| Name      | Type | Description             |
| --------- | ---- | ----------------------- |
| success\_ | bool | Confirmation of success |

***

### cancelWithdraw

```solidity
function cancelWithdraw() external returns (bool success_)
```

Cancels an initiated withdrawal

#### **Return Values**

| Name      | Type | Description             |
| --------- | ---- | ----------------------- |
| success\_ | bool | Confirmation of success |

***

### finalizeWithdrawBackstopLiquidity

```solidity
function finalizeWithdrawBackstopLiquidity(uint256 _minimumAmount, uint256 _deadline, bytes[] _priceUpdateData) external payable returns (uint256 payoutAmount_)
```

Finalizes the withdrawal process after the delay period has passed but before the claim period ends Withdraws backstop liquidity amount of asset ensuring minimum amount required

*By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

| Name              | Type     | Description                                                                                                       |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| \_minimumAmount   | uint256  | Reject withdrawal if resulting amount is below                                                                    |
| \_deadline        | uint256  | Unix timestamp after which the transaction will revert                                                            |
| \_priceUpdateData | bytes\[] | Array of price update data of all assets involved (backstop pool and all swapPools as within coveredSwapPools\[]) |

#### **Return Values**

| Name           | Type    | Description                          |
| -------------- | ------- | ------------------------------------ |
| payoutAmount\_ | uint256 | Amount of `asset()` tokens withdrawn |

***

### redeemSwapPoolShares

```solidity
function redeemSwapPoolShares(address _swapPool, uint256 _shares, uint256 _minAmountOut, uint256 _deadline, bytes[] _priceUpdateData) external payable returns (uint256 amountOut_)
```

Withdraw from a swap pool using backstop liquidity without slippage (backstop burn) only possible if swap pool's coverage ratio < 100%

*By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

| Name              | Type     | Description                                                                         |
| ----------------- | -------- | ----------------------------------------------------------------------------------- |
| \_swapPool        | address  | swap pool address                                                                   |
| \_shares          | uint256  | number of swap pool LP tokens to redeem, uses decimals of swap pool                 |
| \_minAmountOut    | uint256  | minimum amount of backstop liquidity to receive, uses decimals of backstop pool     |
| \_deadline        | uint256  | Unix timestamp after which the transaction will revert                              |
| \_priceUpdateData | bytes\[] | Array of price update data of all assets involved (backstop pool and this swapPool) |

#### **Return Values**

| Name        | Type    | Description                                                           |
| ----------- | ------- | --------------------------------------------------------------------- |
| amountOut\_ | uint256 | amount of backstop liquidity paid-out, uses decimals of backstop pool |

***

### finalizeWithdrawExcessSwapLiquidity

```solidity
function finalizeWithdrawExcessSwapLiquidity(address _swapPool, uint256 _minAmount, uint256 _deadline, bytes[] _priceUpdateData) external payable returns (uint256 swapAmount_)
```

Finalizes the withdrawal process after the delay period has passed but before the claim period ends Withdraw from backstop pool, but receive excess liquidity of a swap pool instead of backstop liquidity

*By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)*

#### **Parameters**

| Name              | Type     | Description                                                                                                       |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| \_swapPool        | address  | swap pool address, must have a coverage ratio > 100%                                                              |
| \_minAmount       | uint256  | minimum amount of swap pool liquidity to receive, uses decimals of swap pool                                      |
| \_deadline        | uint256  | Unix timestamp after which the transaction will revert                                                            |
| \_priceUpdateData | bytes\[] | Array of price update data of all assets involved (backstop pool and all swapPools as within coveredSwapPools\[]) |

#### **Return Values**

| Name         | Type    | Description                                                        |
| ------------ | ------- | ------------------------------------------------------------------ |
| swapAmount\_ | uint256 | amount of swap pool liquidity paid-out, uses decimals of swap pool |

***

### redeemCrossSwapPoolShares

```solidity
function redeemCrossSwapPoolShares(address _swapPool, address _targetSwapPool, uint256 _shares, uint256 _minAmount, uint256 _deadline, bytes[] _priceUpdateData) external payable returns (uint256 finalAmount_)
```

***

### getTotalPoolWorth

```solidity
function getTotalPoolWorth(uint256[] _allTokenPrices) public view returns (int256 value_, int256 totalExcessLiquidity_)
```

return worth of the whole backstop pool in `asset()`, incl. all swap pools' excess liquidity and the backstop pool's liabilities this is a fixed point number, using the backstop pool decimals

*ignoring if pools are paused or not, since liabilities still apply and we don't want the backstop pool worth to jump*

#### **Parameters**

| Name             | Type       | Description                                                                                                                                                         |
| ---------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_allTokenPrices | uint256\[] | array of all token prices (\[0] backstop pool token, \[1] swap pool token\_i, \[2] swap pool token\_i+1, ... \[n] swap pool token\_n) as within coveredSwapPools\[] |

#### **Return Values**

| Name                   | Type   | Description                                            |
| ---------------------- | ------ | ------------------------------------------------------ |
| value\_                | int256 | total value of all backstop pool shares, in `asset()`  |
| totalExcessLiquidity\_ | int256 | total excess liquidity of all swap pools, in `asset()` |

***

### sharesTargetWorth

```solidity
function sharesTargetWorth(uint256 _sharesToBurn, uint256[] _allTokenPrices) public view returns (uint256 amount_)
```

Returns the worth of an amount of pool shares (LP tokens) in underlying principle

#### **Parameters**

| Name             | Type       | Description                                                                                                                                                         |
| ---------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_sharesToBurn   | uint256    | The number of LP tokens to burn                                                                                                                                     |
| \_allTokenPrices | uint256\[] | array of all token prices (\[0] backstop pool token, \[1] swap pool token\_i, \[2] swap pool token\_i+1, ... \[n] swap pool token\_n) as within coveredSwapPools\[] |

#### **Return Values**

| Name     | Type    | Description                                              |
| -------- | ------- | -------------------------------------------------------- |
| amount\_ | uint256 | The amount of `asset()` tokens that the shares are worth |

***

### getPoolState

```solidity
function getPoolState(uint256[] _allTokenPrices) external view returns (uint256 reserves_, int256 totalPoolWorth_, uint256 totalSupply_)
```

returns the backstop pool state

#### **Parameters**

| Name             | Type       | Description                                                                                                                                                         |
| ---------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_allTokenPrices | uint256\[] | array of all token prices (\[0] backstop pool token, \[1] swap pool token\_i, \[2] swap pool token\_i+1, ... \[n] swap pool token\_n) as within coveredSwapPools\[] |

#### **Return Values**

| Name             | Type    | Description                            |
| ---------------- | ------- | -------------------------------------- |
| reserves\_       | uint256 | current amount of `asset` in this pool |
| totalPoolWorth\_ | int256  | total worth of the pool in `asset()`   |
| totalSupply\_    | uint256 | total amount of LP tokens minted       |

***

### getWithdrawal

```solidity
function getWithdrawal(address _sender) external view returns (uint128 startClaimPeriod_, uint128 endClaimPeriod_, uint256 sharesToBurn_)
```

Get information about a user's initiated withdrawal

#### **Parameters**

| Name     | Type    | Description                           |
| -------- | ------- | ------------------------------------- |
| \_sender | address | The user who initiated the withdrawal |

#### **Return Values**

| Name               | Type    | Description                                                               |
| ------------------ | ------- | ------------------------------------------------------------------------- |
| startClaimPeriod\_ | uint128 | The time when the withdrawal can be finalized, a unix timestamp           |
| endClaimPeriod\_   | uint128 | The time when the withdrawal can no longer be finalized, a unix timestamp |
| sharesToBurn\_     | uint256 | The amount of LP tokens to burn                                           |

***

### getWithdrawalDelayAndClaimPeriod

```solidity
function getWithdrawalDelayAndClaimPeriod() external view returns (uint128 delay_, uint128 claimPeriod_)
```

Get the delay and claim period for withdrawals

#### **Return Values**

| Name          | Type    | Description                                                              |
| ------------- | ------- | ------------------------------------------------------------------------ |
| delay\_       | uint128 | The delay before initiated withdrawals can be finalized, in seconds      |
| claimPeriod\_ | uint128 | The period within which initiated withdrawals can be claimed, in seconds |


# PythAdapter

Price oracle adapter that uses Pyth price feeds (https\://pyth.network)

## Events

### PythContractAddressSet

```solidity
event PythContractAddressSet(address sender, address pythContractAddress)
```

### PriceFeedRegistered

```solidity
event PriceFeedRegistered(address sender, address asset, bytes32 priceFeedId)
```

### PriceFeedUnregistered

```solidity
event PriceFeedUnregistered(address sender, address asset)
```

### PriceMaxAgeSet

```solidity
event PriceMaxAgeSet(address sender, uint256 newPriceMaxAge)
```

### PriceMinConfidenceRatioSet

```solidity
event PriceMinConfidenceRatioSet(address owner, address asset, uint256 oldPriceMinConfidenceRatio, uint256 newPriceMinConfidenceRatio)
```

### PriceFeedsUpdated

```solidity
event PriceFeedsUpdated(address sender, uint256 updateFee)
```

## Functions

### updatePriceFeeds

```solidity
function updatePriceFeeds(bytes[] _priceUpdateData) external payable returns (bool success_)
```

Updates one or more Pyth price feeds

*This function needs to be called right before calling getAssetPrice()*

#### **Parameters**

| Name              | Type     | Description            |
| ----------------- | -------- | ---------------------- |
| \_priceUpdateData | bytes\[] | Pyth price update data |

#### **Return Values**

| Name      | Type | Description             |
| --------- | ---- | ----------------------- |
| success\_ | bool | Confirmation of success |

### getAssetPrice

```solidity
function getAssetPrice(address _asset) external view returns (uint256 assetPrice_)
```

Returns the asset price

*This function reverts with a StalePrice error if the on-chain price has not been updated within the last getValidTimePeriod() seconds via updatePriceFeeds()*

#### **Parameters**

| Name    | Type    | Description          |
| ------- | ------- | -------------------- |
| \_asset | address | ERC-20 token address |

#### **Return Values**

| Name         | Type    | Description                               |
| ------------ | ------- | ----------------------------------------- |
| assetPrice\_ | uint256 | Asset price in USD with 18 decimal places |

### getPythContractAddress

```solidity
function getPythContractAddress() external view returns (address pythContractAddress_)
```

Returns the Pyth contract address

#### **Return Values**

| Name                  | Type    | Description           |
| --------------------- | ------- | --------------------- |
| pythContractAddress\_ | address | Pyth contract address |

### isPriceFeedRegistered

```solidity
function isPriceFeedRegistered(address _asset) public view returns (bool isRegistered_)
```

Check if Pyth price feed is registered

#### **Parameters**

| Name    | Type    | Description          |
| ------- | ------- | -------------------- |
| \_asset | address | ERC-20 token address |

#### **Return Values**

| Name           | Type | Description                  |
| -------------- | ---- | ---------------------------- |
| isRegistered\_ | bool | Confirmation of registration |

### getPriceFeedIdByAsset

```solidity
function getPriceFeedIdByAsset(address _asset) public view returns (bytes32 priceFeedId_)
```

Returns the Pyth price feed id for an asset

#### **Parameters**

| Name    | Type    | Description          |
| ------- | ------- | -------------------- |
| \_asset | address | ERC-20 token address |

#### **Return Values**

| Name          | Type    | Description        |
| ------------- | ------- | ------------------ |
| priceFeedId\_ | bytes32 | Pyth price feed id |

### getUpdateFee

```solidity
function getUpdateFee(bytes[] _updateData) public view returns (uint256 updateFee_)
```

Returns the required fee to update an array of price updates

#### **Parameters**

| Name         | Type     | Description                |
| ------------ | -------- | -------------------------- |
| \_updateData | bytes\[] | Array of price update data |

#### **Return Values**

| Name        | Type    | Description       |
| ----------- | ------- | ----------------- |
| updateFee\_ | uint256 | Update fee in Wei |

### getValidTimePeriod

```solidity
function getValidTimePeriod() external view returns (uint256 validTimePeriod_)
```

Returns the period (in seconds) that a price feed is considered valid since its publish time

#### **Return Values**

| Name              | Type    | Description                  |
| ----------------- | ------- | ---------------------------- |
| validTimePeriod\_ | uint256 | Valid time period in seconds |

### getPriceMaxAge

```solidity
function getPriceMaxAge() external view returns (uint256)
```

Returns the maximum age of a price feed in seconds

#### **Return Values**

| Name | Type    | Description                                        |
| ---- | ------- | -------------------------------------------------- |
| \[0] | uint256 | priceMaxAge Maximum age of a price feed in seconds |

### getPriceMinConfidenceRatio

```solidity
function getPriceMinConfidenceRatio(address _asset) external view returns (uint256 priceMinConfidenceRatio_)
```

Returns the minimum confidence ratio for an asset

#### **Parameters**

| Name    | Type    | Description          |
| ------- | ------- | -------------------- |
| \_asset | address | ERC-20 token address |

#### **Return Values**

| Name                      | Type    | Description                            |
| ------------------------- | ------- | -------------------------------------- |
| priceMinConfidenceRatio\_ | uint256 | Minimum confidence ratio for the asset |


# ISlippageCurve

### psi

```solidity
function psi(uint256 _b, uint256 _l, uint8 _decimals) external view returns (uint256 _psi)
```

Calculates the output of the function Psi for input values b and l

#### **Parameters**

| Name       | Type    | Description                                                               |
| ---------- | ------- | ------------------------------------------------------------------------- |
| \_b        | uint256 | the input value `b`                                                       |
| \_l        | uint256 | the input value `l`                                                       |
| \_decimals | uint8   | the number of decimals used for \_b and \_l and also for the return value |

#### **Return Values**

| Name  | Type    | Description        |
| ----- | ------- | ------------------ |
| \_psi | uint256 | the value Psi(b,l) |

***

### inverseDiagonal

```solidity
function inverseDiagonal(uint256 _b, uint256 _l, uint256 _capitalB, uint8 _decimals) external view returns (uint256 _t)
```

Given b,l and B >= Psi(b, l), this function determines the unique t>=0 such that Psi(b+t, l+t) = B

#### **Parameters**

| Name       | Type    | Description                                                                        |
| ---------- | ------- | ---------------------------------------------------------------------------------- |
| \_b        | uint256 | the input value `b`                                                                |
| \_l        | uint256 | the input value `l`                                                                |
| \_capitalB | uint256 | the input value `B`                                                                |
| \_decimals | uint8   | the number of decimals used for \_b, \_l, \_capitalB and also for the return value |

#### **Return Values**

| Name | Type    | Description  |
| ---- | ------- | ------------ |
| \_t  | uint256 | the number t |

***

### inverseHorizontal

```solidity
function inverseHorizontal(uint256 _b, uint256 _l, uint256 _capitalB, uint8 _decimals) external view returns (uint256 _t)
```

Given b,l and B >= Psi(b, l), this function determines the unique t>=0 such that Psi(b+t, l) = B

#### **Parameters**

| Name       | Type    | Description                                                                        |
| ---------- | ------- | ---------------------------------------------------------------------------------- |
| \_b        | uint256 | the input value `b`                                                                |
| \_l        | uint256 | the input value `l`                                                                |
| \_capitalB | uint256 | the input value `B`                                                                |
| \_decimals | uint8   | the number of decimals used for \_b, \_l, \_capitalB and also for the return value |

#### **Return Values**

| Name | Type    | Description  |
| ---- | ------- | ------------ |
| \_t  | uint256 | the number t |


# Contract addresses

**Nabla Mainnet Alpha** contracts are deployed to&#x20;

* [Arbitrum One (chain id: 42161)](/developers/contract-addresses/arbitrum-one)
* [Base (chain id: 8453)](/developers/contract-addresses/base-mainnet)
* [Berachain (chain id: 80094)](/developers/contract-addresses/berachain)
* [Hyperliquid (chain id: 999)](/developers/contract-addresses/hyperliquid)
* [Monad (chain id: 143)](/developers/contract-addresses/monad)


# Arbitrum One

**Nabla Mainnet Alpha** contracts are deployed to Arbitrum One (chain id: 42161).

***

### **Nabla Portal**

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xcB94Eee869a2041F3B44da423F78134aFb6b676B
</code></pre></td></tr></tbody></table>

### Pyth Adapter V2

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x4cC48Fde2296E49E7dA73159c0bf0f89Bd8AF4aa
</code></pre></td></tr></tbody></table>

### Nabla Oracle

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xF82BFA4a19465b83E447247dFA821cadB4B7F185
</code></pre></td></tr></tbody></table>

***

## Main Crypto Hub

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x7bcFc8b8ff61456ad7C5E2be8517D01df006d18d
</code></pre></td></tr><tr><td>Oracle<br>(price update data)</td><td>Nabla</td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x272dF896f4D0c97F65e787f861bb6e882776a155
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto WETH Swap LP</td></tr><tr><td>Symbol</td><td>naWETHc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped Ether</td></tr><tr><td>Asset address</td><td><pre><code>0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x058a0875DB2168AF97bbf01043C3e8F751cCd9A8
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto USDC Swap LP</td></tr><tr><td>Symbol</td><td>naUSDCc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD Coin</td></tr><tr><td>Asset address</td><td><pre><code>0xaf88d065e77c8cC2239327C5EDb3A432268e5831
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="ARB" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xE70292D6054B753214D555930e0F11CD7206Efeb
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto ARB Swap LP</td></tr><tr><td>Symbol</td><td>naARBc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Arbitrum</td></tr><tr><td>Asset address</td><td><pre><code>0x912CE59144191C1204E64559FE8253a0e49E6548
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x411eF79fE9Df8Ba82A09c7e93FdE85AF5732BF12
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto WBTC Swap LP</td></tr><tr><td>Symbol</td><td>naWBTCc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Wrapped Bitcoin</td></tr><tr><td>Asset address</td><td><pre><code>0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="CBBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x4d044dc45fBA99E3f75040061b5B82c0C81dD3C4
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto CBBTC Swap LP</td></tr><tr><td>Symbol</td><td>naCBBTCc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Coinbase Wrapped BTC</td></tr><tr><td>Asset address</td><td><pre><code>0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDT (deprecated)" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xcC5544C63392952B6f94a695f8f9e153F4284A87
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto USDT Swap LP</td></tr><tr><td>Symbol</td><td>naUSDTc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td> Tether USD</td></tr><tr><td>Asset address</td><td><pre><code>0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x337B03C2a7482c6eb29d8047eA073119dc68a29A
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Backstop LP</td></tr><tr><td>Symbol</td><td>naBSPc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD Coin</td></tr><tr><td>Asset address</td><td><pre><code>0xaf88d065e77c8cC2239327C5EDb3A432268e5831
</code></pre></td></tr></tbody></table>

***

## Nabla Drip (LP staking)

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xf1df596077C10D21BFaEa029d951a3c5F858264f
</code></pre></td></tr></tbody></table>


# Base

**Nabla Mainnet Alpha** contracts are deployed to Base (chain id: 8453).

***

### **Nabla Portal**

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xd24d145f5E351de52934A7E1f8cF55b907E67fFF
</code></pre></td></tr></tbody></table>

### Pyth Adapter V2

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x276d61F41fED44a9A5Fc0AAdbf5b328173197Fe3
</code></pre></td></tr></tbody></table>

### Nabla Oracle

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x84BEC2c11fe71DA8af8DAfba44f4DdF3769c494D
</code></pre></td></tr></tbody></table>

***

## Main Crypto Hub

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x791Fee7b66ABeF59630943194aF17B029c6F487B
</code></pre></td></tr><tr><td>Oracle<br>(price update data)</td><td>Nabla</td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x123456C6C27bb57013F4b943A0f032a0ab9c12eB
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto WETH Swap LP</td></tr><tr><td>Symbol</td><td>naWETHc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped Ether</td></tr><tr><td>Asset address</td><td><pre><code>0x4200000000000000000000000000000000000006
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="CBBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xa83a20F4dCaB1a63a9118E9E432932c8BEB39b85
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto CBBTC Swap LP</td></tr><tr><td>Symbol</td><td>naCBBTCc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Coinbase Wrapped Bitcoin</td></tr><tr><td>Asset address</td><td><pre><code>0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="DEGEN (deprecated)" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xdd8f26dea84b13600039747b59797E615767Dab0
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub DEGEN Swap LP</td></tr><tr><td>Symbol</td><td>naDEGENc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Degen</td></tr><tr><td>Asset address</td><td><pre><code>0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x50841f086891fe57829ee0a809f8B10174892b69
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Backstop LP</td></tr><tr><td>Symbol</td><td>naBSPc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD Coin</td></tr><tr><td>Asset address</td><td><pre><code>0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
</code></pre></td></tr></tbody></table>

***

## Meme Hub

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x925d2452185d4fA38C77feC56fAc4a136BBe5976
</code></pre></td></tr><tr><td>Oracle<br>(price update data)</td><td>Pyth</td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="DEGEN" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x7d970C59248124290C401c1a3f036c008F1C1983
</code></pre></td></tr><tr><td>Name</td><td>Nabla Meme Hub DEGEN Swap LP</td></tr><tr><td>Symbol</td><td>naDEGENm</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Degen</td></tr><tr><td>Asset address</td><td><pre><code>0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="MOG" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x0706E6e34a1bDadcD5b3feE933Fe9262598e8992
</code></pre></td></tr><tr><td>Name</td><td>Nabla Meme Hub MOG Swap LP</td></tr><tr><td>Symbol</td><td>naMOGm</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Mog Coin</td></tr><tr><td>Asset address</td><td><pre><code>0x2Da56AcB9Ea78330f947bD57C54119Debda7AF71
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x7d970C59248124290C401c1a3f036c008F1C1983
</code></pre></td></tr><tr><td>Name</td><td>Nabla Meme Hub DEGEN Swap LP</td></tr><tr><td>Symbol</td><td>naWETHm</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped Ether</td></tr><tr><td>Asset address</td><td><pre><code>0x4200000000000000000000000000000000000006
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xAF60721650ff816d54dc82608486d779F9b35e6b
</code></pre></td></tr><tr><td>Name</td><td>Nabla Meme Hub Backstop LP</td></tr><tr><td>Symbol</td><td>naBSPm</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD Coin</td></tr><tr><td>Asset address</td><td><pre><code>0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
</code></pre></td></tr></tbody></table>

***

## Nabla Drip (LP staking)

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xAeEcA60D3d9262250AD1F1dEA0B73F65AEa787Cf
</code></pre></td></tr></tbody></table>

***

## Nabla Staking

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x2e56CE8c5e28D02113974856a2E92B20787674F1
</code></pre></td></tr></tbody></table>


# Berachain

**Nabla Mainnet Alpha** contracts are deployed to Berachain (chain id: 80094).

***

### **Nabla Portal**

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x1F917Fe724F186a1fFA7744A73afed18C335b9eC
</code></pre></td></tr></tbody></table>

### Pyth Adapter V2

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x9B5a425a9F4b4411D42B21caacf86d026dce43Ec
</code></pre></td></tr></tbody></table>

### Nabla Oracle

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x6d6190Da8fD73E0C911929DED2D6B47cE066e441
</code></pre></td></tr></tbody></table>

***

## Main Crypto Hub

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x8756fd992569E0389bF357EB087f5827F364D2a4
</code></pre></td></tr><tr><td>Oracle<br>(price update data)</td><td>Nabla</td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xBa8cC2Ac11CbB65f542FF59A3af5655940fB3282
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub WETH Swap LP</td></tr><tr><td>Symbol</td><td>naWETHc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped Ether</td></tr><tr><td>Asset address</td><td><pre><code>0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x896BDED4b4A89C1104587dd045C1B441110B8B5f
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub WBTC Swap LP</td></tr><tr><td>Symbol</td><td>naWBTCc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Wrapped Bitcoin</td></tr><tr><td>Asset address</td><td><pre><code>0x0555E30da8f98308EdB960aa94C0Db47230d2B9c
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xE971445787DCB0BB577610126287DED493DDDAE7
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub USDC Swap LP</td></tr><tr><td>Symbol</td><td>naUSDCc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>Bridged USDC (Stargate)   |   USDC.e</td></tr><tr><td>Asset address</td><td><pre><code>0x549943e04f40284185054145c6E4e9568C1D3241
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xfa158Cf7cD83F418eBD1326121810466972447F6
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub Backstop LP</td></tr><tr><td>Symbol</td><td>naBSPc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>Bridged USDC (Stargate)   |   USDC.e</td></tr><tr><td>Asset address</td><td><pre><code>0x549943e04f40284185054145c6E4e9568C1D3241
</code></pre></td></tr></tbody></table>


# Hyperliquid

**Nabla Mainnet Alpha** contracts are deployed to HyperEVM (chain id: 999).

***

### **Nabla Portal**

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x45a2C9FBc307A13c2737Cef9e00C1555c2F8C948
</code></pre></td></tr></tbody></table>

### Nabla Oracle

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x41CB73FA7f222e80dA0374A68837bFa9DEF249Aa
</code></pre></td></tr></tbody></table>

***

## Crypto Hub

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xca51650D3840c2E628A95AC0096592a2aEa9daE8
</code></pre></td></tr><tr><td>Oracle<br>(price update data)</td><td>Nabla</td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="UETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x8a1e862E1585F4f78C913b46b59b0bB45e5e7CB6
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub uETH Swap LP</td></tr><tr><td>Symbol</td><td>nauETHc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Unit Ethereum</td></tr><tr><td>Asset address</td><td><pre><code>0xBe6727B535545C67d5cAa73dEa54865B92CF7907
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="UBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xA86e7FD33c0B49054dfb63dF1d4EE7b202264B64
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub uBTC Swap LP</td></tr><tr><td>Symbol</td><td>nauBTCc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Unit Bitcoin</td></tr><tr><td>Asset address</td><td><pre><code>0x9FDBdA0A5e284c32744D2f17Ee5c74B284993463
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDT0" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x3B3273787EB10D8eE6244DCBD01901111bf769CC
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub USDT0 Swap LP</td></tr><tr><td>Symbol</td><td>naUSDT0c</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD₮0</td></tr><tr><td>Asset address</td><td><pre><code>0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WHYPE" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x1A54c9Ca77672D96Ac0fFc8EB9F51D5eB5C84F48
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub WHYPE Swap LP</td></tr><tr><td>Symbol</td><td>naWHYPEc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped HYPE</td></tr><tr><td>Asset address</td><td><pre><code>0x5555555555555555555555555555555555555555
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x606E1B9C4c8cc076b8e6c869A44984E1Cb05E286
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub Backstop LP</td></tr><tr><td>Symbol</td><td>naBSPc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD₮0</td></tr><tr><td>Asset address</td><td><pre><code>0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb
</code></pre></td></tr></tbody></table>

***

***

## Crypto Hub (deprecated)

{% hint style="warning" %}
**Deprecated — previous deployment.** These contracts have been superseded by the Crypto Hub addresses above and are retained for reference only. The Nabla Portal and Oracle are shared and unchanged.
{% endhint %}

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xe62b7C96F9b804742d2Cbd57613F19Bda82D426F
</code></pre></td></tr><tr><td>Oracle<br>(price update data)</td><td>Nabla</td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="UETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x5C542cE2e3dC25B4EF197b79B239261AAE27b3Dd
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub ETHU Swap LP</td></tr><tr><td>Symbol</td><td>naETHUc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Unit Ethereum</td></tr><tr><td>Asset address</td><td><pre><code>0xBe6727B535545C67d5cAa73dEa54865B92CF7907
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="UBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xB5E4C3Ca3D1D804DA0c1808cF60ddED6FF3b65e5
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub BTCU Swap LP</td></tr><tr><td>Symbol</td><td>naBTCUc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Unit Bitcoin</td></tr><tr><td>Asset address</td><td><pre><code>0x9FDBdA0A5e284c32744D2f17Ee5c74B284993463
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDT0" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x8426d3de775f77c7226f89eed6839b288639ad73
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub USDT0 Swap LP</td></tr><tr><td>Symbol</td><td>naUSDT0c</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD₮0</td></tr><tr><td>Asset address</td><td><pre><code>0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WHYPE" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x5c235275583048BF99C14C1e20DE35Eeb23AADd7
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub WHYPE Swap LP</td></tr><tr><td>Symbol</td><td>naWHYPEc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped HYPE</td></tr><tr><td>Asset address</td><td><pre><code>0x5555555555555555555555555555555555555555
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x2cD52FF130FD8c4cB1F83c9a179C41FbB06d2363
</code></pre></td></tr><tr><td>Name</td><td>BSPool</td></tr><tr><td>Symbol</td><td>BSP</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD₮0</td></tr><tr><td>Asset address</td><td><pre><code>0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb
</code></pre></td></tr></tbody></table>


# Monad

**Nabla Mainnet Alpha** contracts are deployed to Monad (chain id: 143).

***

### **Nabla Portal**

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x8955C84452F6686Ff61E60b2a4b125Ae3171BB08
</code></pre></td></tr></tbody></table>

### Nabla Oracle

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x42bD4A41A42A9001092baEBA2957e15c835Ff3aE
</code></pre></td></tr></tbody></table>

***

## Crypto Hub

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x610748f49774C062467c7AE1eC9E4729FFE94577
</code></pre></td></tr><tr><td>Oracle<br>(price update data)</td><td>Nabla</td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xd7B645e5027A010899A95bE464e880d58eCf6d76
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub WETH Swap LP</td></tr><tr><td>Symbol</td><td>naWETHc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped Ether</td></tr><tr><td>Asset address</td><td><pre><code>0xEE8c0E9f1BFFb4Eb878d8f15f368A02a35481242
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xC1EB061De61f3B23D17cF61d1E890D53070dee62
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub WBTC Swap LP</td></tr><tr><td>Symbol</td><td>naWBTCc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Wrapped Bitcoin</td></tr><tr><td>Asset address</td><td><pre><code>0x0555E30da8f98308EdB960aa94C0Db47230d2B9c
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0xAe0cC253F27f0e80556e911E56FC4806Ac6a1508
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub USDC Swap LP</td></tr><tr><td>Symbol</td><td>naUSDCc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USDC</td></tr><tr><td>Asset address</td><td><pre><code>0x754704Bc059F8C67012fEd69BC8A327a5aafb603
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WMON" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x12243c1cdb211813776d58DdBC1B59237b447919
</code></pre></td></tr><tr><td>Name</td><td>Nabla Crypto Hub MON Swap LP</td></tr><tr><td>Symbol</td><td>naWMONc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped MON</td></tr><tr><td>Asset address</td><td><pre><code>0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x11B06EF8Adc5ea73841023CB39Be614f471213cc
</code></pre></td></tr><tr><td>Name</td><td>BSPool</td></tr><tr><td>Symbol</td><td>BSP</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USDC</td></tr><tr><td>Asset address</td><td><pre><code>0x754704Bc059F8C67012fEd69BC8A327a5aafb603
</code></pre></td></tr></tbody></table>


# Monad Testnet

**Nabla Mainnet Alpha** contracts are deployed to Monad Testnet (chain id: 10143)

***

### **Nabla Portal**

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xA3E4dC9e6481c027FF6520Bcfe0A7a1FD6140042
</code></pre></td></tr></tbody></table>

### Pyth Adapter V2

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x0d1aDD2ECF1306F1AA44E35F45c7f77de104b8e6
</code></pre></td></tr></tbody></table>

***

## Main Crypto Hub

### Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x4a7b3A83cf4B2fA10f50e27fe88450424B59973d
</code></pre></td></tr></tbody></table>

### Swap Pools

{% tabs %}
{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x66D1953aef1639af7EA6509F74b0342A66db1f31
</code></pre></td></tr><tr><td>Name</td><td>Nabla Main Crypto Hub WETH Swap LP</td></tr><tr><td>Symbol</td><td>naWETHc</td></tr><tr><td>Decimals</td><td>18</td></tr><tr><td>Asset</td><td>Wrapped Ether</td></tr><tr><td>Asset address</td><td><pre><code>0xB5a30b0FDc5EA94A52fDc42e3E9760Cb8449Fb37
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x5b90901818F0d92825F8b19409323C82ABe911FC
</code></pre></td></tr><tr><td>Name</td><td>Nabla Main Crypto Hub WBTC Swap LP</td></tr><tr><td>Symbol</td><td>naWBTCc</td></tr><tr><td>Decimals</td><td>8</td></tr><tr><td>Asset</td><td>Wrapped Bitcoin</td></tr><tr><td>Asset address</td><td><pre><code>0xcf5a6076cfa32686c0Df13aBaDa2b40dec133F1d
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x01B0932F609caE2Ac96DaF6f2319c7dd7cEb4426
</code></pre></td></tr><tr><td>Name</td><td>Nabla Main Crypto Hub USDC Swap LP</td></tr><tr><td>Symbol</td><td>naUSDCc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD Coin</td></tr><tr><td>Asset address</td><td><pre><code>0xf817257fed379853cDe0fa4F97AB987181B1E5Ea
</code></pre></td></tr></tbody></table>
{% endtab %}

{% tab title="USDT" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Pool address</td><td><pre><code>0x356Fa6Db41717eccE81e7732A42eB4E99AE0D7D9
</code></pre></td></tr><tr><td>Name</td><td>Nabla Main Crypto Hub USDT Swap LP</td></tr><tr><td>Symbol</td><td>naUSDTc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>Tether USD</td></tr><tr><td>Asset address</td><td><pre><code>0x88b8E2161DEDC77EF4ab7585569D2415a1C1055D
</code></pre></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x124B91b1f91119Bca308Fe5013C34614da5cE186
</code></pre></td></tr><tr><td>Name</td><td>Nabla Main Crypto Hub Backstop LP</td></tr><tr><td>Symbol</td><td>naBSPc</td></tr><tr><td>Decimals</td><td>6</td></tr><tr><td>Asset</td><td>USD Coin</td></tr><tr><td>Asset address</td><td><pre><code>0xf817257fed379853cDe0fa4F97AB987181B1E5Ea
</code></pre></td></tr></tbody></table>


# Mainnet Alpha

**Nabla Mainnet Alpha** contracts are deployed to&#x20;

* [Arbitrum One (chain id: 42161)](/developers/contract-addresses/arbitrum-one)
* [Base (chain id: 8453)](/developers/contract-addresses/base-mainnet)


# Nabla Testnet Beta Contracts

**Nabla Testnet Beta** contracts are deployed to&#x20;

* [Base Sepolia (chain id: 84532)](/developers/contract-addresses/nabla-testnet-beta-contracts/base-sepolia)
* [Arbitrum Sepolia (chain id: 421614)](/developers/contract-addresses/nabla-testnet-beta-contracts/arbitrum-sepolia)


# Base Sepolia Contract Addresses

The following **Nabla Testnet Beta** contracts are deployed to Base Sepolia (chain id: 84532).

## Testnet token (ERC20)

{% tabs %}
{% tab title="EURA" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x26D2756d24264F2d1224699906D1E8A0c9E67d12
</code></pre></td></tr><tr><td>Name</td><td>EURA</td></tr><tr><td>Symbol</td><td>EURA</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="EZETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xa15E05954E22f795205A14f58C04C23a6BDF872E
</code></pre></td></tr><tr><td>Name</td><td>Renzo Restaked ETH</td></tr><tr><td>Symbol</td><td>EZETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="RETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x5d0fc519988773840d245d4A1e873266Ba1b58Ad
</code></pre></td></tr><tr><td>Name</td><td>Rocket Pool ETH</td></tr><tr><td>Symbol</td><td>RETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x0683Ecdb6D4EEd8609114A452e2e2C99c5E4fedf
</code></pre></td></tr><tr><td>Name</td><td>USDC</td></tr><tr><td>Symbol</td><td>USDC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xF1d9562D5d43b001cDCb32d16565C1aC05aa4AbE
</code></pre></td></tr><tr><td>Name</td><td>Wrapped Bitcoin</td></tr><tr><td>Symbol</td><td>WBTC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WEETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x76dB26De9E92730c24C69717741937d084858960
</code></pre></td></tr><tr><td>Name</td><td>Wrapped eETH</td></tr><tr><td>Symbol</td><td>WEETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x6E9fd273209C1DfA62a085ae017ff1bc778E4114
</code></pre></td></tr><tr><td>Name</td><td>Wrapped Ether</td></tr><tr><td>Symbol</td><td>WETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WSTETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x0b7c80AFa38775cee5518a7b7B7f61341C2D4a73
</code></pre></td></tr><tr><td>Name</td><td>Wrapped stETH</td></tr><tr><td>Symbol</td><td>WSTETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## **Protocol**

### Swap Pools

{% tabs %}
{% tab title="EURA" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x3a4C18104725d0593340D7b68C53D94aA85A9652
</code></pre></td></tr><tr><td>Name</td><td>Nabla EURA Swap LP</td></tr><tr><td>Symbol</td><td>naEURA</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="EZETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xBeB87C23AeB2a910c9b34569B3A97530C54EC81a
</code></pre></td></tr><tr><td>Name</td><td>Nabla EZETH Swap LP</td></tr><tr><td>Symbol</td><td>naEZETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="RETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xCFe1a83c84474B33073fC47eCd81396fa94A4ddD
</code></pre></td></tr><tr><td>Name</td><td>Nabla RETH Swap LP</td></tr><tr><td>Symbol</td><td>naRETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xe54e61792bC2154E2a0CD40546eB99e566f3fc61
</code></pre></td></tr><tr><td>Name</td><td>Nabla USDC Swap LP</td></tr><tr><td>Symbol</td><td>naUSDC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xd06897CC1e717196E8F40cc6b51549C1F8C59308
</code></pre></td></tr><tr><td>Name</td><td>Nabla WBTC Swap LP</td></tr><tr><td>Symbol</td><td>naWBTC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WEETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xbA0b4647635712CC00a67B26A317bE4271FCFb65
</code></pre></td></tr><tr><td>Name</td><td>Nabla WEETH Swap LP</td></tr><tr><td>Symbol</td><td>naWEETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xcD973a72dC2937D84774529fCFC8576dDB119926
</code></pre></td></tr><tr><td>Name</td><td>Nabla WETH Swap LP</td></tr><tr><td>Symbol</td><td>naWETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WSTETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x9af3d99355c55C39eC55624b07b4f9B99593f5eD
</code></pre></td></tr><tr><td>Name</td><td>Nabla WSTETH Swap LP</td></tr><tr><td>Symbol</td><td>naWSTETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Nabla Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xe038b5891f0429E9eddA20500329ec384f2780Ca
</code></pre></td></tr></tbody></table>

### Nabla Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xFA4e1014456C0176ECf6FfaeD15076bc138882a9
</code></pre></td></tr><tr><td>Name</td><td>Nabla USDC Backstop LP</td></tr><tr><td>Symbol</td><td>nabUSDC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>

### Pyth Adapter

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x0Aa631c47Cfe158FA6946bA60736C6e75Bfa9284
</code></pre></td></tr></tbody></table>


# Arbitrum Sepolia Contract Addresses

The following **Nabla Testnet Beta** contracts are deployed to Arbitrum Sepolia (chain id: 421614).

## Testnet token (ERC20)

{% tabs %}
{% tab title="EURA" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xAB03D94bf249260F3d8c71AE2bAf148a10442A87
</code></pre></td></tr><tr><td>Name</td><td>EURA</td></tr><tr><td>Symbol</td><td>EURA</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="EZETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x41d4EF2279fee5a76163EE2a200D42750548Ee13
</code></pre></td></tr><tr><td>Name</td><td>Renzo Restaked ETH</td></tr><tr><td>Symbol</td><td>EZETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="RSETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x0Aa631c47Cfe158FA6946bA60736C6e75Bfa9284
</code></pre></td></tr><tr><td>Name</td><td>Kelp DAO Restaked ETH</td></tr><tr><td>Symbol</td><td>RSETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xc3cc76EC127deb0CeD031901F1d7ad52ec66f66c
</code></pre></td></tr><tr><td>Name</td><td>USDC</td></tr><tr><td>Symbol</td><td>USDC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x7AaaA3d35497291e85f9B3673498AFc8Fb838147
</code></pre></td></tr><tr><td>Name</td><td>Wrapped Bitcoin</td></tr><tr><td>Symbol</td><td>WBTC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WEETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x2562b9Cb59f15624b625D2EbA5ABcfc518d28de4
</code></pre></td></tr><tr><td>Name</td><td>Wrapped eETH</td></tr><tr><td>Symbol</td><td>WEETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xeed8895B11F4EF20F9217A31707414713576C366
</code></pre></td></tr><tr><td>Name</td><td>Wrapped Ether</td></tr><tr><td>Symbol</td><td>WETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WSTETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xEc7e8eCb5dE02837696e61e152e157d884Adb689
</code></pre></td></tr><tr><td>Name</td><td>Wrapped stETH</td></tr><tr><td>Symbol</td><td>WSTETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## **Protocol**

### Swap Pools

{% tabs %}
{% tab title="EURA" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x3C409Bf021f8d48e3F0Bfc2d506b6A03C9fB9691
</code></pre></td></tr><tr><td>Name</td><td>Nabla EURA Swap LP</td></tr><tr><td>Symbol</td><td>naEURA</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="EZETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x9f233801AB2a23a096f87aA34C7c26e467Bb043B
</code></pre></td></tr><tr><td>Name</td><td>Nabla EZETH Swap LP</td></tr><tr><td>Symbol</td><td>naEZETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="RSETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x06Cfb8B80082B592E1d4d0DeDba92c3A2d09baA9
</code></pre></td></tr><tr><td>Name</td><td>Nabla RSETH Swap LP</td></tr><tr><td>Symbol</td><td>naRSETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="USDC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x2195D7d851d4EA57d61Ae309D46E70334408685e
</code></pre></td></tr><tr><td>Name</td><td>Nabla USDC Swap LP</td></tr><tr><td>Symbol</td><td>naUSDC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WBTC" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x8962b4F30a229110a80769a9766dF3B935fc9175
</code></pre></td></tr><tr><td>Name</td><td>Nabla WBTC Swap LP</td></tr><tr><td>Symbol</td><td>naWBTC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WEETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x811152ad326EBE488c76f06C644B0484C5DBC7E5
</code></pre></td></tr><tr><td>Name</td><td>Nabla WEETH Swap LP</td></tr><tr><td>Symbol</td><td>naWEETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x43d2eb72854da617c13a94752E267af9cE7bA72C
</code></pre></td></tr><tr><td>Name</td><td>Nabla WETH Swap LP</td></tr><tr><td>Symbol</td><td>naWETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}

{% tab title="WSTETH" %}

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x043ffeEeAc4fF7c541ba0EBCd15d23a4e69Db318
</code></pre></td></tr><tr><td>Name</td><td>Nabla WSTETH Swap LP</td></tr><tr><td>Symbol</td><td>naWSTETH</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Nabla Router

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0xA3B786eBEf501E74000C43477A21F96B6571C398
</code></pre></td></tr></tbody></table>

### Nabla Backstop Pool

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x0A869491aEE84d90fd9184Ec25b5F1A5E8CdED53
</code></pre></td></tr><tr><td>Name</td><td>Nabla USDC Backstop LP</td></tr><tr><td>Symbol</td><td>nabUSDC</td></tr><tr><td>Decimals</td><td>18</td></tr></tbody></table>

### Pyth Adapter

<table><thead><tr><th width="175">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Address</td><td><pre><code>0x700aF827c47f35E27A74944439d562C29b90f862
</code></pre></td></tr></tbody></table>


# Contract errors

This section contains selected, most frequently occurring errors the protocol may revert with.

## Router

### swap: EXPIRED

Thrown when the current block's timestamp is greater than the provided `_deadline` of a swap.

```solidity
require(block.timestamp <= _deadline, "RC:_swapExactTokensForTokens:EXPIRED");
```

### swap: BELOW\_MINIMUM

Thrown when the minimum acceptable output amount `_amountOutMin` of a swap is not met.

```solidity
require(amountOut >= _amountOutMin, "RC:_swapExactTokensForTokens:BELOW_MINIMUM");
```

***

## SwapPool

### withdraw: MINIMUM\_AMOUNT

Thrown when the withdraw amount `_payoutAmount` is less than the accepted minimum amount `_minimumAmount`.

```solidity
require(payoutAmount_ >= _minimumAmount, "SP:withdraw:MINIMUM_AMOUNT");
```

### backstopBurn: TIMELOCK

Thrown when the user `_owner` attempts to execute a `backstopBurn` in the same block as their last deposit, and the shares to burn exceed the balance held before that deposit.

```solidity
if (block.number == lastDepositAt[_owner]) {
    require(userBalance - lastDepositAmount[_owner] >= _sharesToBurn, "SP:backstopBurn:TIMELOCK");
}
```

### backstopBurn: INSUFFICIENT\_COVERAGE

Thrown when the coverage ratio of the swap pool is more or would still be greater than 100% for the amount of swap pool LP shares to be redeemed for backstop pool liquidity.

```solidity
require(oldReserve <= oldTotalLiabilities - amount_, "SP:backstopBurn:INSUFFICIENT_COVERAGE");
```

### backstopDrain: INSUFFICIENT\_COVERAGE

Thrown when the coverage ratio of the swap pool is less or would become lower than 100% for the amount of backstop pool LP shares to be withdrawn for swap pool liquidity.

```solidity
require(oldReserve >= oldTotalLiabilities + _amount, "SP:backstopDrain:INSUFFICIENT_COVERAGE");
```

### swap: EXCEEDS\_MAX\_COVERAGE\_RATIO

Thrown when the coverage ratio of the swap pool would exceed 200% after swap inequire(

```solidity
require(
    (oldReserve + effectiveAmount_) <= (maxCoverageRatioForSwapIn * oldTotalLiabilities) / 100,
    "SP:quoteSwapInto:EXCEEDS_MAX_COVERAGE_RATIO"
 );
```

***

## BackstopPool

### withdraw: MINIMUM\_AMOUNT

Thrown when the withdraw amount `_payoutAmount` is less than the accepted minimum amount `_minimumAmount`.

```solidity
require(payoutAmount_ >= _minimumAmount, "BC:finalizeWithdrawBackstopLiquidity:MINIMUM_AMOUNT");
```

### redeemSwapPoolShares: MIN\_AMOUNT

Thrown when the amount of the to be withdrawn backstop pool LP shares for swap pool liquidity is less the accepted minimum amount `_minAmount`.

```solidity
require(amountOut_ >= _minAmountOut, "BC:_redeemSwapPoolShares:MIN_AMOUNT");
```




---

[Next Page](/llms-full.txt/1)

