Robinhood position watchtower: eth_subscribe for holding-period state
Entry tools are everywhere—open rhythm, volume density, whale FOMO all hang on subscribe. Once you hold a bag, the tape still wants a holding-period watchtower (Canary): deployer balance, LP/reserves, swap/fee/phase, quiet vs spike—push as soon as state flips. Paraphrased demand from the thread around gippp69. This post does one job: hang a position state machine on eth_subscribe logs, run a simple local state diff, and tag LP drops, large single swaps, and phase switches.
Open-watch rhythm: Watch Robinhood opens. Volume density: Volume spikes. Whale follow-flow: Whale FOMO. This one tracks the holding-period state machine.
| Use | Endpoint |
|---|---|
| Public HTTPS | https://robinhood-mainnet-rpc.blockreq.com/v1/rpc/public |
| Public WSS | wss://robinhood-mainnet-rpc.blockreq.com/v1/rpc/public |
| Private | Trailing public → {API_KEY} (keys stay local) |
Chain: EVM chainId = 0x1237 (4663). Free 3M Requests / 30 days · Public endpoints · eth_subscribe · Pricing.
1. States to watch while you hold
| Tape feel | On-chain signal | Watch |
|---|---|---|
| Deployer moves | Deployer balance / nonce drift; related Transfer | Snapshot bal / history; Δ over threshold → tag |
| LP / reserve drift | Pool Sync / Mint / Burn; reserve0/1 | Sharp drop / rise vs baseline |
| Swap pulse | Pool Swap logs; per-tx amount | Quiet window vs spike window |
| Fee / phase flip | Custom topics (fee / phase / mode) | Topic value changed → phase switch |
Watchtower = your local position table (token / pool / deployer) + last-tick state. Signal lands on log pushes, then you diff.
2. State machine + eth_subscribe (watchtower recipe)
Keep a lowercase, deduped position watchlist: { token, pool, deployer }. One public WSS, narrow logs; on each push, update state and compare to the prior tick.
Step A · Subscribe pool Sync / Swap (sample)
{
"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe",
"params": ["logs", {
"address": "0xYourPoolAddress",
"topics": []
}]
}
address= the pool for your position. Add Sync / Swap / Burn topic0 whenever you can narrow.- After Sync decode, take
reserve0/reserve1; Δ% vs baseline → LP drift.
Step B · Subscribe Transfer (deployer / treasury side)
{
"jsonrpc": "2.0", "id": 2, "method": "eth_subscribe",
"params": ["logs", {
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
null,
null
]
}]
}
topics[0]= ERC-20Transfer. Deployer on from / to → update deployer history.- Periodically align with HTTPS
eth_getBalance(deployer) for a balance snapshot.
Step C · Local state diff
| Field | Source | Demo diff rule |
|---|---|---|
reserves | Sync | Δ% ≥ R → LP drop / spike |
lastSwap | Swap | Single fill ≥ S → large swap |
phase | Custom topic / storage | Value changed → phase switch |
quietVsSpike | In-window Swap count | Low-rate quiet / high-rate pulse |
Tune R / S / window yourself. Tags = interpretation: JSON → dashboard chips / alert copy.
3. Preview: position watchtower demo (StackBlitz)
Defaults to BlockReq public WSS; paste token / pool / deployer, live-tag LP drift / large swap / phase. Code lives in StackBlitz—article embeds the preview only:
Repo: blockreq/blog-demos → examples/robinhood-position-watchtower. For keyed: swap trailing public for {API_KEY}.
4. Alert rules (LP / large swap / phase)
- Baseline → after entry, store
{ reserves0, phase, t0 }. - Each related log → refresh state; compute Δreserves, single-swap size, phase hash.
- Any hit → tag and optionally webhook:
- LP Δ% ≥ R → LP drop (or spike)
- Single Swap ≥ S → large swap
- Phase changed → phase switch
- Quiet vs spike → sliding-window Swap count; cross threshold → feel tag.
Disconnects: reconnect → re-subscribe; gap-fill with HTTPS eth_getLogs in block segments, replay the same state diff. POST → https://robinhood-mainnet-rpc.blockreq.com/v1/rpc/public.
5. Summary
- Position watchtower = position watchlist + logs subscribe + local state diff.
- Recipe: pool Sync/Swap + deployer Transfer + R/S/phase rules → LP / large-swap / phase tags.
- Public WSS runs as-is; Free 3M covers short hold sessions; long boards go keyed.
- Series: open rhythm · volume density · whale follow-flow · this holding-period state machine.
Next: pin the position table as JSON → wire tags to webhooks → persist backfill checkpoints. Public endpoints · Plans & pricing.