Skip to main content

Errors.sol

Errors

This library provides a set of error codes as string constants for handling exceptions and revert messages in the library.

NOT_ENOUGH_FREE_LIQUIDITY

string NOT_ENOUGH_FREE_LIQUIDITY

Error code indicating that there is not enough free liquidity available in liquidity pool when open a new poisition.

TOO_SMALL_AMOUNT

string TOO_SMALL_AMOUNT

Error code indicating that the specified amount is too small when add liquidity to each bin.

INVALID_ORACLE_VERSION

string INVALID_ORACLE_VERSION

Error code indicating that the provided oracle version is invalid or unsupported.

EXCEED_MARGIN_RANGE

string EXCEED_MARGIN_RANGE

Error code indicating that the specified value exceeds the allowed margin range when claim a position.

UNSUPPORTED_TRADING_FEE_RATE

string UNSUPPORTED_TRADING_FEE_RATE

Error code indicating that the provided trading fee rate is not supported.

ALREADY_REGISTERED_ORACLE_PROVIDER

string ALREADY_REGISTERED_ORACLE_PROVIDER

Error code indicating that the oracle provider is already registered.

ALREADY_REGISTERED_TOKEN

string ALREADY_REGISTERED_TOKEN

Error code indicating that the settlement token is already registered.

UNREGISTERED_TOKEN

string UNREGISTERED_TOKEN

Error code indicating that the settlement token is not registered.

INTEREST_RATE_NOT_INITIALIZED

string INTEREST_RATE_NOT_INITIALIZED

Error code indicating that the interest rate has not been initialized.

INTEREST_RATE_OVERFLOW

string INTEREST_RATE_OVERFLOW

Error code indicating that the provided interest rate exceeds the maximum allowed rate.

INTEREST_RATE_PAST_TIMESTAMP

string INTEREST_RATE_PAST_TIMESTAMP

Error code indicating that the provided timestamp for an interest rate is in the past.

INTEREST_RATE_NOT_APPENDABLE

string INTEREST_RATE_NOT_APPENDABLE

Error code indicating that the provided interest rate record cannot be appended to the existing array.

INTEREST_RATE_ALREADY_APPLIED

string INTEREST_RATE_ALREADY_APPLIED

Error code indicating that an interest rate has already been applied and cannot be modified further.

UNSETTLED_POSITION

string UNSETTLED_POSITION

Error code indicating that the position is unsettled.

INVALID_POSITION_QTY

string INVALID_POSITION_QTY

Error code indicating that the position quantity is invalid.

NOT_POSITIVE_PRICE

string NOT_POSITIVE_PRICE

Error code indicating that the oracle price is not positive.