RBudzynski commited on
Commit
db52549
·
verified ·
1 Parent(s): 647b4f5

Upload 5 files

Browse files
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ tags:
4
+ - ethereum
5
+ - evm
6
+ - blockchain
7
+ - cryptocurrency
8
+ - crypto
9
+ - onchain-data
10
+ - tabular
11
+ - timeseries
12
+ - datasets
13
+ - pandas
14
+ - polars
15
+ - duckdb
16
+ pretty_name: BlockDB Swap Fees - Sample
17
+ size_categories:
18
+ - 10M<n<100M
19
+ ---
20
+
21
+ ## Sample Notice
22
+
23
+ This dataset contains **a small sample** of the full BlockDB Swap Fees dataset.
24
+ It is provided **for evaluation, research, and interoperability testing only**.
25
+
26
+ If you need full historical coverage, real-time streaming, or end-of-day (EOD) exports
27
+ please contact us directly:
28
+
29
+ 📧 **support@blockdb.io**
30
+ 🌐 https://www.blockdb.io
31
+
32
+
33
+ ## Dataset Overview
34
+ Per-swap fee accounting with detailed breakdown. Each row represents fee amounts collected on a specific swap event, including total fee, user/LP share, protocol share, and extra fees (burn/staking), all denominated in the fee token (typically token_in).
35
+
36
+
37
+ ## Chains and Coverage
38
+ ETH, BSC, Base, Arbitrum, Unichain, Avalanche, Polygon, Celo, Linea, Optimism (others on request).
39
+ Full history from chain genesis; reorg-aware real-time ingestion and updates.
40
+
41
+
42
+ ## Schema
43
+ List of columns exactly as delivered:
44
+
45
+ • id BIGINT – Unique swap fee record identifier (primary key)
46
+ • pool_uid BYTEA – Unique pool identifier (FK to liquidity_pools)
47
+ • exchange_id INTEGER – Exchange/DEX identifier
48
+ • type_id INTEGER – Pool type identifier (FK to liquidity_pool_types)
49
+ • block_number BIGINT – Block when the swap was observed
50
+ • block_time TIMESTAMPTZ – UTC timestamp when the block was mined
51
+ • tx_index INTEGER – Transaction index within the block
52
+ • log_index INTEGER – Log index within the block
53
+ • token_in BYTEA – 20-byte address of input token
54
+ • token_out BYTEA – 20-byte address of output token
55
+ • fee_token BYTEA – 20-byte address of the token fees are denominated in
56
+ • amount_in NUMERIC(78,0) – Executed input amount (decimals-adjusted)
57
+ • amount_out NUMERIC(78,0) – Executed output amount (decimals-adjusted)
58
+ • fee_amount_total NUMERIC(78,0) – Total fee amount in fee_token units
59
+ • fee_amount_user NUMERIC(78,0) – LP/user share in fee_token units
60
+ • fee_amount_protocol NUMERIC(78,0) – Protocol share in fee_token units
61
+ • fee_amount_extra NUMERIC(78,0) – Other share in fee_token units (burn/staking/etc.)
62
+ • _tracing_id BYTEA – Tracing ID of this swap fees record
63
+ • _genesis_tracing_ids BYTEA[] – Tracing IDs of the genesis records leading to this record
64
+ • _parent_tracing_ids BYTEA[] – Tracing IDs of the parent records leading to this record
65
+ • _created_at TIMESTAMPTZ – Record creation timestamp
66
+ • _updated_at TIMESTAMPTZ – Record last update timestamp
67
+
68
+
69
+ ### Notes
70
+ • fee_token is either token_in or token_out; fee_amount_total ≤ amount of fee_token.
71
+ • fee_amount_user + fee_amount_protocol + fee_amount_extra ≤ fee_amount_total.
72
+ • Unique constraint: (pool_uid, token_in, token_out, block_number, tx_index, log_index) guarantees one fee record per swap log per direction.
73
+ • Indexes on (pool_uid, block_number DESC, tx_index DESC, log_index DESC), (pool_uid, block_time DESC, tx_index DESC, log_index DESC), (block_number, tx_index, log_index), block_time, and (token_in, token_out, block_time DESC) support fast lookups.
74
+
75
+
76
+ ## Lineage
77
+ Each swap fee record includes deterministic _tracing_id, _genesis_tracing_ids, and _parent_tracing_ids, providing:
78
+
79
+ • Provenance tracking from raw logs to decoded fee events
80
+ • Reproducible analytics and signal extraction
81
+ • Cross-system consistency checks (RPC vs. indexers vs. internal warehouses)
82
+
83
+
84
+ ## Common Use Cases
85
+ • LP revenue analysis and yield estimation
86
+ • Protocol fee revenue tracking
87
+ • Cost of execution analysis for traders
88
+ • Fee tier comparison across DEXes and pools
89
+
90
+
91
+ ## Quality
92
+ • Verifiable lineage: deterministic cryptographic hashes per row
93
+ • Reorg-aware ingestion: continuity and consistency across forks
94
+ • Complete historical coverage: from chain genesis to present
assets/banner.jpg ADDED

Git LFS Details

  • SHA256: bb1b2b215c7ac7ee8251c3bbb54d7de218cdbda551b7f035db465483d799e5e5
  • Pointer size: 132 Bytes
  • Size of remote file: 1.09 MB
data/blockdb0303_liquidity_pools_swap_fees_v1.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/blockdb0303_liquidity_pools_swap_fees_v1.json ADDED
The diff for this file is too large to render. See raw diff
 
data/blockdb0303_liquidity_pools_swap_fees_v1.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e5f5f3e1ff75dbc2abf37e71ee2291c16050eb3f9cfd87d2490d3d3e7a6563b
3
+ size 280016