Lyra Documentation
Search…
Common Revert Scenarios
Below are common Custom Errors thrown when opening/closing/modifying a position:
custom error
contract
description
TotalCostOutsideOfSpecifiedBounds
OptionMarket
totalCost < minCost or > maxCost
ExpectedNonZeroValue
OptionMarket
iterations or strikeId cannot be 0
BoardIsFrozen
OptionMarket
admin has frozen board
BoardExpired
OptionMarket
listing expiry < block.timestamp
insufficient funds
ERC20
LP has insufficient liquidity or trader does not have enough funds
TradeDeltaOutOfRange
OptionMarketPricer
opening/closing outside of delta range, use forceClose to bypass
ForceCloseDeltaOutOfRange
OptionMarketPricer
force closing outside the forceCloseDeltaRange, use forceClose to bypass
TradingCutoffReached
OptionMarketPricer
opening/closing too close to expiry, use forceClose to bypass
AdjustmentResultsInMinimumCollateralNotBeingMet
OptionToken
new collateral < minimum required collateral
FullyClosingWithNonZeroSetCollateral
OptionToken
when fully closing setCollateralTo must equal 0
OnlyOwnerCanAdjustPosition
OptionToken
position.owner must equal msg.sender
CannotAdjustInvalidPosition
OptionToken
position.state must be ACTIVE or TradeInputParameters do no match positionId
BoardMustBeSettled
ShortCollateral
OptionMarket.settleBoard has not been called
Copy link