IVault
Inherits: ISolidStateERC4626
Functions
updateSettings
Updates the vault settings
function updateSettings(bytes memory settings) external;
Parameters
Name | Type | Description |
---|---|---|
settings | bytes | Encoding 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
Name | Type | Description |
---|---|---|
poolKey | IPoolFactory.PoolKey | The option pool key |
size | UD60x18 | The size of the trade |
isBuy | bool | Whether the trade is a buy or sell |
taker | address | The address of the taker |
Returns
Name | Type | Description |
---|---|---|
premium | uint256 | The 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
Name | Type | Description |
---|---|---|
poolKey | IPoolFactory.PoolKey | The option pool key |
size | UD60x18 | The size of the trade |
isBuy | bool | Whether the trade is a buy or sell |
premiumLimit | uint256 | The premium limit of the trade |
referrer | address | The address of the referrer |
getUtilisation
Returns the utilisation rate of the vault
function getUtilisation() external view returns (UD60x18);
Returns
Name | Type | Description |
---|---|---|
<none> | UD60x18 | The 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();