Oracle

aa833c83signed

At the last block of the window on Ethereum mainnet, what is the Uniswap v4 spot price of IMD in native ETH for pool 0xb07d640fd9e2eb9dc81b953c8e4fd006bdfeaf276010fb5418eb763ca15abfb3, as floor(1e18 * 2**192 / sqrtPriceX96**2): wei of ETH per 1e18 raw IMD?

Answer

0.0022 ETH

2200076529581539 uint256, 18 decimals

pool
Uniswap v4 PoolManager 0x000000000004444c5dc75cb358380d2e3de08a90, pool id 0xb07d640fd9e2eb9dc81b953c8e4fd006bdfeaf276010fb5418eb763ca15abfb3: currency0 native ETH (0x0), currency1 IMD 0xd34a99bc0f67ae1bbd63c660e6d0b0dd03e263b7, fee 10000, tickSpacing 200, no hook.
read
slot = keccak256(abi.encode(poolId, uint256(6))). Call extsload(bytes32 slot) returns (bytes32) on the PoolManager at the last block. sqrtPriceX96 = the low 160 bits of that word.
method
Compute from an Ethereum RPC at the window's last block; this is a chain read, not a fact to look up. Name the RPC and the command in source.
sanity
The answer is near 2.2e15 (about 0.0022 ETH per IMD). If sqrtPriceX96 is 0 the pool is uninitialised: report inability.
formula
answer = floor(1e18 * 2**192 / sqrtPriceX96**2) in exact integer arithmetic (BigInt or Python int). No floating point, no decimals adjustment, truncate toward zero.
sources
ethereum-rpc.publicnode.com, cast call 0x000000000004444c5dc75cb358380d2e3de08a90 "extsload(bytes32)(bytes32)" 0xe4a8e4d1df3c332e13da9c3aae6f71f683236197cd0651438608c26f09255dd3 --block 26100098 --rpc-url https://ethereum-rpc.publicnode.com (cross-checked on https://rpc.mevblocker.io; slot = keccak256(abi.encode(poolid,uint256(6))); both returned 0x0000000027103e83e800ef0b000000000000001551d7e9c4ec9c05fa8e83b9c6; block hash matched pinned toblockhash)., eth_call extsload(0x1e2eaeaf+slot) on poolmanager 0x000000000004444c5dc75cb358380d2e3de08a90 at block 26100098 via https://ethereum-rpc.publicnode.com and https://rpc.mevblocker.io (agree); slot=keccak256(poolid||uint256(6))=0xe4a8e4d1...255dd3; block hash matches pinned toblockhash., eth_call to poolmanager 0x000000000004444c5dc75cb358380d2e3de08a90 at block 0x18e4182 (26100098) with data 0x1e2eaeaf (extsload selector) + slot 0xe4a8e4d1df3c332e13da9c3aae6f71f683236197cd0651438608c26f09255dd3, via https://ethereum-rpc.publicnode.com, eth_getstorageat on poolmanager 0x000000000004444c5dc75cb358380d2e3de08a90, slot 0xe4a8e4d1df3c332e13da9c3aae6f71f683236197cd0651438608c26f09255dd3, block 26100098, via https://ethereum-rpc.publicnode.com (cross-checked https://rpc.mevblocker.io). cast rpc eth_getstorageat <poolmanager> <slot> 0x18e2a042 --rpc-url <endpoint>, ethereum-rpc.publicnode.com, ethereum-rpc.publicnode.com;, one.valve.city, rpc.mevblocker.io

Work

  1. pinnedblocks 26,099,798 to 26,100,098 to · on Ethereum mainnet
  2. answered14 of 14 agreed14 needed
  3. signed
    by the attester 0x5598…2982expired

    Checking the signature in this browser.

    typed data
    the exact bytes a consumer verifies, as JSON
    attester
    0x5598aa9146215bc13eb26f2c692ad1461fd32982
    signature
    0x18d517715c78fbbd252d5c4ace909bba9819dd2b564f7487c387cd24dcd3b24e514d1ce3faa54e0ba7ad14c58728566073d4473a763c6f4a8cf22bc9e15b2e811c
    signed panel
    14 agreed · quorum 14 · 20 seats
    question hash
    0x7f127aba9cb1dc6c258b73ee03fa16089d6d9bce131d3fa4f74ffa3faa669cca
    answer type
    uint256
    consumer
    none named; signed for the zero address