# test staking — Sepolia `testAdam` v4 market panel **Scope and units.** Show the selected `testAdam`/quote **Uniswap v4 pool** on Ethereum Sepolia (chain ID `11155111`), not an aggregate of all venues. The project brief specifies token name `test`, ticker `testAdam`, and target total supply **1,000,000,000 tokens**. Those are launch intentions, not evidence of a deployed token, initialized pool, current supply, or circulating supply. All monetary figures below are **units of the pool's quote currency** (for example, ETH if ETH is the quote); do not label them USD without a separately sourced quote/USD rate. Uniswap lists Sepolia PoolManager `0xE03A1074c86CFeDd5C142C4F04F1a1536e203543` and StateView `0xe1dd9c3fa50edb962e442f60dfbc432e24537e4c` [Uniswap deployments](https://developers.uniswap.org/docs/protocols/v4/deployments). Verify these against the deployment documentation when wiring the site. ## Launch inputs and pool identity At launch, record the token contract address; quote currency address (or native ETH); the complete `PoolKey` (`currency0`, `currency1`, `fee`, `tickSpacing`, `hooks`); the pool initialization transaction and block; and any documented circulation exclusions. The token address, quote choice, key parameters, initialization block, and circulation policy **only become available with the real launch**; none is supplied in this item. Verify the RPC's `eth_chainId` is `11155111` [Ethereum JSON-RPC](https://ethereum.org/developers/docs/apis/json-rpc/). Obtain token `decimals()` and `totalSupply()` from that deployed token at the measurement block, and quote `decimals()` from the quote ERC-20 (native ETH uses 18, since 1 ETH = 10^18 wei [Ethereum](https://ethereum.org/developers/docs/apis/javascript/)). ERC-20 defines these token reads; `decimals()` is optional, so if it cannot be read, use only a verified launch configuration, otherwise mark normalized figures unavailable [ERC-20](https://eips.ethereum.org/EIPS/eip-20). v4 identifies the pool by `poolId = keccak256(abi.encode(PoolKey))`, with currencies sorted numerically by address (`currency0 < currency1`); `fee`, `tickSpacing`, and `hooks` are part of the key. Native ETH is the zero-address currency and sorts first. Compute the ID from the actual launch key, then confirm a **PoolManager** `Initialize` log whose indexed `id`, `currency0`, `currency1` and decoded `fee`, `tickSpacing`, `hooks` match. Save its block as `B_init` and timestamp as `T_init`. Do not infer the pool from token pair alone: two keys can share currencies. These fields and the event are defined by [PoolKey](https://raw.githubusercontent.com/Uniswap/v4-core/main/src/types/PoolKey.sol), [PoolIdLibrary](https://raw.githubusercontent.com/Uniswap/v4-core/main/src/types/PoolId.sol), and [IPoolManager](https://raw.githubusercontent.com/Uniswap/v4-core/main/src/interfaces/IPoolManager.sol); the native-currency convention is in [Uniswap's pool creation guide](https://developers.uniswap.org/docs/protocols/v4/guides/create-pool). ## Snapshot spot price and valuation Choose a single available `finalized` block `N`; retain its hash and UTC timestamp `T_N`. At **block N**, use `eth_call` on Sepolia StateView `getSlot0(poolId)` for integer `S = sqrtPriceX96`, and `getLiquidity(poolId)` for active liquidity. Read token supply and decimals at the same block. StateView exposes those reads; v4 defines `S` as the Q64.96 square root of the **raw currency1/currency0 ratio** [StateView](https://raw.githubusercontent.com/Uniswap/v4-periphery/main/src/lens/StateView.sol), [v4 TickMath](https://raw.githubusercontent.com/Uniswap/v4-core/main/src/libraries/TickMath.sol). Use integer/rational arithmetic (`BigInt` or equivalent), including for `S²` and signed event amounts; round only for display. The `eth_call` block argument and block timestamp semantics are documented by [Ethereum JSON-RPC](https://ethereum.org/developers/docs/apis/json-rpc/). Let `dT` and `dQ` be token and quote decimals, `Q96 = 2^96`, and `R = S² / 2^192` **raw units of currency1 per raw unit of currency0**. Price `P` always has units **quote per 1 whole testAdam**: | Actual key order | Formula for `P` | | --- | --- | | `currency0 = testAdam`, `currency1 = quote` | `P = R × 10^(dT − dQ)` | | `currency0 = quote`, `currency1 = testAdam` | `P = (1/R) × 10^(dT − dQ)` | `totalSupplyTokens = totalSupplyRaw / 10^dT`; **FDV = totalSupplyTokens × P** (quote units). Use the on-chain `totalSupply()` result; compare it with the brief's 1 billion target and flag any difference. FDV means the value of all currently minted tokens at this pool's marginal spot price. It is not executable proceeds for selling that amount. If `S = 0`, pool identity is unconfirmed, token metadata is unavailable, or active liquidity is zero, mark **tradeable spot price and FDV unavailable** rather than presenting the initialization price as a liquid market. [StateView](https://raw.githubusercontent.com/Uniswap/v4-periphery/main/src/lens/StateView.sol), [ERC-20](https://eips.ethereum.org/EIPS/eip-20). **Circulating market cap = verified circulating supply (whole testAdam) × P**. ERC-20 `totalSupply()` alone does not identify locked, treasury, or otherwise noncirculating balances. For a number, require a published, testable circulation rule and verify its input addresses, restrictions, and `balanceOf` values at `N` (avoiding duplicate exclusions). Until then show **“Circulating market cap: unavailable — circulating supply unverified”** and show FDV separately. Do not relabel FDV as market cap. [ERC-20](https://eips.ethereum.org/EIPS/eip-20). ### Worked fixture — examples only, not Sepolia observations For both *example* rows, `dT = 18`, `dQ = 6`, `Q96 = 79228162514264337593543950336`, and `totalSupplyRaw = 1,000,000,000 × 10^18`. The quote is an unspecified six-decimal ERC-20; no token address or live pool is implied. The v4 price orientation and ERC-20 decimal conversion above yield: | Example currency order | Example `S` | Raw `R = S²/2^192` | Expected spot `P`, quote/testAdam | Example FDV, quote | | --- | ---: | ---: | ---: | ---: | | `testAdam` 0, quote 1 | `floor(Q96 / 500000) = 158456325028528675187087` | ≈ `0.000000000003999999999999999999999954` | ≈ **4** (slightly below because `S` was floored) | ≈ **4,000,000,000** | | quote 0, `testAdam` 1 | `Q96 × 500000 = 39614081257132168796771975168000000` | exactly `250000000000` | exactly **4** | exactly **4,000,000,000** | The first row multiplies `R` by `10^12`; the second divides `10^12` by `R`. Both use unequal decimals and return **quote per token**, rather than the reciprocal or an unadjusted raw ratio. Example circulating market cap remains **unavailable** because this fixture gives no verified circulating supply. ## Rolling 24-hour pool quote volume Use the same finalized block `N` and its block time `T_N`, so the measured cutoff is `T_cut = T_N − 86,400 seconds`. Start at `T_start = max(T_init, T_cut)`; find `B_cut`, the first block with timestamp `>= T_cut` (binary search with `eth_getBlockByNumber`), then scan **inclusive** block range `[max(B_init, B_cut), N]`. This includes any swaps later in the initialization block. If the pool is under 24 hours old, label coverage **“since pool initialization”** with its actual start time. Ethereum's block timestamp and log-range methods are documented by [Ethereum JSON-RPC](https://ethereum.org/developers/docs/apis/json-rpc/). Query `eth_getLogs` with `address = Sepolia PoolManager`, `topics = [keccak256("Swap(bytes32,address,int128,int128,uint160,uint128,int24,uint24)"), poolId]`, and explicit numeric `fromBlock`/`toBlock`. The first topic is the event signature; the indexed `id` is the second. Decode the signed `int128` `amount0` and `amount1` from each **matching pool** `Swap` event. Uniswap calls them the pool's currency deltas [IPoolManager](https://raw.githubusercontent.com/Uniswap/v4-core/main/src/interfaces/IPoolManager.sol). For each distinct matching log `i`, use `q_i = abs(amount1_i)/10^dQ` if quote is `currency1`, otherwise `q_i = abs(amount0_i)/10^dQ`. **24h quote volume = Σ q_i**, in quote currency units. Count each pool Swap exactly once, regardless of trade direction; do not sum both legs, token Transfer logs, v4 `Donate` events, or other pools. This is *pool Swap quote-leg volume*, not USD volume or all-market volume. If a hook changes user settlement, these event deltas still describe the pool-side volume [IPoolManager](https://raw.githubusercontent.com/Uniswap/v4-core/main/src/interfaces/IPoolManager.sol). *Example only:* with a six-decimal quote as `currency1`, two distinct matching Swaps with `amount1 = +2,500,000` and `amount1 = −1,250,000` give 2.5 + 1.25 = **3.75 quote units**. For quote as `currency0`, the same example uses those numbers in `amount0`. A repeated delivery of either log does not add volume again. **Bounded pagination and coverage.** Scan consecutive, nonoverlapping, inclusive chunks of at most **2,000 blocks**, e.g. `[start, min(start+1999,N)]`, then continue at `last+1`. On a provider range/size error or a response at an imposed result cap, split that chunk and retry; if even a one-block query fails, report the window incomplete. Validate returned address, topics, block range, and block hashes; deduplicate by `(blockHash, transactionHash, logIndex)`. Check the stored finalized `N` hash before publishing and recompute on chain change. An operationally **verified empty window** is `0 quote units` only when *every block from start through N* was covered by successful, uncapped responses with zero matching logs. A timeout, skipped page, error, truncation suspicion, missing initialization evidence, or an unverified `N` is **“Volume unavailable — scan incomplete”**, never zero. Ordinary JSON-RPC does not itself provide a cryptographic proof that a provider returned every log; if provider completeness is in doubt, cross-check with another trusted provider or block receipts before calling it verified. Ethereum specifies the filter, log identity fields, and errors in [EIP-1474](https://eips.ethereum.org/EIPS/eip-1474). ## Panel labels to render | Label | Value and status | | --- | --- | | `testAdam / [quote] · Sepolia · Uniswap v4` | Actual quote symbol and verified pool ID/key, with PoolManager link. | | `Spot price` | `P [quote] / testAdam`; `Unavailable` for missing or zero-liquidity state. | | `FDV` | `totalSupplyTokens × P [quote]`; name it FDV, including when circulating supply is unknown. | | `Circulating market cap` | Verified value and supply rule, or `Unavailable — circulating supply unverified`. | | `24h pool quote volume` | Sum above with `[quote]` unit; `0` only for a complete empty scan, otherwise `Unavailable — scan incomplete`. | | `As of / freshness` | UTC `T_N`, block `N`, finality label, fetch time and elapsed age since `T_N`. | | `Volume coverage` | UTC `T_start`–`T_N`, `B_start`–`N`, `complete`/`incomplete`, and `since pool initialization` when younger than 24h. | All examples above are arithmetic fixtures. This item has **no verified live `testAdam` address, v4 pool, market price, volume, or circulating market cap** to display before launch.