IVPoolWrapper
InitializeVPoolWrapperParams
SwapResult
WrapperValuesInside
Swap
Emitted whenever a swap takes place
Name | Type | Description |
swapResult | struct IVPoolWrapper.SwapResult | the swap result values |
Mint
Emitted whenever liquidity is added
Name | Type | Description |
tickLower | int24 | the lower tick of the range |
tickUpper | int24 | the upper tick of the range |
liquidity | uint128 | the amount of liquidity that was added |
vTokenPrincipal | uint256 | the amount of vToken that was sent to UniswapV3Pool |
vQuotePrincipal | uint256 | the mount of vQuote charged was sent to UniswapV3Pool |
Burn
Emitted whenever liquidity is removed
Name | Type | Description |
tickLower | int24 | the lower tick of the range |
tickUpper | int24 | the upper tick of the range |
liquidity | uint128 | the amount of liquidity that was removed |
vTokenPrincipal | uint256 | the amount of vToken that was received from UniswapV3Pool |
vQuotePrincipal | uint256 | the mount of vQuote charged was received from UniswapV3Pool |
AccruedProtocolFeeCollected
Emitted whenever clearing house enquired about the accrued protocol fees
Name | Type | Description |
amount | uint256 | the amount of accrued protocol fees |
LiquidityFeeUpdated
Emitted when governance updates the liquidity fees
Name | Type | Description |
liquidityFeePips | uint24 | the new liquidity fee ratio |
ProtocolFeeUpdated
Emitted when governance updates the protocol fees
Name | Type | Description |
protocolFeePips | uint24 | the new protocol fee ratio |
FundingRateOverrideUpdated
Emitted when funding rate override is updated
Name | Type | Description |
fundingRateOverrideX128 | int256 | the new funding rate override value |
initialize
vPool
getValuesInside
getExtrapolatedValuesInside
swap
mint
burn
getSumAX128
getExtrapolatedSumAX128
liquidityFeePips
protocolFeePips
updateGlobalFundingState
Used by clearing house to update funding rate when clearing house is paused or unpaused.
Name | Type | Description |
useZeroFundingRate | bool | |
collectAccruedProtocolFee
Used by clearing house to know how much protocol fee was collected.
Does not do any token transfer, just reduces the state in wrapper by accruedProtocolFeeLast. Clearing house already has the amount of settlement tokens to send to treasury.
Name | Type | Description |
accruedProtocolFeeLast | uint256 | amount of protocol fees accrued since last collection. |