Query editor
/* WATTOIN ($WATT) — StakingToken : 0xbeb55c3323755695CE14f687f7B72d504dfa7BDB (Polygon)IMPORTANT: this token has 0 decimals. amount_raw is already whole tokens —there is deliberately NO 1e18 divisor anywhere in this query.── OPEN ITEM ─────────────────────────────────────────────────────────────The staking mechanism is NOT yet confirmed. This query infers stakes fromtransfers into a sink address, with 0x…dEaD assumed below. Verified againstchain on 2026-08-28: no WATTOIN has ever been sent to that address, so everymetric here is legitimately zero rather than broken.When Watt2Trade confirm the real staking contract, change STAKE_SINK in thetwo places marked below and nothing else. If staking turns out to be adeposit contract that holds a balance (rather than a burn-style sink), thelogic still holds — a deposit is a transfer in, a withdrawal a transfer out.──────────────────────────────────────────────────────────────────────────Denominator note: percentage_staked is a share of total_supply, not ofcirculating float. Float on this token is currently 32 tokens, so afloat-based percentage would be meaningless. */WITH transfers AS (SELECTCAST(block_time AS date) AS day,"from" AS sender,"to" AS recipient,CAST(amount_raw AS DECIMAL(38,0)) AS amountFROM tokens.transfersWHERE blockchain = 'polygon'AND contract_address = 0xbeb55c3323755695CE14f687f7B72d504dfa7BDB),stake_legs AS (/* Into the sink = a stake. */SELECT day, sender AS staker, amount AS delta, true AS is_stakeFROM transfersWHERE recipient = 0x000000000000000000000000000000000000dEaD /* STAKE_SINK */AND sender <> 0x000000000000000000000000000000000000dEaDUNION ALL/* Out of the sink = an unstake, and the amount is NEGATED. The previousversion summed unstakes as positive alongside stakes, so the runningstaked total could only ever increase. It also read the sink addressitself as the staker here; the counterparty is the recipient. */SELECT day, recipient AS staker, -amount AS delta, false AS is_stakeFROM transfersWHERE sender = 0x000000000000000000000000000000000000dEaD /* STAKE_SINK */AND recipient <> 0x000000000000000000000000000000000000dEaD),daily_delta AS (SELECT day, SUM(delta) AS deltaFROM stake_legsGROUP BY day),/* Cumulative distinct stakers: each address is counted once, on the day itfirst staked. The previous version used a per-day COUNT(DISTINCT staker),