Skip to content

Substream missed Withdraw transactions around April 8 #29

Description

@PaulRBerg

Problem

The lockup substream has a block gap around April 7–8 2026, causing multiple Withdraw transactions to go unindexed. On-chain, all affected streams are fully withdrawn (is_depleted == true), but the subgraph still shows stale withdrawnAmount and intactAmount values — making users think their funds are stuck.

This was reported by a user across 6 streams and multiple wallets. The good news: all tokens were successfully withdrawn. The bad news: the UI shows "Max: 0" (correct, from on-chain) alongside "Remaining: 15M" (stale, from subgraph), which is confusing and triggers support tickets.

cc @razgraf

Evidence

All missed transactions are valid Withdraw instructions with the correct discriminator (b712469c946da122), correct program ID, and successful execution. The indexer code in apps/lockup-substream/src/lib.rs handles these correctly — this is an infrastructure-level block gap, not a code bug.

Affected streams and missed transactions
Stream (NFT Mint) Deposited Subgraph Withdrawn On-chain Withdrawn Depleted
FsQeRt1xh88N4U46ZrMru2B5WVwkydwLEWFVL4p2Fa49 30,379,439,432,961 15,000,000,000,000 30,379,439,432,961 true
2rps8gxiGiLqfnMg7C75b9mwyBHAYrxReJJHKTexDYCY 12,585,348,916,202 3,500,000,000,000 12,585,348,916,202 true
5bowX43oAhRk2sGxAGJhApkGkZzUDmTnwZWFbq4k8Ywu 36,707,315,456,655 0 36,707,315,456,655 true
AViZiYvru3ejwJMKydPJTHSzMaSALdrKcAcDCo1gkgQD 26,052,875,955,310 0 26,052,875,955,310 true
639n7usncwqS1TbLfomNrCVxvmpHgMiZMa4vSHwxwae6 28,434,885,698,331 0 likely fully withdrawn
9B5yF9B7tYZCQmS1yntLEs6xd1aqF7Rodo5jrdhh4W2X 13,744,994,364,917 0 likely fully withdrawn

All streams use the same program: 4EauRKrNErKfsR4XetEZJNmvACGHbHnHV4R5dvJuqupC

Missed withdrawal transactions (Solscan links)

FsQeRt: https://solscan.io/tx/2MueGcLZSSMHuRbLfTBtz3hv8sXwuiwCgp5nthcFKaWRgdqHuPSw5iFoZknpBcpkpMHWVoG2Wi81aYc95j5i2hjd

2rps8g: https://solscan.io/tx/2eVdXPPH3m9r2pe8zHRmbAnEpwtSv7PDADN3ZTA4hhjSA14wUs1dwULJ9C8Cmtn65NymMxAhPJo2bxefXn8KCTNg

5bowX4: https://solscan.io/tx/2y8LuQBS5sy7afqDmVppPd96L5mayjJJJwFNGNPeuxe4wD1ocEY6GaQaEWni52nqeMA8ubHdcUb4VZCsUH3gNzVn

AViZiY: https://solscan.io/tx/5ea2ogwZZQspuM3f9erb79eNyG3nwywS1RRBhEKpndCAkPBpHetFnmhKi4dFQQPWmwuhoj2e1T7um4FBef5ii8ew

639n7u: https://solscan.io/tx/5ysoJAwfzu4X38rFwej2kWx5SGmnf9tAG1j9XrBfoR29VwSys8Z8etiaeRw6zeiyGtFo9gupATEfeZzELgAGX13H

9B5yF9: https://solscan.io/tx/5ShiWbUmujjGU3LhW6qFBMR1s2ZWQ6pmzHrdMguCk2vzWtADg2LCWhZ2znX2NVvnzP7RTEoxzLJCec42KchSZuVA

Verification script (reads on-chain stream data)
node --input-type=module << 'SCRIPT'
import { Connection, PublicKey } from "@solana/web3.js";
const PROGRAM = new PublicKey("4EauRKrNErKfsR4XetEZJNmvACGHbHnHV4R5dvJuqupC");
const mint = new PublicKey("<NFT_MINT_HERE>");
const [pda] = PublicKey.findProgramAddressSync(
  [Buffer.from("stream_data"), mint.toBuffer()], PROGRAM
);
const conn = new Connection("https://api.mainnet-beta.solana.com", "confirmed");
const info = await conn.getAccountInfo(pda);
const d = info.data;
let o = 8;
const deposited = d.readBigUInt64LE(o + 16);
const withdrawn = d.readBigUInt64LE(o + 32);
o += 40 + 32 + 1 + 16;
const is_depleted = d.readUInt8(o + 1) !== 0;
console.log({ deposited: deposited.toString(), withdrawn: withdrawn.toString(), is_depleted });
SCRIPT

Solution

  1. Immediate: re-index the lockup substream to fill the block gap and correct the stale data
  2. Follow-up: add monitoring/alerting for block gaps in the substream pipeline so these don't go unnoticed

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: lowEasy or tiny task that takes less than a day.priority: 0Do this first before everything else. This is critical and nothing works without this.type: bugSomething isn't working.work: clearSense-categorize-respond. The relationship between cause and effect is clear.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions