chain-insights 0.66.1 → 0.67.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: chain-insights-dex-vault
3
+ description: Use for the dex-vault trail - exchanges where one pool manager contract holds every pool, such as Uniswap v4, Balancer v2, Balancer v3 and PancakeSwap Infinity on robinhood - when a seller's swap names the pool manager or vault, when a question asks who bought past the manager, or which pools such an exchange has. Loaded by chain-insights-dex for a vault row of its memo.
4
+ ---
5
+
6
+ # Chain Insights: the vault trail (Uniswap v4, Balancer, PancakeSwap Infinity)
7
+
8
+ Load `chain-insights-cypher` first, then `chain-insights-dex` for the memo:
9
+ the brand's manager comes from there. Their answer rules hold here: every
10
+ address in full, tokens worth an amount in USD, no query text in the answer,
11
+ times from the `_utc` twins.
12
+
13
+ On a vault exchange one contract, the **pool manager** (Balancer calls it
14
+ the vault), holds the tokens of every pool. A swap pays the manager and the
15
+ manager pays out:
16
+
17
+ ```
18
+ seller ──SWAPPED──▶ pool manager ──▶ buyer
19
+ settles every pool
20
+ ```
21
+
22
+ So a seller's `SWAPPED` recipient is the manager. **The manager is not the
23
+ buyer.** Name it for what it is, in full: "the Uniswap v4 pool manager
24
+ `0x8366a39cc670b4001a1121b8f6a443a643e40951`", "the Balancer v2 vault
25
+ `0xd315a9c38ec871068fec378e4ce78af528c76293`".
26
+
27
+ | Exchange | Manager |
28
+ |---|---|
29
+ | Uniswap v4 | `0x8366a39cc670b4001a1121b8f6a443a643e40951` |
30
+ | Balancer v2 | `0xd315a9c38ec871068fec378e4ce78af528c76293` |
31
+ | Balancer v3 | `0x28082618ba2073e602230188e4f4c46e9b2169eb` |
32
+ | PancakeSwap Infinity | `0xd01c774d4a66408326bc65728ac5ae5aaf004032` |
33
+
34
+ ## The buyer past the manager
35
+
36
+ 1. **The seller's swaps** (V1): its `SWAPPED` links. A row whose recipient is
37
+ the manager is a vault swap. Note its `last_seen_height`.
38
+ 2. **The day** (V2): the block of that height on `USE chain`.
39
+ 3. **The facts `SWAP` row** (V3) of the seller and the manager on that day.
40
+ Its `recipient` names who received the bought asset:
41
+ - a `recipient` that is not the manager is the buyer;
42
+ - a `recipient` equal to the manager means the manager paid the seller
43
+ back: the seller is the buyer of its own swap. Say "the seller swapped
44
+ for itself".
45
+ 4. Name the sold and bought assets by their contracts in full, with "tokens
46
+ worth about N USD on DAY".
47
+
48
+ **Never take a topology hop out of the manager.** The Uniswap v4 pool
49
+ manager links to about 480,000 receivers. A read of its receivers, a walk
50
+ through it, or a ranking of where its money went times out or names noise.
51
+ The walk guard of `chain-insights-cypher` keeps `:Protocol` contracts out of
52
+ every walk for this reason.
53
+
54
+ ## The pools of a vault exchange
55
+
56
+ A manager deploys no pool, so there is no factory to anchor on. Its pools are
57
+ the `pools` of the swaps it settles:
58
+
59
+ 1. **The swaps into the manager** (V4): one hop in, anchored on the manager,
60
+ ranked by what was sold. Collect the `pools` of the rows: those are the
61
+ exchange's busiest pools among these swaps.
62
+ 2. **The events of one pool**: take one seller from V4 and read its facts
63
+ `SWAP` rows with the manager on one day (V3).
64
+ 3. A pool id here may name the pool, not a contract of its own. Say "a pool
65
+ of the Uniswap v4 pool manager", never "a pool contract".
66
+
67
+ ## The next lead
68
+
69
+ End with who to trace next: the buyer's biggest receivers, the newest-links
70
+ read of `chain-insights-cypher` anchored on the buyer. When the buyer is the
71
+ seller itself, trace the seller's onward flows instead.
72
+
73
+ ## Queries
74
+
75
+ ### V1. One seller's swaps
76
+
77
+ ```cypher
78
+ USE topology
79
+ MATCH (s:Address {address: "0x705da6eb557a987960294597954d75e9be2a1983"})-[sw:SWAPPED]->(r:Address)
80
+ RETURN s.address AS from_address, r.address AS to_address, labels(r) AS to_node_labels, sw.sold_asset AS sold_asset, sw.bought_asset AS bought_asset, sw.sold_usd AS sold_usd, sw.bought_usd AS bought_usd, sw.swap_count AS swap_count, sw.pools AS pools, sw.last_seen_height AS last_seen_height ORDER BY sw.swap_count DESC LIMIT 25
81
+ ```
82
+
83
+ ### V2. The day of the swap
84
+
85
+ ```cypher
86
+ USE chain
87
+ MATCH (b:Block {block_height: 95508039}) RETURN b.block_date, b.block_timestamp
88
+ ```
89
+
90
+ ### V3. The facts SWAP row past the manager
91
+
92
+ ```cypher
93
+ USE facts
94
+ MATCH (s:Address {address: "0x705da6eb557a987960294597954d75e9be2a1983"})-[x:SWAP]->(m:Address {address: "0x8366a39cc670b4001a1121b8f6a443a643e40951"}) WHERE x.block_date = "2026-10-22"
95
+ RETURN s.address AS from_address, m.address AS to_address, x.payer AS payer, x.recipient AS recipient, x.sold_asset AS sold_asset, x.sold_usd AS sold_usd, x.bought_asset AS bought_asset, x.bought_usd AS bought_usd, x.tx_id AS tx_id, x.block_timestamp AS block_timestamp LIMIT 50
96
+ ```
97
+
98
+ ### V4. The swaps the manager settles, and their pools
99
+
100
+ ```cypher
101
+ USE topology
102
+ MATCH (s:Address)-[sw:SWAPPED]->(m:Address {address: "0x8366a39cc670b4001a1121b8f6a443a643e40951"})
103
+ RETURN s.address AS from_address, m.address AS to_address, sw.sold_usd AS sold_usd, sw.swap_count AS swap_count, sw.pools AS pools, sw.last_seen_height AS last_seen_height ORDER BY sw.sold_usd DESC LIMIT 25
104
+ ```
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: 'Chain Insights Exchanges: pool manager trail'
3
+ short_description: 'The real buyer past the Uniswap v4, Balancer or PancakeSwap pool manager'
4
+ default_prompt: 'Load chain-insights-cypher and chain-insights-dex first. When a swap names the pool manager, name it as the manager and read the buyer from the recipient of the facts SWAP row of the seller and the manager on that day. Never take a topology hop out of the manager.'
@@ -57,8 +57,20 @@ differ: find them first, never reuse these.
57
57
  | VIRTUAL token | `0xc6911796042b15d7fa4f6cde69e245ddcd3d9c31` |
58
58
  | Launch contract | `0xd4ccbfa37e2f35611b3042e4096ad7a3459bd007` |
59
59
  | Token factory | `0x43e4c17b15365596caae8e7d00e42bc8e988c2d4` |
60
- | Starting-pool factory | `0xfc2e4da3edb2e18100473339c763705d263d20a9` |
61
- | Uniswap v2 pair factory | `0x8bceaa40b9acdfaedf85adf4ff01f5ad6517937f` |
60
+
61
+ The starting-pool (bonding) factory comes from the exchange memo, the row
62
+ `chain-insights-dex` lists under Virtuals. The public pair of a graduated
63
+ agent is created on Uniswap's own v2 factory
64
+ `0x8bceaa40b9acdfaedf85adf4ff01f5ad6517937f` (the memo's `uniswap-v2` row):
65
+ most of that factory's pairs are Virtuals agents.
66
+
67
+ <!-- brands:start -->
68
+ The factories of the brand registry, version 1, row `virtuals`:
69
+
70
+ | Factory | Address |
71
+ |---|---|
72
+ | factory | `0xfc2e4da3edb2e18100473339c763705d263d20a9` |
73
+ <!-- brands:end -->
62
74
 
63
75
  **Hubs.** These carry millions of transactions. Keep them out of buyer,
64
76
  funder and shared-wallet lists **by address**: the graph does not mark
@@ -50,7 +50,7 @@ The origin sits on the wallet's own `BRIDGED` link, not on the bridge node.
50
50
  ```cypher
51
51
  USE topology
52
52
  MATCH (a:Address {address: "<wallet>"})-[x:BRIDGED]-(c:Chain)
53
- RETURN c.network AS remote_network, c.address AS endpoint, x.events AS events, x.kinds AS kinds LIMIT 10
53
+ RETURN c.network AS remote_network, c.address AS endpoint, x.kind AS kind, x.asset AS asset, x.events AS events LIMIT 10
54
54
  ```
55
55
 
56
56
  ### A5. Money in, out and kept
@@ -83,18 +83,18 @@ RETURN f.address AS factory, t.address AS contract, t.labels AS labels, r.tx_ori
83
83
 
84
84
  ### B1. Liquidity seeded and removed on a graduated pair
85
85
 
86
- No rows in the second read means nobody drained the pool.
86
+ No rows in the second read means nobody drained the pool. Each read has one row per party and asset: a pair holds the agent token and VIRTUAL, so one provider or receiver shows two rows.
87
87
 
88
88
  ```cypher
89
89
  USE topology
90
90
  MATCH (a:Address)-[r:ADDED_LIQUIDITY]->(p:Address {address: "<uniswap pair>"})
91
- RETURN a.address AS provider, r.usd AS added_usd, r.event_count AS events LIMIT 10
91
+ RETURN a.address AS provider, r.asset AS asset, r.amount_raw_sum AS amount_raw_sum, r.usd AS added_usd, r.event_count AS events LIMIT 10
92
92
  ```
93
93
 
94
94
  ```cypher
95
95
  USE topology
96
96
  MATCH (p:Address {address: "<uniswap pair>"})-[r:REMOVED_LIQUIDITY]->(b:Address)
97
- RETURN b.address AS receiver, r.usd AS removed_usd, r.event_count AS events, r.receiver_provided AS receiver_provided LIMIT 10
97
+ RETURN b.address AS receiver, r.asset AS asset, r.amount_raw_sum AS amount_raw_sum, r.usd AS removed_usd, r.event_count AS events, r.receiver_provided AS receiver_provided LIMIT 10
98
98
  ```
99
99
 
100
100
  ### B2. Did a wallet dump or pump the agent token?