IVault

Git Source

Inherits: ISolidStateERC4626

Functions

updateSettings

Updates the vault settings

function updateSettings(bytes memory settings) external;

Parameters

NameTypeDescription
settingsbytesEncoding of the new settings

getSettings

Return vault abi encoded vault settings

function getSettings() external view returns (bytes memory);

getQuote

Returns the trade quote premium

function getQuote(IPoolFactory.PoolKey calldata poolKey, UD60x18 size, bool isBuy, address taker)
    external
    view
    returns (uint256 premium);

Parameters

NameTypeDescription
poolKeyIPoolFactory.PoolKeyThe option pool key
sizeUD60x18The size of the trade
isBuyboolWhether the trade is a buy or sell
takeraddressThe address of the taker

Returns

NameTypeDescription
premiumuint256The trade quote premium

trade

Executes a trade with the vault

function trade(IPoolFactory.PoolKey calldata poolKey, UD60x18 size, bool isBuy, uint256 premiumLimit, address referrer)
    external;

Parameters

NameTypeDescription
poolKeyIPoolFactory.PoolKeyThe option pool key
sizeUD60x18The size of the trade
isBuyboolWhether the trade is a buy or sell
premiumLimituint256The premium limit of the trade
referreraddressThe address of the referrer

getUtilisation

Returns the utilisation rate of the vault

function getUtilisation() external view returns (UD60x18);

Returns

NameTypeDescription
<none>UD60x18The utilisation rate of the vault

Events

UpdateQuotes

event UpdateQuotes();

PricePerShare

event PricePerShare(UD60x18 pricePerShare);

Trade

event Trade(
    address indexed user,
    address indexed pool,
    UD60x18 contractSize,
    bool isBuy,
    UD60x18 premium,
    UD60x18 takerFee,
    UD60x18 makerRebate,
    UD60x18 vaultFee
);

Settle

event Settle(address indexed pool, UD60x18 contractSize, UD60x18 fee);

ManagementFeePaid

event ManagementFeePaid(address indexed recipient, uint256 managementFee);

PerformanceFeePaid

event PerformanceFeePaid(address indexed recipient, uint256 performanceFee);

ClaimProtocolFees

event ClaimProtocolFees(address indexed feeReceiver, uint256 feesClaimed);

UpdateSettings

event UpdateSettings(bytes settings);

Errors

Vault__AboveMaxSlippage

error Vault__AboveMaxSlippage(UD60x18 totalPremium, UD60x18 premiumLimit);

Vault__AddressZero

error Vault__AddressZero();

Vault__InsufficientFunds

error Vault__InsufficientFunds();

Vault__InsufficientShorts

error Vault__InsufficientShorts();

Vault__InvalidSettingsUpdate

error Vault__InvalidSettingsUpdate();

Vault__InvariantViolated

error Vault__InvariantViolated();

Vault__MaximumAmountExceeded

error Vault__MaximumAmountExceeded(UD60x18 maximum, UD60x18 amount);

Vault__NotAuthorized

error Vault__NotAuthorized();

Vault__OptionExpired

error Vault__OptionExpired(uint256 timestamp, uint256 maturity);

Vault__OptionPoolNotListed

error Vault__OptionPoolNotListed();

Vault__OptionTypeMismatchWithVault

error Vault__OptionTypeMismatchWithVault();

Vault__OutOfDeltaBounds

error Vault__OutOfDeltaBounds();

Vault__OutOfDTEBounds

error Vault__OutOfDTEBounds();

Vault__SellDisabled

error Vault__SellDisabled();

Vault__SettingsNotFromRegistry

error Vault__SettingsNotFromRegistry();

Vault__SettingsUpdateIsEmpty

error Vault__SettingsUpdateIsEmpty();

Vault__StrikeZero

error Vault__StrikeZero();

Vault__TradeMustBeBuy

error Vault__TradeMustBeBuy();

Vault__TransferExceedsBalance

error Vault__TransferExceedsBalance(UD60x18 balance, UD60x18 amount);

Vault__ZeroAsset

error Vault__ZeroAsset();

Vault__ZeroShares

error Vault__ZeroShares();

Vault__ZeroSize

error Vault__ZeroSize();