Nabla Docs
  • Nabla Finance
    • The problem Nabla solves
    • Benefits of using Nabla
  • Protocol Overview
    • Swap Algorithm
    • Liquidity Pools
      • Swap Pools
      • Backstop Pool
    • Oracle Details
      • Architecture
      • Pyth
      • Chainlink
      • EV:GO
  • Roadmap
  • Protocol-owned Liquidity (POL)
    • Trading Fees and LP Incentives
    • Nabla as an autonomous protocol
  • Security
    • Audits
    • Bug Bounty Program
  • Mainnet Alpha
    • Risks and Benefits of being a Mainnet Alpha LP
  • Monad Testnet
    • Add Monad Testnet to Metamask
    • Get Monad Test Tokens
    • Monad Testnet Tasks
  • Testnet Beta
    • Connect Wallet to Base Sepolia
    • Testnet Beta Tasks
    • Obtaining Base Sepolia Ether for Gas
    • Test Assets
    • Connect Wallet to Base Sepolia Testnet
    • Performing a Swap
    • Managing Swap Pool Liquidity
    • Redeem Swap Pool Shares via Backstop Pool
    • Managing Backstop Pool Liquidity
    • Withdraw Backstop Pool Liquidity via Excess Swap Pool
  • Testnet Alpha
    • Testnet Alpha Results
    • Whitelisting for testnet
      • Whitelist Campaigns List
      • $PYTH Stakers Whitelist
    • Connect Wallet to Sepolia Testnet
    • Requesting Testnet Gas
    • How to contribute to testing
    • Performing a Swap
    • Managing Swap Pool Liquidity
    • How to swap into a swap pool that is depleted
    • Managing Backstop Pool Liquidity
    • Redeem Swap Pool Shares via Backstop Pool
    • Withdraw Backstop Pool Liquidity via Excess Swap Pool
  • Liquidity Provision
  • $NABLA
    • $sNABLA Token Utility
    • Staking Mechanism
    • Fee Distribution
    • Tokenomics
    • Token Utility Summary
    • Governance
      • Initial Governance Implementation
      • Governance structure
      • Discussion and Proposal process
      • Voting process
      • Transparency and record-keeping
      • Code of conduct
      • Amendments to the Governance Framework
      • Template for a vote
  • $AMBER Onchain Points Program
    • Mainnet Alpha Rewards
      • Arbitrum-Mainnet Alpha Rewards
      • Base-Mainnet Alpha Rewards
    • $AMBER FAQ
  • 💻Developers
    • Integration Guide
    • NablaPortal
    • NablaRouter
    • SwapPool
    • GenericPool
    • NablaBackstopPool
    • PythAdapter
    • ISlippageCurve
    • Contract addresses
      • Arbitrum One
      • Base
      • Monad Testnet
    • Contract errors
  • Community
    • Linktree
    • Twitter
    • Discord
    • Telegram
  • Whitepaper
  • Legal
    • Privacy Policy
    • Terms of Service
Powered by GitBook
On this page
  • Router
  • swap: EXPIRED
  • swap: BELOW_MINIMUM
  • SwapPool
  • withdraw: MINIMUM_AMOUNT
  • backstopBurn: TIMELOCK
  • backstopBurn: INSUFFICIENT_COVERAGE
  • backstopDrain: INSUFFICIENT_COVERAGE
  • swap: EXCEEDS_MAX_COVERAGE_RATIO
  • BackstopPool
  • withdraw: MINIMUM_AMOUNT
  • redeemSwapPoolShares: MIN_AMOUNT
  1. Developers

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.

require(block.timestamp <= _deadline, "RC:_swapExactTokensForTokens:EXPIRED");

swap: BELOW_MINIMUM

Thrown when the minimum acceptable output amount _amountOutMin of a swap is not met.

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.

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.

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.

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.

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(

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.

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.

require(amountOut_ >= _minAmountOut, "BC:_redeemSwapPoolShares:MIN_AMOUNT");
PreviousMonad TestnetNextCommunity

Last updated 8 months ago

💻