Errors
A list containing errors that exist in Marginly. Descriptions provide context, user actions mention what sort of activity might trigger said error while display message contains the information that a user sees when encountering the error.
Error | Description | User action | Display message |
---|---|---|---|
AccessDenied(); | Pool Factory error if someone invokes owner methods | ||
ExceedsLimit(); | As a result of user action token limits will be exceeded | Deposit Long Short | Pool asset limit reached. Try again later. Learn more about limits here (TBD). |
EmergencyMode(); | Only withdrawals are allowed. Action is shut down | Any action except for emergency withdraw | The Pool is in shutdown mode. Only emergency withdrawals are allowed. Learn more about the shutdown here |
Forbidden(); | Pool Factory error. Generic error e.g. when setting parameters | ||
LongEmergency(); | Withdraw from short position in emergency mode | Any action except for emergency withdraw | The Pool is in shutdown mode. Only emergency withdrawals are allowed. Learn more about the shutdown here |
Locked(); | Protection from reentrancy smart contract attack. Prevents smart contract from invoking itself | ||
LessThanMinimalAmount(); | Amount is less than minimum allowed position size | Deposit Long Short | Asset quantity has to be greater than <%limit%> <%token%> |
BadLeverage(); | Leverage exceeds maximum allowed | Long Short Withdraw | Max leverage of <%leverage%> exceeded. Please adjust trade parameters and try again. |
NotLiquidatable(); | Keeper fails to receiveposition() with normal leverage | ||
NotOwner(); | pool error: non-owner invokes owner methods | ||
NotWETH9(); | When the asset is not from WETH9 contract. Can appear during wrap/unwrap | ||
PoolAlreadyCreated(); | This pool already exists | ||
PositionInitialized(); | Appears only in the receiveposition() | ||
ShortEmergency(); | Withdraw from long position in emergency mode | Any action except for emergency withdraw | The Pool is in shutdown mode. Only emergency withdrawals are allowed. Learn more about the shutdown here |
SlippageLimit(); | exchange exceeded the slippage limit. can trigger other router errors: - InsufficientAmount: swapexactinput with bad price - TooMuchRequested: swapexactoutput with bad price | Long Short Close Liquidate | Slippage limit of <%slippage%> exceeded. Please adjust the trade parameters and try again. |
NotEmergency(); | emergency withdrawal when not in shutdown. | ||
UninitializedPosition(); | when withdrawing from an empty position | ||
UniswapPoolNotFound(); | pool factory error: there is no corresponding uniswap pool | ||
UnknownCall(); | decoding-related error | ||
WrongIndex(); | heap access error | ||
WrongPositionType(); | long/short/withdraw/close using unsupported collateral | Long Short Withdraw Close | Can’t long <base_token> with <quote_token as margin> Can’t short <base_token> with <base_token as margin> Can’t withdraw debt. |
WrongValue(); | pool factory: wrong parameter value when creating a pool | ||
ZeroAmount(); | when depositing/withdrawing 0 amount router: when exchange amount is 0 | Can’t deposit/withdraw/exchange 0 tokens. | |
STF | safe transfer if no approval or insufficient balance. router: not enough money in marginly pool | Insufficient pool balance to perform the transaction. | |
ST | pool doesn’t have a balance. router: dex is sending wrong amounts | Insufficient pool balance to perform the transaction. | |
STE | same as ST but for ETH. | Insufficient pool balance to perform the transaction. | |
UnknownDex | router can’t find dex | ||
Forbidden | generic error when setting router parameters. | ||
UnknownPool | router error: no Pool on target DEX with specified tokens | ||
WrongAmountOut | router error: dex amount doesn't match expected amount |
Last updated