Contract 0x0000000000f0021d219C5AE2Fd5b261966012Dd7 2

 
Txn Hash Method
Index
From
To
Value
0x0bd62ed8d68cee385066fb0816666d979530b420c618a91411b0f57de69b3e72Estimate24H124974652022-06-20 19:11:3512 days 8 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0000849964150.001
0x932150d2e8042020e4ce892fa8a6bc46baaf9bca9f4d010333f0c5bea3d059aaEstimate24H123624192022-06-19 15:16:1413 days 12 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001043524690.001
0x676b71bcd1c7bbffb806e2c81f5f993832f6fa7a0d3384c52f8c4a1b08586ca3Cache Metadata F...123624012022-06-19 15:15:5813 days 12 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001037991560.001
0x73bed7b83197a037323dfa046ac2706e5300c392d8307a630ca35e80635bbb58Estimate24H123623902022-06-19 15:15:4313 days 12 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.000104340860.001
0x6e8d3dd01b7c9676eb723f8a899f47e97567af052f9d434a4682a5acf742c49cEstimate24H121663212022-06-17 19:31:4115 days 8 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001603767250.001
0x3d4d709bbd8e3e59eae23669887d640835f21061a3dc59a61116fe0fb37bd755Cache Metadata F...121663172022-06-17 19:31:2615 days 8 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001596066050.001
0xbdd84396d87e233cfddbd7c599803a489881a509672c3f80aceb718e39c76a1eEstimate24H121663022022-06-17 19:31:1015 days 8 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.000160375270.001
0xed3a6410d226d213d44b6b306bbc87e5135a17948f71c76064ce8675eb5739f8Estimate24H120735832022-06-16 20:36:4416 days 7 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001479552950.001
0x83be2ed21612b8a92661626c3e8053acc4a94c4e64c88c29716acf98738ca24fEstimate24H119830682022-06-16 2:56:1917 days 42 mins ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0000792249060.001
0x53f3dd884d0c5890f2b9ff575f4ae69c2c4004841ff91af23cf8338be769065cEstimate24H117784712022-06-14 18:36:0418 days 9 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001557933590.001
0x8a3a363122cf18915bcd4d567f4f785e1e8140b0bac4db3a08db9460cb43b7c3Estimate24H116225422022-06-13 19:42:1819 days 7 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001722204250.001
0x6d3e881083b0f5d136e59b7bdea7a5091d21d46cb6db7c9caf5708334105dab3Estimate24H110993262022-06-10 1:19:3223 days 2 hrs ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0002568074080.001
0xcb546098a7c18742e4ffb9d0401fb8252dbceee562c51ee3c3ce9ab5ed0da427Estimate24H110160592022-06-09 3:11:5524 days 27 mins ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0002060564260.001
0x7b8232dd92903cb4a4336b08a82cc017d855a8cdbe685b5bbfbd28b6f420b4f6Estimate24H110159682022-06-09 3:10:3624 days 28 mins ago0x2b6dbde60278f19c742bd6861aa39e0a565f5aa3 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0002298308360.001
0x9c5eaeb099948cbcf63ba7de885f48c426f32806e4609334a593f2217d11f7dcEstimate24H109082022022-06-08 3:42:4524 days 23 hrs ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0003284927150.001
0x65b188d10a2dfbe8d52fc795aadc950f1fb1a375b40cdb044dea327712ddd6deEstimate24H108070252022-06-07 5:01:1425 days 22 hrs ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0002019010720.001
0x62a8a60adf0a9b804b3c491ed0b442d9f50b3a6b56c5b0a21b96e3220109302dCache Metadata F...108069962022-06-07 5:00:5925 days 22 hrs ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001742794020.001
0xfe09a6081ba91e98985968abf7fa6058d4f1bb35c7abbc7e724e2f5f8570397fCache Metadata F...107998622022-06-07 3:11:3526 days 27 mins ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001607300130.001
0x91e41fdcd1f3e44717a8df09a752e6ec2c0abc4804d35864cc0b9b41579107d2Estimate24H107989882022-06-07 2:59:3726 days 39 mins ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001685828180.001
0x450f0c1a47f5397803e28ae3ecb9875b7e1a33e79031139adc31cebdecc9554eCache Metadata F...107989432022-06-07 2:58:5126 days 40 mins ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001327242520.001
0xdd0d98957ce81e3c95f9815ac12a866d384b16a54fa26ad710d8b1179fea5387Estimate24H107104382022-06-06 5:34:1126 days 22 hrs ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001423648950.001
0x13c79c01b55c32498d7063b183d626153d43695c89a4ca182f1bf9219811e59fEstimate24H106967822022-06-06 2:38:5627 days 1 hr ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001643469980.001
0x13d30de61297308ce417a3210a5fb3114c6ceacab61cd440bdef98ae652e6e98Estimate24H106903492022-06-06 1:28:1927 days 2 hrs ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0002385234470.001
0xc712389ef4020ab6990a9834e118ffd82b8c3010ea2bcf1331d8c13a673d8c12Estimate24H104679142022-06-03 18:58:4029 days 8 hrs ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0001733357610.001
0xc53089b2d884ba76c57de8e053ce0a36903872b1074d9eb265036dbe400b6274Estimate24H103896402022-06-03 6:32:5929 days 21 hrs ago0x3601ccd1f6843cd1073f2f769f70905656168ef0 IN  0x0000000000f0021d219c5ae2fd5b261966012dd70 Ether0.0003225499640.001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x0bd62ed8d68cee385066fb0816666d979530b420c618a91411b0f57de69b3e72124974652022-06-20 19:11:3512 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x0bd62ed8d68cee385066fb0816666d979530b420c618a91411b0f57de69b3e72124974652022-06-20 19:11:3512 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x0bd62ed8d68cee385066fb0816666d979530b420c618a91411b0f57de69b3e72124974652022-06-20 19:11:3512 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x0bd62ed8d68cee385066fb0816666d979530b420c618a91411b0f57de69b3e72124974652022-06-20 19:11:3512 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x0bd62ed8d68cee385066fb0816666d979530b420c618a91411b0f57de69b3e72124974652022-06-20 19:11:3512 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x932150d2e8042020e4ce892fa8a6bc46baaf9bca9f4d010333f0c5bea3d059aa123624192022-06-19 15:16:1413 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x932150d2e8042020e4ce892fa8a6bc46baaf9bca9f4d010333f0c5bea3d059aa123624192022-06-19 15:16:1413 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x932150d2e8042020e4ce892fa8a6bc46baaf9bca9f4d010333f0c5bea3d059aa123624192022-06-19 15:16:1413 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x932150d2e8042020e4ce892fa8a6bc46baaf9bca9f4d010333f0c5bea3d059aa123624192022-06-19 15:16:1413 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x932150d2e8042020e4ce892fa8a6bc46baaf9bca9f4d010333f0c5bea3d059aa123624192022-06-19 15:16:1413 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x676b71bcd1c7bbffb806e2c81f5f993832f6fa7a0d3384c52f8c4a1b08586ca3123624012022-06-19 15:15:5813 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x676b71bcd1c7bbffb806e2c81f5f993832f6fa7a0d3384c52f8c4a1b08586ca3123624012022-06-19 15:15:5813 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x676b71bcd1c7bbffb806e2c81f5f993832f6fa7a0d3384c52f8c4a1b08586ca3123624012022-06-19 15:15:5813 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x676b71bcd1c7bbffb806e2c81f5f993832f6fa7a0d3384c52f8c4a1b08586ca3123624012022-06-19 15:15:5813 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x73bed7b83197a037323dfa046ac2706e5300c392d8307a630ca35e80635bbb58123623902022-06-19 15:15:4313 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x73bed7b83197a037323dfa046ac2706e5300c392d8307a630ca35e80635bbb58123623902022-06-19 15:15:4313 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x73bed7b83197a037323dfa046ac2706e5300c392d8307a630ca35e80635bbb58123623902022-06-19 15:15:4313 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x73bed7b83197a037323dfa046ac2706e5300c392d8307a630ca35e80635bbb58123623902022-06-19 15:15:4313 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x73bed7b83197a037323dfa046ac2706e5300c392d8307a630ca35e80635bbb58123623902022-06-19 15:15:4313 days 12 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x6e8d3dd01b7c9676eb723f8a899f47e97567af052f9d434a4682a5acf742c49c121663212022-06-17 19:31:4115 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x6e8d3dd01b7c9676eb723f8a899f47e97567af052f9d434a4682a5acf742c49c121663212022-06-17 19:31:4115 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x6e8d3dd01b7c9676eb723f8a899f47e97567af052f9d434a4682a5acf742c49c121663212022-06-17 19:31:4115 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x6e8d3dd01b7c9676eb723f8a899f47e97567af052f9d434a4682a5acf742c49c121663212022-06-17 19:31:4115 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x6e8d3dd01b7c9676eb723f8a899f47e97567af052f9d434a4682a5acf742c49c121663212022-06-17 19:31:4115 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
0x3d4d709bbd8e3e59eae23669887d640835f21061a3dc59a61116fe0fb37bd755121663172022-06-17 19:31:2615 days 8 hrs ago 0x0000000000f0021d219c5ae2fd5b261966012dd70x85149247691df622eaf1a8bd0cafd40bc45154a90 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VolatilityOracle

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at optimistic.etherscan.io on 2022-06-03
*/

// Verified using https://dapp.tools

// hevm: flattened sources of contracts/VolatilityOracle.sol
// SPDX-License-Identifier: AGPL-3.0-only AND MIT AND GPL-2.0-or-later
pragma solidity >=0.5.0 >=0.8.0 >=0.8.10 <0.9.0;

////// lib/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol
/* pragma solidity >=0.5.0; */

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}

////// lib/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol
/* pragma solidity >=0.5.0; */

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

////// lib/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol
/* pragma solidity >=0.5.0; */

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}

////// lib/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol
/* pragma solidity >=0.5.0; */

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

////// lib/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol
/* pragma solidity >=0.5.0; */

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

////// lib/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol
/* pragma solidity >=0.5.0; */

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return _liquidity The amount of liquidity in the position,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 _liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

////// lib/v3-core/contracts/interfaces/IUniswapV3Pool.sol
/* pragma solidity >=0.5.0; */

/* import './pool/IUniswapV3PoolImmutables.sol'; */
/* import './pool/IUniswapV3PoolState.sol'; */
/* import './pool/IUniswapV3PoolDerivedState.sol'; */
/* import './pool/IUniswapV3PoolActions.sol'; */
/* import './pool/IUniswapV3PoolOwnerActions.sol'; */
/* import './pool/IUniswapV3PoolEvents.sol'; */

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolEvents
{

}

////// contracts/interfaces/IVolatilityOracle.sol
/* pragma solidity ^0.8.10; */

/* import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol"; */

interface IVolatilityOracle {
    /**
     * @notice Accesses the most recently stored metadata for a given Uniswap pool
     * @dev These values may or may not have been initialized and may or may not be
     * up to date. `tickSpacing` will be non-zero if they've been initialized.
     * @param pool The Uniswap pool for which metadata should be retrieved
     * @return maxSecondsAgo The age of the oldest observation in the pool's oracle
     * @return gamma0 The pool fee minus the protocol fee on token0, scaled by 1e6
     * @return gamma1 The pool fee minus the protocol fee on token1, scaled by 1e6
     * @return tickSpacing The pool's tick spacing
     */
    function cachedPoolMetadata(IUniswapV3Pool pool)
        external
        view
        returns (
            uint32 maxSecondsAgo,
            uint24 gamma0,
            uint24 gamma1,
            int24 tickSpacing
        );

    /**
     * @notice Accesses any of the 25 most recently stored fee growth structs
     * @dev The full array (idx=0,1,2...24) has data that spans *at least* 24 hours
     * @param pool The Uniswap pool for which fee growth should be retrieved
     * @param idx The index into the storage array
     * @return feeGrowthGlobal0X128 Total pool revenue in token0, as of timestamp
     * @return feeGrowthGlobal1X128 Total pool revenue in token1, as of timestamp
     * @return timestamp The time at which snapshot was taken and stored
     */
    function feeGrowthGlobals(IUniswapV3Pool pool, uint256 idx)
        external
        view
        returns (
            uint256 feeGrowthGlobal0X128,
            uint256 feeGrowthGlobal1X128,
            uint32 timestamp
        );

    /**
     * @notice Returns indices that the contract will use to access `feeGrowthGlobals`
     * @param pool The Uniswap pool for which array indices should be fetched
     * @return read The index that was closest to 24 hours old last time `estimate24H` was called
     * @return write The index that was written to last time `estimate24H` was called
     */
    function feeGrowthGlobalsIndices(IUniswapV3Pool pool) external view returns (uint8 read, uint8 write);

    /**
     * @notice Updates cached metadata for a Uniswap pool. Must be called at least once
     * in order for volatility to be determined. Should also be called whenever
     * protocol fee changes
     * @param pool The Uniswap pool to poke
     */
    function cacheMetadataFor(IUniswapV3Pool pool) external;

    /**
     * @notice Provides multiple estimates of IV using all stored `feeGrowthGlobals` entries for `pool`
     * @dev This is not meant to be used on-chain, and it doesn't contribute to the oracle's knowledge.
     * Please use `estimate24H` instead.
     * @param pool The pool to use for volatility estimate
     * @return IV The array of volatility estimates, scaled by 1e18
     */
    function lens(IUniswapV3Pool pool) external view returns (uint256[25] memory IV);

    /**
     * @notice Estimates 24-hour implied volatility for a Uniswap pool.
     * @param pool The pool to use for volatility estimate
     * @return IV The estimated volatility, scaled by 1e18
     */
    function estimate24H(IUniswapV3Pool pool) external returns (uint256 IV);
}

////// contracts/libraries/FullMath.sol
/* pragma solidity ^0.8.10; */

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // Handle division by zero
        require(denominator != 0);

        // 512-bit multiply [prod1 prod0] = a * b
        // Compute the product mod 2**256 and mod 2**256 - 1
        // then use the Chinese Remainder Theorem to reconstruct
        // the 512 bit result. The result is stored in two 256
        // variables such that product = prod1 * 2**256 + prod0
        uint256 prod0; // Least significant 256 bits of the product
        uint256 prod1; // Most significant 256 bits of the product
        assembly {
            let mm := mulmod(a, b, not(0))
            prod0 := mul(a, b)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Short circuit 256 by 256 division
        // This saves gas when a * b is small, at the cost of making the
        // large case a bit more expensive. Depending on your use case you
        // may want to remove this short circuit and always go through the
        // 512 bit path.
        if (prod1 == 0) {
            assembly {
                result := div(prod0, denominator)
            }
            return result;
        }

        ///////////////////////////////////////////////
        // 512 by 256 division.
        ///////////////////////////////////////////////

        // Handle overflow, the result must be < 2**256
        require(prod1 < denominator);

        // Make division exact by subtracting the remainder from [prod1 prod0]
        // Compute remainder using mulmod
        // Note mulmod(_, _, 0) == 0
        uint256 remainder;
        assembly {
            remainder := mulmod(a, b, denominator)
        }
        // Subtract 256 bit number from 512 bit number
        assembly {
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator
        // Compute largest power of two divisor of denominator.
        // Always >= 1.
        unchecked {
            // https://ethereum.stackexchange.com/a/96646
            uint256 twos = (type(uint256).max - denominator + 1) & denominator;
            // Divide denominator by power of two
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            // If denominator is zero the inverse starts with 2
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256
            // If denominator is zero, inv is now 128

            // Because the division is now exact we can divide by multiplying
            // with the modular inverse of denominator. This will give us the
            // correct result modulo 2**256. Since the precoditions guarantee
            // that the outcome is less than 2**256, this is the final result.
            // We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inv;
            return result;
        }
    }

    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    function mulDivRoundingUp(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        result = mulDiv(a, b, denominator);
        if (mulmod(a, b, denominator) > 0) {
            require(result < type(uint256).max);
            result++;
        }
    }
}

////// contracts/libraries/TickMath.sol
/* pragma solidity ^0.8.10; */

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
    int24 internal constant MIN_TICK = -887272;
    /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
    int24 internal constant MAX_TICK = -MIN_TICK;

    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;

    /// @notice Calculates sqrt(1.0001^tick) * 2^96
    /// @dev Throws if |tick| > max tick
    /// @param tick The input tick for the above formula
    /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
    /// at the given tick
    function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {
        uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));
        require(absTick <= uint256(uint24(MAX_TICK)), "T");

        uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000;
        unchecked {
            if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
            if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
            if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
            if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
            if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
            if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
            if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
            if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
            if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
            if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
            if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
            if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
            if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
            if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
            if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
            if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
            if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
            if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
            if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;

            if (tick > 0) ratio = type(uint256).max / ratio;

            // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
            // we then downcast because we know the result always fits within 160 bits due to our tick input constraint
            // we round up in the division so getTickAtSqrtRatio of the output price is always consistent
            sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
        }
    }

    /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
    /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
    /// ever return.
    /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96
    /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
    function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {
        // second inequality must be < because the price can never reach the price at the max tick
        require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, "R");
        uint256 ratio = uint256(sqrtPriceX96) << 32;

        uint256 r = ratio;
        uint256 msb = 0;

        assembly {
            let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(5, gt(r, 0xFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(4, gt(r, 0xFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(3, gt(r, 0xFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(2, gt(r, 0xF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(1, gt(r, 0x3))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := gt(r, 0x1)
            msb := or(msb, f)
        }

        if (msb >= 128) r = ratio >> (msb - 127);
        else r = ratio << (127 - msb);

        int256 log_2 = (int256(msb) - 128) << 64;

        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(63, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(62, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(61, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(60, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(59, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(58, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(57, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(56, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(55, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(54, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(53, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(52, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(51, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(50, f))
        }

        int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number

        int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);
        int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);

        tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;
    }

    /// @notice Rounds down to the nearest tick where tick % tickSpacing == 0
    /// @param tick The tick to round
    /// @param tickSpacing The tick spacing to round to
    /// @return the floored tick
    /// @dev Ensure tick +/- tickSpacing does not overflow or underflow int24
    function floor(int24 tick, int24 tickSpacing) internal pure returns (int24) {
        int24 mod = tick % tickSpacing;

        unchecked {
            if (mod >= 0) return tick - mod;
            return tick - mod - tickSpacing;
        }
    }

    /// @notice Rounds up to the nearest tick where tick % tickSpacing == 0
    /// @param tick The tick to round
    /// @param tickSpacing The tick spacing to round to
    /// @return the ceiled tick
    /// @dev Ensure tick +/- tickSpacing does not overflow or underflow int24
    function ceil(int24 tick, int24 tickSpacing) internal pure returns (int24) {
        int24 mod = tick % tickSpacing;

        unchecked {
            if (mod > 0) return tick - mod + tickSpacing;
            return tick - mod;
        }
    }
}

////// contracts/libraries/Oracle.sol
/* pragma solidity ^0.8.10; */

/* import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol"; */

/* import "./FullMath.sol"; */
/* import "./TickMath.sol"; */

/// @title Oracle
/// @notice Provides functions to integrate with V3 pool oracle
library Oracle {
    /**
     * @notice Calculates time-weighted means of tick and liquidity for a given Uniswap V3 pool
     * @param pool Address of the pool that we want to observe
     * @param secondsAgo Number of seconds in the past from which to calculate the time-weighted means
     * @return arithmeticMeanTick The arithmetic mean tick from (block.timestamp - secondsAgo) to block.timestamp
     * @return secondsPerLiquidityX128 The change in seconds per liquidity from (block.timestamp - secondsAgo)
     * to block.timestamp
     */
    function consult(IUniswapV3Pool pool, uint32 secondsAgo)
        internal
        view
        returns (int24 arithmeticMeanTick, uint160 secondsPerLiquidityX128)
    {
        require(secondsAgo != 0, "BP");

        uint32[] memory secondsAgos = new uint32[](2);
        secondsAgos[0] = secondsAgo;
        secondsAgos[1] = 0;

        (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s) = pool.observe(
            secondsAgos
        );

        int56 tickCumulativesDelta = tickCumulatives[1] - tickCumulatives[0];
        arithmeticMeanTick = int24(tickCumulativesDelta / int32(secondsAgo));
        // Always round to negative infinity
        if (tickCumulativesDelta < 0 && (tickCumulativesDelta % int32(secondsAgo) != 0)) arithmeticMeanTick--;

        secondsPerLiquidityX128 = secondsPerLiquidityCumulativeX128s[1] - secondsPerLiquidityCumulativeX128s[0];
    }

    /**
     * @notice Given a pool, it returns the number of seconds ago of the oldest stored observation
     * @param pool Address of Uniswap V3 pool that we want to observe
     * @param observationIndex The observation index from pool.slot0()
     * @param observationCardinality The observationCardinality from pool.slot0()
     * @dev (, , uint16 observationIndex, uint16 observationCardinality, , , ) = pool.slot0();
     * @return secondsAgo The number of seconds ago that the oldest observation was stored
     */
    function getMaxSecondsAgo(
        IUniswapV3Pool pool,
        uint16 observationIndex,
        uint16 observationCardinality
    ) internal view returns (uint32 secondsAgo) {
        require(observationCardinality != 0, "NI");

        unchecked {
            (uint32 observationTimestamp, , , bool initialized) = pool.observations(
                (observationIndex + 1) % observationCardinality
            );

            // The next index might not be initialized if the cardinality is in the process of increasing
            // In this case the oldest observation is always in index 0
            if (!initialized) {
                (observationTimestamp, , , ) = pool.observations(0);
            }

            secondsAgo = uint32(block.timestamp) - observationTimestamp;
        }
    }
}

////// contracts/libraries/FixedPoint96.sol
/* pragma solidity ^0.8.10; */

/// @title FixedPoint96
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
library FixedPoint96 {
    uint8 internal constant RESOLUTION = 96;
    uint256 internal constant Q96 = 0x1000000000000000000000000;
}

////// lib/solmate/src/utils/FixedPointMathLib.sol
/* pragma solidity >=0.8.0; */

/// @notice Arithmetic library with operations for fixed-point numbers.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol)
library FixedPointMathLib {
    /*///////////////////////////////////////////////////////////////
                            COMMON BASE UNITS
    //////////////////////////////////////////////////////////////*/

    uint256 internal constant YAD = 1e8;
    uint256 internal constant WAD = 1e18;
    uint256 internal constant RAY = 1e27;
    uint256 internal constant RAD = 1e45;

    /*///////////////////////////////////////////////////////////////
                         FIXED POINT OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function fmul(
        uint256 x,
        uint256 y,
        uint256 baseUnit
    ) internal pure returns (uint256 z) {
        assembly {
            // Store x * y in z for now.
            z := mul(x, y)

            // Equivalent to require(x == 0 || (x * y) / x == y)
            if iszero(or(iszero(x), eq(div(z, x), y))) {
                revert(0, 0)
            }

            // If baseUnit is zero this will return zero instead of reverting.
            z := div(z, baseUnit)
        }
    }

    function fdiv(
        uint256 x,
        uint256 y,
        uint256 baseUnit
    ) internal pure returns (uint256 z) {
        assembly {
            // Store x * baseUnit in z for now.
            z := mul(x, baseUnit)

            // Equivalent to require(y != 0 && (x == 0 || (x * baseUnit) / x == baseUnit))
            if iszero(and(iszero(iszero(y)), or(iszero(x), eq(div(z, x), baseUnit)))) {
                revert(0, 0)
            }

            // We ensure y is not zero above, so there is never division by zero here.
            z := div(z, y)
        }
    }

    function fpow(
        uint256 x,
        uint256 n,
        uint256 baseUnit
    ) internal pure returns (uint256 z) {
        assembly {
            switch x
            case 0 {
                switch n
                case 0 {
                    // 0 ** 0 = 1
                    z := baseUnit
                }
                default {
                    // 0 ** n = 0
                    z := 0
                }
            }
            default {
                switch mod(n, 2)
                case 0 {
                    // If n is even, store baseUnit in z for now.
                    z := baseUnit
                }
                default {
                    // If n is odd, store x in z for now.
                    z := x
                }

                // Shifting right by 1 is like dividing by 2.
                let half := shr(1, baseUnit)

                for {
                    // Shift n right by 1 before looping to halve it.
                    n := shr(1, n)
                } n {
                    // Shift n right by 1 each iteration to halve it.
                    n := shr(1, n)
                } {
                    // Revert immediately if x ** 2 would overflow.
                    // Equivalent to iszero(eq(div(xx, x), x)) here.
                    if shr(128, x) {
                        revert(0, 0)
                    }

                    // Store x squared.
                    let xx := mul(x, x)

                    // Round to the nearest number.
                    let xxRound := add(xx, half)

                    // Revert if xx + half overflowed.
                    if lt(xxRound, xx) {
                        revert(0, 0)
                    }

                    // Set x to scaled xxRound.
                    x := div(xxRound, baseUnit)

                    // If n is even:
                    if mod(n, 2) {
                        // Compute z * x.
                        let zx := mul(z, x)

                        // If z * x overflowed:
                        if iszero(eq(div(zx, x), z)) {
                            // Revert if x is non-zero.
                            if iszero(iszero(x)) {
                                revert(0, 0)
                            }
                        }

                        // Round to the nearest number.
                        let zxRound := add(zx, half)

                        // Revert if zx + half overflowed.
                        if lt(zxRound, zx) {
                            revert(0, 0)
                        }

                        // Return properly scaled zxRound.
                        z := div(zxRound, baseUnit)
                    }
                }
            }
        }
    }

    /*///////////////////////////////////////////////////////////////
                        GENERAL NUMBER UTILITIES
    //////////////////////////////////////////////////////////////*/

    function sqrt(uint256 x) internal pure returns (uint256 z) {
        assembly {
            // Start off with z at 1.
            z := 1

            // Used below to help find a nearby power of 2.
            let y := x

            // Find the lowest power of 2 that is at least sqrt(x).
            if iszero(lt(y, 0x100000000000000000000000000000000)) {
                y := shr(128, y) // Like dividing by 2 ** 128.
                z := shl(64, z)
            }
            if iszero(lt(y, 0x10000000000000000)) {
                y := shr(64, y) // Like dividing by 2 ** 64.
                z := shl(32, z)
            }
            if iszero(lt(y, 0x100000000)) {
                y := shr(32, y) // Like dividing by 2 ** 32.
                z := shl(16, z)
            }
            if iszero(lt(y, 0x10000)) {
                y := shr(16, y) // Like dividing by 2 ** 16.
                z := shl(8, z)
            }
            if iszero(lt(y, 0x100)) {
                y := shr(8, y) // Like dividing by 2 ** 8.
                z := shl(4, z)
            }
            if iszero(lt(y, 0x10)) {
                y := shr(4, y) // Like dividing by 2 ** 4.
                z := shl(2, z)
            }
            if iszero(lt(y, 0x8)) {
                // Equivalent to 2 ** z.
                z := shl(1, z)
            }

            // Shifting right by 1 is like dividing by 2.
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))

            // Compute a rounded down version of z.
            let zRoundDown := div(x, z)

            // If zRoundDown is smaller, use it.
            if lt(zRoundDown, z) {
                z := zRoundDown
            }
        }
    }
}

////// contracts/libraries/Volatility.sol
/* pragma solidity ^0.8.10; */

/* import "@rari-capital/solmate/src/utils/FixedPointMathLib.sol"; */

/* import "./FixedPoint96.sol"; */
/* import "./FullMath.sol"; */
/* import "./TickMath.sol"; */

/// @title Volatility
/// @notice Provides functions that use Uniswap v3 to compute price volatility
library Volatility {
    struct PoolMetadata {
        // the oldest oracle observation that's been populated by the pool
        uint32 maxSecondsAgo;
        // the overall fee minus the protocol fee for token0, times 1e6
        uint24 gamma0;
        // the overall fee minus the protocol fee for token1, times 1e6
        uint24 gamma1;
        // the pool tick spacing
        int24 tickSpacing;
    }

    struct PoolData {
        // the current price (from pool.slot0())
        uint160 sqrtPriceX96;
        // the current tick (from pool.slot0())
        int24 currentTick;
        // the mean tick over some period (from OracleLibrary.consult(...))
        int24 arithmeticMeanTick;
        // the mean liquidity over some period (from OracleLibrary.consult(...))
        uint160 secondsPerLiquidityX128;
        // the number of seconds to look back when getting mean tick & mean liquidity
        uint32 oracleLookback;
        // the liquidity depth at currentTick (from pool.liquidity())
        uint128 tickLiquidity;
    }

    struct FeeGrowthGlobals {
        // the fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
        uint256 feeGrowthGlobal0X128;
        // the fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
        uint256 feeGrowthGlobal1X128;
        // the block timestamp at which feeGrowthGlobal0X128 and feeGrowthGlobal1X128 were last updated
        uint32 timestamp;
    }

    /**
     * @notice Estimates implied volatility using https://lambert-guillaume.medium.com/on-chain-volatility-and-uniswap-v3-d031b98143d1
     * @param metadata The pool's metadata (may be cached)
     * @param data A summary of the pool's state from `pool.slot0` `pool.observe` and `pool.liquidity`
     * @param a The pool's cumulative feeGrowthGlobals some time in the past
     * @param b The pool's cumulative feeGrowthGlobals as of the current block
     * @return An estimate of the 24 hour implied volatility scaled by 1e18
     */
    function estimate24H(
        PoolMetadata memory metadata,
        PoolData memory data,
        FeeGrowthGlobals memory a,
        FeeGrowthGlobals memory b
    ) internal pure returns (uint256) {
        uint256 volumeGamma0Gamma1;
        {
            uint128 revenue0Gamma1 = computeRevenueGamma(
                a.feeGrowthGlobal0X128,
                b.feeGrowthGlobal0X128,
                data.secondsPerLiquidityX128,
                data.oracleLookback,
                metadata.gamma1
            );
            uint128 revenue1Gamma0 = computeRevenueGamma(
                a.feeGrowthGlobal1X128,
                b.feeGrowthGlobal1X128,
                data.secondsPerLiquidityX128,
                data.oracleLookback,
                metadata.gamma0
            );
            // This is an approximation. Ideally the fees earned during each swap would be multiplied by the price
            // *at that swap*. But for prices simulated with GBM and swap sizes either normally or uniformly distributed,
            // the error you get from using geometric mean price is <1% even with high drift and volatility.
            volumeGamma0Gamma1 = revenue1Gamma0 + amount0ToAmount1(revenue0Gamma1, data.arithmeticMeanTick);
        }

        uint128 sqrtTickTVLX32 = uint128(
            FixedPointMathLib.sqrt(
                computeTickTVLX64(metadata.tickSpacing, data.currentTick, data.sqrtPriceX96, data.tickLiquidity)
            )
        );
        uint48 timeAdjustmentX32 = uint48(
            FixedPointMathLib.sqrt((uint256(1 days) << 64) / (b.timestamp - a.timestamp))
        );

        if (sqrtTickTVLX32 == 0) return 0;
        unchecked {
            return
                (uint256(2e18) * uint256(timeAdjustmentX32) * FixedPointMathLib.sqrt(volumeGamma0Gamma1)) /
                sqrtTickTVLX32;
        }
    }

    /**
     * @notice Computes an `amount1` that (at `tick`) is equivalent in worth to the provided `amount0`
     * @param amount0 The amount of token0 to convert
     * @param tick The tick at which the conversion should hold true
     * @return amount1 An equivalent amount of token1
     */
    function amount0ToAmount1(uint128 amount0, int24 tick) internal pure returns (uint256 amount1) {
        uint160 sqrtPriceX96 = TickMath.getSqrtRatioAtTick(tick);
        uint224 priceX96 = uint224(FullMath.mulDiv(sqrtPriceX96, sqrtPriceX96, FixedPoint96.Q96));

        amount1 = FullMath.mulDiv(amount0, priceX96, FixedPoint96.Q96);
    }

    /**
     * @notice Computes pool revenue using feeGrowthGlobal accumulators, then scales it down by a factor of gamma
     * @param feeGrowthGlobalAX128 The value of feeGrowthGlobal (either 0 or 1) at time A
     * @param feeGrowthGlobalBX128 The value of feeGrowthGlobal (either 0 or 1, but matching) at time B (B > A)
     * @param secondsPerLiquidityX128 The difference in the secondsPerLiquidity accumulator from `secondsAgo` seconds ago until now
     * @param secondsAgo The oracle lookback period that was used to find `secondsPerLiquidityX128`
     * @param gamma The fee factor to scale by
     * @return Revenue over the period from `block.timestamp - secondsAgo` to `block.timestamp`, scaled down by a factor of gamma
     */
    function computeRevenueGamma(
        uint256 feeGrowthGlobalAX128,
        uint256 feeGrowthGlobalBX128,
        uint160 secondsPerLiquidityX128,
        uint32 secondsAgo,
        uint24 gamma
    ) internal pure returns (uint128) {
        unchecked {
            uint256 temp;

            if (feeGrowthGlobalBX128 >= feeGrowthGlobalAX128) {
                // feeGrowthGlobal has increased from time A to time B
                temp = feeGrowthGlobalBX128 - feeGrowthGlobalAX128;
            } else {
                // feeGrowthGlobal has overflowed between time A and time B
                temp = type(uint256).max - feeGrowthGlobalAX128 + feeGrowthGlobalBX128;
            }

            temp = FullMath.mulDiv(temp, secondsAgo * gamma, secondsPerLiquidityX128 * 1e6);
            return temp > type(uint128).max ? type(uint128).max : uint128(temp);
        }
    }

    /**
     * @notice Computes the value of liquidity available at the current tick, denominated in token1
     * @param tickSpacing The pool tick spacing (from pool.tickSpacing())
     * @param tick The current tick (from pool.slot0())
     * @param sqrtPriceX96 The current price (from pool.slot0())
     * @param liquidity The liquidity depth at currentTick (from pool.liquidity())
     */
    function computeTickTVLX64(
        int24 tickSpacing,
        int24 tick,
        uint160 sqrtPriceX96,
        uint128 liquidity
    ) internal pure returns (uint256 tickTVL) {
        tick = TickMath.floor(tick, tickSpacing);

        // both value0 and value1 fit in uint192
        (uint256 value0, uint256 value1) = _getValuesOfLiquidity(
            sqrtPriceX96,
            TickMath.getSqrtRatioAtTick(tick),
            TickMath.getSqrtRatioAtTick(tick + tickSpacing),
            liquidity
        );
        tickTVL = (value0 + value1) << 64;
    }

    /**
     * @notice Computes the value of the liquidity in terms of token1
     * @dev Each return value can fit in a uint192 if necessary
     * @param sqrtRatioX96 A sqrt price representing the current pool prices
     * @param sqrtRatioAX96 A sqrt price representing the lower tick boundary
     * @param sqrtRatioBX96 A sqrt price representing the upper tick boundary
     * @param liquidity The liquidity being valued
     * @return value0 The value of amount0 underlying `liquidity`, in terms of token1
     * @return value1 The amount of token1
     */
    function _getValuesOfLiquidity(
        uint160 sqrtRatioX96,
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) private pure returns (uint256 value0, uint256 value1) {
        assert(sqrtRatioAX96 <= sqrtRatioX96 && sqrtRatioX96 <= sqrtRatioBX96);

        unchecked {
            uint224 numerator = uint224(FullMath.mulDiv(sqrtRatioX96, sqrtRatioBX96 - sqrtRatioX96, FixedPoint96.Q96));

            value0 = FullMath.mulDiv(liquidity, numerator, sqrtRatioBX96);
            value1 = FullMath.mulDiv(liquidity, sqrtRatioX96 - sqrtRatioAX96, FixedPoint96.Q96);
        }
    }
}

////// contracts/VolatilityOracle.sol
/* pragma solidity ^0.8.10; */

/* import "./libraries/Oracle.sol"; */
/* import "./libraries/Volatility.sol"; */

/* import "./interfaces/IVolatilityOracle.sol"; */

/*
                              #                                                                    
                             ###                                                                   
                             #####                                                                 
          #                 #######                                *###*                           
           ###             #########                         ########                              
           #####         ###########                   ###########                                 
           ########    ############               ############                                     
            ########    ###########         *##############                                        
           ###########   ########      #################                                           
           ############   ###      #################                                               
           ############       ##################                                                   
          #############    #################*         *#############*                              
         ##############    #############      #####################################                
        ###############   ####******      #######################*                                 
      ################                                                                             
    #################   *############################*                                             
      ##############    ######################################                                     
          ########    ################*                     **######*                              
              ###    ###                                                                           
*/

contract VolatilityOracle is IVolatilityOracle {
    struct Indices {
        uint8 read;
        uint8 write;
    }

    /// @inheritdoc IVolatilityOracle
    mapping(IUniswapV3Pool => Volatility.PoolMetadata) public cachedPoolMetadata;

    /// @inheritdoc IVolatilityOracle
    mapping(IUniswapV3Pool => Volatility.FeeGrowthGlobals[25]) public feeGrowthGlobals;

    /// @inheritdoc IVolatilityOracle
    mapping(IUniswapV3Pool => Indices) public feeGrowthGlobalsIndices;

    /// @inheritdoc IVolatilityOracle
    function cacheMetadataFor(IUniswapV3Pool pool) external {
        Volatility.PoolMetadata memory poolMetadata;

        (, , uint16 observationIndex, uint16 observationCardinality, , uint8 feeProtocol, ) = pool.slot0();
        poolMetadata.maxSecondsAgo = (Oracle.getMaxSecondsAgo(pool, observationIndex, observationCardinality) * 3) / 5;

        uint24 fee = pool.fee();
        poolMetadata.gamma0 = fee;
        poolMetadata.gamma1 = fee;
        if (feeProtocol % 16 != 0) poolMetadata.gamma0 -= fee / (feeProtocol % 16);
        if (feeProtocol >> 4 != 0) poolMetadata.gamma1 -= fee / (feeProtocol >> 4);

        poolMetadata.tickSpacing = pool.tickSpacing();

        cachedPoolMetadata[pool] = poolMetadata;
    }

    /// @inheritdoc IVolatilityOracle
    function lens(IUniswapV3Pool pool) external view returns (uint256[25] memory IV) {
        (uint160 sqrtPriceX96, int24 tick, , , , , ) = pool.slot0();
        Volatility.FeeGrowthGlobals[25] memory feeGrowthGlobal = feeGrowthGlobals[pool];

        for (uint8 i = 0; i < 25; i++) {
            (IV[i], ) = _estimate24H(pool, sqrtPriceX96, tick, feeGrowthGlobal[i]);
        }
    }

    /// @inheritdoc IVolatilityOracle
    function estimate24H(IUniswapV3Pool pool) external returns (uint256 IV) {
        (uint160 sqrtPriceX96, int24 tick, , , , , ) = pool.slot0();

        Volatility.FeeGrowthGlobals[25] storage feeGrowthGlobal = feeGrowthGlobals[pool];
        Indices memory idxs = _loadIndicesAndSelectRead(pool, feeGrowthGlobal);

        Volatility.FeeGrowthGlobals memory current;
        (IV, current) = _estimate24H(pool, sqrtPriceX96, tick, feeGrowthGlobal[idxs.read]);

        // Write to storage
        if (current.timestamp - 1 hours > feeGrowthGlobal[idxs.write].timestamp) {
            idxs.write = (idxs.write + 1) % 25;
            feeGrowthGlobals[pool][idxs.write] = current;
        }
        feeGrowthGlobalsIndices[pool] = idxs;
    }

    function _estimate24H(
        IUniswapV3Pool _pool,
        uint160 _sqrtPriceX96,
        int24 _tick,
        Volatility.FeeGrowthGlobals memory _previous
    ) private view returns (uint256 IV, Volatility.FeeGrowthGlobals memory current) {
        Volatility.PoolMetadata memory poolMetadata = cachedPoolMetadata[_pool];

        uint32 secondsAgo = poolMetadata.maxSecondsAgo;
        require(secondsAgo >= 1 hours, "Aloe: need more data");
        if (secondsAgo > 1 days) secondsAgo = 1 days;
        // Throws if secondsAgo == 0
        (int24 arithmeticMeanTick, uint160 secondsPerLiquidityX128) = Oracle.consult(_pool, secondsAgo);

        current = Volatility.FeeGrowthGlobals(
            _pool.feeGrowthGlobal0X128(),
            _pool.feeGrowthGlobal1X128(),
            uint32(block.timestamp)
        );
        IV = Volatility.estimate24H(
            poolMetadata,
            Volatility.PoolData(
                _sqrtPriceX96,
                _tick,
                arithmeticMeanTick,
                secondsPerLiquidityX128,
                secondsAgo,
                _pool.liquidity()
            ),
            _previous,
            current
        );
    }

    function _loadIndicesAndSelectRead(IUniswapV3Pool _pool, Volatility.FeeGrowthGlobals[25] storage _feeGrowthGlobal)
        private
        view
        returns (Indices memory)
    {
        Indices memory idxs = feeGrowthGlobalsIndices[_pool];
        uint32 timingError = _timingError(block.timestamp - _feeGrowthGlobal[idxs.read].timestamp);

        for (uint8 counter = idxs.read + 1; counter < idxs.read + 25; counter++) {
            uint8 newReadIndex = counter % 25;
            uint32 newTimingError = _timingError(block.timestamp - _feeGrowthGlobal[newReadIndex].timestamp);

            if (newTimingError < timingError) {
                idxs.read = newReadIndex;
                timingError = newTimingError;
            } else break;
        }

        return idxs;
    }

    function _timingError(uint256 _age) private pure returns (uint32) {
        return uint32(_age < 24 hours ? 24 hours - _age : _age - 24 hours);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"}],"name":"cacheMetadataFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IUniswapV3Pool","name":"","type":"address"}],"name":"cachedPoolMetadata","outputs":[{"internalType":"uint32","name":"maxSecondsAgo","type":"uint32"},{"internalType":"uint24","name":"gamma0","type":"uint24"},{"internalType":"uint24","name":"gamma1","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"}],"name":"estimate24H","outputs":[{"internalType":"uint256","name":"IV","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IUniswapV3Pool","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"feeGrowthGlobals","outputs":[{"internalType":"uint256","name":"feeGrowthGlobal0X128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthGlobal1X128","type":"uint256"},{"internalType":"uint32","name":"timestamp","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV3Pool","name":"","type":"address"}],"name":"feeGrowthGlobalsIndices","outputs":[{"internalType":"uint8","name":"read","type":"uint8"},{"internalType":"uint8","name":"write","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"}],"name":"lens","outputs":[{"internalType":"uint256[25]","name":"IV","type":"uint256[25]"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50611feb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063b168197d11610050578063b168197d14610180578063be3438e9146101a1578063ff8a34f4146101b657600080fd5b806338c89978146100775780637cf1a14f146100b0578063a93f24971461013a575b600080fd5b61008a61008536600461184b565b6101d6565b60408051938452602084019290925263ffffffff16908201526060015b60405180910390f35b6101076100be366004611877565b60006020819052908152604090205463ffffffff81169062ffffff64010000000082048116916701000000000000008104909116906a0100000000000000000000900460020b84565b6040805163ffffffff95909516855262ffffff9384166020860152919092169083015260020b60608201526080016100a7565b610166610148366004611877565b60026020526000908152604090205460ff8082169161010090041682565b6040805160ff9384168152929091166020830152016100a7565b61019361018e366004611877565b610212565b6040519081526020016100a7565b6101b46101af366004611877565b610460565b005b6101c96101c4366004611877565b61072d565b6040516100a79190611894565b600160205281600052604060002081601981106101f257600080fd5b600302018054600182015460029092015490935090915063ffffffff1683565b6000806000836001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015610255573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027991906118ff565b505050506001600160a01b03871660009081526001602052604081209395509193506102a790508683610889565b90506102d360405180606001604052806000815260200160008152602001600063ffffffff1681525090565b61032a87868686866000015160ff16601981106102f2576102f261198f565b604080516060810182526003929092029290920180548252600181015460208301526002015463ffffffff16918101919091526109ac565b60208401519197509150839060ff16601981106103495761034961198f565b6003020160020160009054906101000a900463ffffffff1663ffffffff16610e10826040015161037991906119bb565b63ffffffff1611156104185760198260200151600161039891906119e0565b6103a29190611a1b565b60ff90811660208085019182526001600160a01b038a1660009081526001909152604090209051839216601981106103dc576103dc61198f565b825160039190910291909101908155602082015160018201556040909101516002909101805463ffffffff191663ffffffff9092169190911790555b506001600160a01b03909516600090815260026020908152604090912086518154929097015160ff9081166101000261ffff1990931697169690961717909455509092915050565b6040805160808101825260008082526020820181905291810182905260608101919091526000806000846001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa1580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb91906118ff565b509550509450945050506005610502868585610c69565b61050d906003611a3d565b6105179190611a69565b63ffffffff1684526040805163ddca3f4360e01b815290516000916001600160a01b0388169163ddca3f43916004808201926020929091908290030181865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190611a8c565b62ffffff811660208701819052604087015290506105ab601083611a1b565b60ff16156105e5576105be601083611a1b565b6105cb9060ff1682611ab1565b856020018181516105dc9190611ac7565b62ffffff169052505b600f600483901c161561061d57610603600f600484901c1682611ab1565b856040018181516106149190611ac7565b62ffffff169052505b856001600160a01b031663d0c93a7c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561065b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067f9190611ae3565b60020b606086019081526001600160a01b03969096166000908152602081815260409182902087518154928901519390980151985163ffffffff90981666ffffffffffffff199092169190911764010000000062ffffff93841602176cffffffffffff000000000000001916670100000000000000988316989098026cffffff000000000000000000001916979097176a010000000000000000000091909616029490941790945550505050565b610735611814565b600080836001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015610776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079a91906118ff565b505050506001600160a01b03871660009081526001602052604080822081516103208101909252949650929450929050601983835b8282101561081957604080516060810182526003840286018054825260018082015460208085019190915260029092015463ffffffff1693830193909352908352920191016107cf565b50505050905060005b60198160ff16101561088057610853868585858560ff16601981106108495761084961198f565b60200201516109ac565b50858260ff16601981106108695761086961198f565b60200201528061087881611afe565b915050610822565b50505050919050565b604080518082018252600080825260208083018290526001600160a01b03861682526002815283822084518086019095525460ff8082168087526101009092041691850191909152919291610907908590601981106108ea576108ea61198f565b60030201600201546109029063ffffffff1642611b1e565b610dbb565b825190915060009061091a9060016119e0565b90505b825161092a9060196119e0565b60ff168160ff1610156109a0576000610944601983611a1b565b90506000610960878360ff16601981106108ea576108ea61198f565b90508363ffffffff168163ffffffff1610156109845760ff8216855292508261098b565b50506109a0565b5050808061099890611afe565b91505061091d565b50909150505b92915050565b604080516060810182526000808252602082018190529181018290526001600160a01b038616600090815260208181526040918290208251608081018452905463ffffffff811680835262ffffff64010000000083048116948401949094526701000000000000008204909316938201939093526a010000000000000000000090920460020b6060830152610e10811015610a8e5760405162461bcd60e51b815260206004820152601460248201527f416c6f653a206e656564206d6f7265206461746100000000000000000000000060448201526064015b60405180910390fd5b620151808163ffffffff161115610aa55750620151805b600080610ab28a84610de6565b9150915060405180606001604052808b6001600160a01b031663f30583996040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b239190611b35565b81526020018b6001600160a01b031663461413196040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611b35565b81526020014263ffffffff168152509450610c5a846040518060c001604052808c6001600160a01b031681526020018b60020b81526020018560020b8152602001846001600160a01b031681526020018663ffffffff1681526020018d6001600160a01b0316631a6865026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c489190611b4e565b6001600160801b031690528988610fed565b95505050505094509492505050565b600061ffff8216610ca15760405162461bcd60e51b81526020600482015260026024820152614e4960f01b6044820152606401610a85565b600080856001600160a01b031663252c09d78561ffff168760010161ffff1681610ccd57610ccd611a05565b066040518263ffffffff1660e01b8152600401610cf4919061ffff91909116815260200190565b608060405180830381865afa158015610d11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d359190611b89565b93505050915080610db05760405163252c09d760e01b8152600060048201526001600160a01b0387169063252c09d790602401608060405180830381865afa158015610d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da99190611b89565b5091935050505b504203949350505050565b6000620151808210610dd957610dd46201518083611b1e565b6109a6565b6109a68262015180611b1e565b60008063ffffffff8316610e215760405162461bcd60e51b8152602060048201526002602482015261042560f41b6044820152606401610a85565b6040805160028082526060820183526000926020830190803683370190505090508381600081518110610e5657610e5661198f565b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110610e8557610e8561198f565b602002602001019063ffffffff16908163ffffffff1681525050600080866001600160a01b031663883bdbfd846040518263ffffffff1660e01b8152600401610ece9190611c00565b600060405180830381865afa158015610eeb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f139190810190611d13565b91509150600082600081518110610f2c57610f2c61198f565b602002602001015183600181518110610f4757610f4761198f565b6020026020010151610f599190611dd6565b9050610f69600388900b82611e26565b955060008160060b128015610f8d5750610f87600388900b82611e64565b60060b15155b15610fa05785610f9c81611e86565b9650505b81600081518110610fb357610fb361198f565b602002602001015182600181518110610fce57610fce61198f565b6020026020010151610fe09190611eaa565b9450505050509250929050565b600080600061101385600001518560000151886060015189608001518b6040015161111a565b905060006110388660200151866020015189606001518a608001518c6020015161111a565b9050611048828860400151611183565b61105b906001600160801b038316611eca565b9250505060006110856110808860600151886020015189600001518a60a001516111ec565b611240565b905060006110bb866040015186604001516110a091906119bb565b6110809063ffffffff166a0151800000000000000000611ee2565b90506001600160801b0382166110d75760009350505050611112565b816001600160801b03166110ea84611240565b8265ffffffffffff16671bc16d674ec8000002028161110b5761110b611a05565b0493505050505b949350505050565b60008086861061112d5750858503611133565b50851985015b611159818462ffffff16860263ffffffff1687620f4240026001600160a01b0316611319565b90506001600160801b03811161116f5780611178565b6001600160801b035b979650505050505050565b60008061118f836113cc565b905060006111ab6001600160a01b03831680600160601b611319565b90506111e3856001600160801b0316827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160601b611319565b95945050505050565b60006111f88486611712565b93506000806112228561120a886113cc565b61121c6112178b8b611ef6565b6113cc565b8761173e565b909250905060406112338284611eca565b901b979650505050505050565b600181600160801b81106112595760409190911b9060801c5b6801000000000000000081106112745760209190911b9060401c5b640100000000811061128b5760109190911b9060201c5b6201000081106112a05760089190911b9060101c5b61010081106112b45760049190911b9060081c5b601081106112c75760029190911b9060041c5b600881106112d6578160011b91505b5080820401600190811c80830401811c80830401811c80830401811c80830401811c80830401811c80830401901c80820481811015611313578091505b50919050565b60008161132557600080fd5b6000806000198587098587029250828110838203039150508060001415611351575082900490506113c5565b83811061135d57600080fd5b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b60008060008360020b126113e3578260020b6113f0565b8260020b6113f090611f3d565b90506113ff620d89e719611f5a565b62ffffff168111156114375760405162461bcd60e51b81526020600482015260016024820152601560fa1b6044820152606401610a85565b60006001821661144b57600160801b61145d565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615611491576ffff97272373d413259a46990580e213a0260801c5b60048216156114b0576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156114cf576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156114ee576fffcb9843d60f6159c9db58835c9266440260801c5b602082161561150d576fff973b41fa98c081472e6896dfb254c00260801c5b604082161561152c576fff2ea16466c96a3843ec78b326b528610260801c5b608082161561154b576ffe5dee046a99a2a811c461f1969c30530260801c5b61010082161561156b576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b61020082161561158b576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156115ab576ff3392b0822b70005940c7a398e4b70f30260801c5b6108008216156115cb576fe7159475a2c29b7443b29c7fa6e889d90260801c5b6110008216156115eb576fd097f3bdfd2022b8845ad8f792aa58250260801c5b61200082161561160b576fa9f746462d870fdf8a65dc1f90e061e50260801c5b61400082161561162b576f70d869a156d2a1b890bb3df62baf32f70260801c5b61800082161561164b576f31be135f97d08fd981231505542fcfa60260801c5b6201000082161561166c576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b6202000082161561168c576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156116ab576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156116c8576b048a170391f7dc42444e8fa20260801c5b60008460020b13156116e95780600019816116e5576116e5611a05565b0490505b6401000000008106156116fd576001611700565b60005b60ff16602082901c0192505050919050565b60008061171f8385611f7d565b905060008160020b1261173557830390506109a6565b90920303919050565b600080856001600160a01b0316856001600160a01b0316111580156117755750836001600160a01b0316866001600160a01b031611155b61178157611781611f9f565b60006117a6876001600160a01b03168887036001600160a01b0316600160601b611319565b90506117e3846001600160801b0316827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16876001600160a01b0316611319565b9250611808846001600160801b03168789036001600160a01b0316600160601b611319565b91505094509492505050565b6040518061032001604052806019906020820280368337509192915050565b6001600160a01b038116811461184857600080fd5b50565b6000806040838503121561185e57600080fd5b823561186981611833565b946020939093013593505050565b60006020828403121561188957600080fd5b81356113c581611833565b6103208101818360005b60198110156118bd57815183526020928301929091019060010161189e565b50505092915050565b8051600281900b81146118d857600080fd5b919050565b805161ffff811681146118d857600080fd5b805180151581146118d857600080fd5b600080600080600080600060e0888a03121561191a57600080fd5b875161192581611833565b9650611933602089016118c6565b9550611941604089016118dd565b945061194f606089016118dd565b935061195d608089016118dd565b925060a088015160ff8116811461197357600080fd5b915061198160c089016118ef565b905092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff838116908316818110156119d8576119d86119a5565b039392505050565b600060ff821660ff84168060ff038211156119fd576119fd6119a5565b019392505050565b634e487b7160e01b600052601260045260246000fd5b600060ff831680611a2e57611a2e611a05565b8060ff84160691505092915050565b600063ffffffff80831681851681830481118215151615611a6057611a606119a5565b02949350505050565b600063ffffffff80841680611a8057611a80611a05565b92169190910492915050565b600060208284031215611a9e57600080fd5b815162ffffff811681146113c557600080fd5b600062ffffff80841680611a8057611a80611a05565b600062ffffff838116908316818110156119d8576119d86119a5565b600060208284031215611af557600080fd5b6113c5826118c6565b600060ff821660ff811415611b1557611b156119a5565b60010192915050565b600082821015611b3057611b306119a5565b500390565b600060208284031215611b4757600080fd5b5051919050565b600060208284031215611b6057600080fd5b81516001600160801b03811681146113c557600080fd5b8051600681900b81146118d857600080fd5b60008060008060808587031215611b9f57600080fd5b845163ffffffff81168114611bb357600080fd5b9350611bc160208601611b77565b92506040850151611bd181611833565b9150611bdf606086016118ef565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b6020808252825182820181905260009190848201906040850190845b81811015611c3e57835163ffffffff1683529284019291840191600101611c1c565b50909695505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715611c7357611c73611bea565b604052919050565b600067ffffffffffffffff821115611c9557611c95611bea565b5060051b60200190565b600082601f830112611cb057600080fd5b81516020611cc5611cc083611c7b565b611c4a565b82815260059290921b84018101918181019086841115611ce457600080fd5b8286015b84811015611d08578051611cfb81611833565b8352918301918301611ce8565b509695505050505050565b60008060408385031215611d2657600080fd5b825167ffffffffffffffff80821115611d3e57600080fd5b818501915085601f830112611d5257600080fd5b81516020611d62611cc083611c7b565b82815260059290921b84018101918181019089841115611d8157600080fd5b948201945b83861015611da657611d9786611b77565b82529482019490820190611d86565b91880151919650909350505080821115611dbf57600080fd5b50611dcc85828601611c9f565b9150509250929050565b60008160060b8360060b6000811281667fffffffffffff1901831281151615611e0157611e016119a5565b81667fffffffffffff018313811615611e1c57611e1c6119a5565b5090039392505050565b60008160060b8360060b80611e3d57611e3d611a05565b667fffffffffffff19821460001982141615611e5b57611e5b6119a5565b90059392505050565b60008260060b80611e7757611e77611a05565b808360060b0791505092915050565b60008160020b627fffff19811415611ea057611ea06119a5565b6000190192915050565b60006001600160a01b03838116908316818110156119d8576119d86119a5565b60008219821115611edd57611edd6119a5565b500190565b600082611ef157611ef1611a05565b500490565b60008160020b8360020b6000821282627fffff03821381151615611f1c57611f1c6119a5565b82627fffff19038212811615611f3457611f346119a5565b50019392505050565b6000600160ff1b821415611f5357611f536119a5565b5060000390565b60008160020b627fffff19811415611f7457611f746119a5565b60000392915050565b60008260020b80611f9057611f90611a05565b808360020b0791505092915050565b634e487b7160e01b600052600160045260246000fdfea2646970667358221220b6776bf72b9909d15042ba5b7d3e99c0b9907d7251965d7610da31e20a3b5e3964736f6c634300080a0033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.