# 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="https://2223424694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfkRIRXXDRgRsfqWdpEWU%2Fuploads%2Fz7Bm9cPTRRZYkh7YlQ34%2F20251128_NablaOverview.png?alt=media&#x26;token=5b7c0bbb-2e30-43ee-9e87-a61f6bdf6dd9" 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](https://docs.nabla.fi/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="developers/contract-interfaces/nablaportal" %}
[nablaportal](https://docs.nabla.fi/developers/contract-interfaces/nablaportal)
{% endcontent-ref %}

### Nabla Router

The [NablaRouter](https://docs.nabla.fi/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="developers/contract-interfaces/nablarouter" %}
[nablarouter](https://docs.nabla.fi/developers/contract-interfaces/nablarouter)
{% endcontent-ref %}

### Nabla Backstop Pool

The [NablaBackstopPool](https://docs.nabla.fi/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](https://docs.nabla.fi/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="developers/contract-interfaces/nablabackstoppool" %}
[nablabackstoppool](https://docs.nabla.fi/developers/contract-interfaces/nablabackstoppool)
{% endcontent-ref %}

### Swap Pool

The [SwapPool](https://docs.nabla.fi/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](https://docs.nabla.fi/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="developers/contract-interfaces/swappool" %}
[swappool](https://docs.nabla.fi/developers/contract-interfaces/swappool)
{% endcontent-ref %}
