-
Notifications
You must be signed in to change notification settings - Fork 0
/
UniswapV3Subgraph.puml
246 lines (218 loc) · 5 KB
/
UniswapV3Subgraph.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
@startuml
skinparam linetype ortho
class Factory {
+ id: ID!
+ poolCount: BigInt!
+ txCount: BigInt!
+ totalVolumeUSD: BigDecimal!
+ totalVolumeETH: BigDecimal!
+ totalFeesUSD: BigDecimal!
+ totalFeesETH: BigDecimal!
+ untrackedVolumeUSD: BigDecimal!
+ totalValueLockedUSD: BigDecimal!
+ totalValueLockedETH: BigDecimal!
+ totalValueLockedUSDUntracked: BigDecimal!
+ totalValueLockedETHUntracked: BigDecimal!
+ owner: ID!
}
class Bundle {
+ id: ID!
+ ethPriceUSD: BigDecimal!
}
class Token {
+ id: ID!
+ symbol: String!
+ name: String!
+ decimals: BigInt!
+ totalSupply: BigInt!
+ volume: BigDecimal!
+ volumeUSD: BigDecimal!
+ untrackedVolumeUSD: BigDecimal!
+ feesUSD: BigDecimal!
+ txCount: BigInt!
+ poolCount: BigInt!
+ totalValueLocked: BigDecimal!
+ totalValueLockedUSD: BigDecimal!
+ totalValueLockedUSDUntracked: BigDecimal!
+ derivedETH: BigDecimal!
}
class Pool {
+ id: ID!
+ createdAtTimestamp: BigInt!
+ createdAtBlockNumber: BigInt!
+ feeTier: BigInt!
+ liquidity: BigInt!
+ sqrtPrice: BigInt!
+ feeGrowthGlobal0X128: BigInt!
+ feeGrowthGlobal1X128: BigInt!
+ token0Price: BigDecimal!
+ token1Price: BigDecimal!
+ tick: BigInt
+ observationIndex: BigInt!
+ volumeToken0: BigDecimal!
+ volumeToken1: BigDecimal!
+ volumeUSD: BigDecimal!
+ untrackedVolumeUSD: BigDecimal!
+ feesUSD: BigDecimal!
+ txCount: BigInt!
+ collectedFeesToken0: BigDecimal!
+ collectedFeesToken1: BigDecimal!
+ collectedFeesUSD: BigDecimal!
+ totalValueLockedToken0: BigDecimal!
+ totalValueLockedToken1: BigDecimal!
+ totalValueLockedETH: BigDecimal!
+ totalValueLockedUSD: BigDecimal!
+ totalValueLockedUSDUntracked: BigDecimal!
+ liquidityProviderCount: BigInt!
}
class Tick {
+ id: ID!
+ poolAddress: String
+ tickIdx: BigInt!
+ liquidityGross: BigInt!
+ liquidityNet: BigInt!
+ price0: BigDecimal!
+ price1: BigDecimal!
+ volumeToken0: BigDecimal!
+ volumeToken1: BigDecimal!
+ volumeUSD: BigDecimal!
+ untrackedVolumeUSD: BigDecimal!
+ feesUSD: BigDecimal!
+ createdAtTimestamp: BigInt!
+ createdAtBlockNumber: BigInt!
+ liquidityProviderCount: BigInt!
+ feeGrowthOutside0X128: BigInt!
+ feeGrowthOutside1X128: BigInt!
}
class Position {
+ id: ID!
+ owner: Bytes!
+ liquidity: BigInt!
+ depositedToken0: BigDecimal!
+ depositedToken1: BigDecimal!
+ withdrawnToken0: BigDecimal!
+ withdrawnToken1: BigDecimal!
+ collectedFeesToken0: BigDecimal!
+ collectedFeesToken1: BigDecimal!
+ feeGrowthInside0LastX128: BigInt!
+ feeGrowthInside1LastX128: BigInt!
}
class PositionSnapshot {
+ id: ID!
+ owner: Bytes!
+ blockNumber: BigInt!
+ timestamp: BigInt!
+ liquidity: BigInt!
+ depositedToken0: BigDecimal!
+ depositedToken1: BigDecimal!
+ withdrawnToken0: BigDecimal!
+ withdrawnToken1: BigDecimal!
+ collectedFeesToken0: BigDecimal!
+ collectedFeesToken1: BigDecimal!
+ feeGrowthInside0LastX128: BigInt!
+ feeGrowthInside1LastX128: BigInt!
}
class Transaction {
+ id: ID!
+ blockNumber: BigInt!
+ timestamp: BigInt!
+ gasUsed: BigInt!
+ gasPrice: BigInt!
}
class Mint {
+ id: ID!
+ timestamp: BigInt!
+ amount: BigInt!
+ amount0: BigDecimal!
+ amount1: BigDecimal!
+ amountUSD: BigDecimal
+ logIndex: BigInt
}
class Burn {
+ id: ID!
+ timestamp: BigInt!
+ amount: BigInt!
+ amount0: BigDecimal!
+ amount1: BigDecimal!
+ amountUSD: BigDecimal!
+ logIndex: BigInt
}
class Swap {
+ id: ID!
+ timestamp: BigInt!
+ amount0: BigDecimal!
+ amount1: BigDecimal!
+ amountUSD: BigDecimal!
+ sqrtPriceX96: BigInt!
+ tick: BigInt!
+ logIndex: BigInt
}
class Collect {
+ id: ID!
+ timestamp: BigInt!
+ amount0: BigDecimal!
+ amount1: BigDecimal!
+ amountUSD: BigDecimal!
+ tickLower: BigInt!
+ tickUpper: BigInt!
+ logIndex: BigInt
}
class Flash {
+ id: ID!
+ timestamp: BigInt!
+ amount: BigDecimal!
+ amountUSD: BigDecimal!
+ logIndex: BigInt
}
class PoolHourData {
+ id: ID!
+ periodStart: BigInt!
+ tvlUSD: BigDecimal!
+ tvlUSDUntracked: BigDecimal!
+ totalVolumeUSD: BigDecimal!
+ totalVolumeUSDUntracked: BigDecimal!
+ feesUSD: BigDecimal!
+ feesUSDUntracked: BigDecimal!
}
class PoolDayData {
+ id: ID!
+ periodStart: BigInt!
+ tvlUSD: BigDecimal!
+ tvlUSDUntracked: BigDecimal!
+ totalVolumeUSD: BigDecimal!
+ totalVolumeUSDUntracked: BigDecimal!
+ feesUSD: BigDecimal!
+ feesUSDUntracked: BigDecimal!
}
Factory --|> Bundle
Factory --|> Pool
Pool --|> Token
Pool --|> PoolHourData
Pool --|> PoolDayData
Pool --|> Mint
Pool --|> Burn
Pool --|> Swap
Pool --|> Collect
Pool --|> Tick
Tick --|> Pool
Position --|> Pool
Position --|> Token
PositionSnapshot --|> Position
Transaction --|> Mint
Transaction --|> Burn
Transaction --|> Swap
Transaction --|> Collect
Transaction --|> Flash
Mint --|> Pool
Mint --|> Token
Burn --|> Pool
Burn --|> Token
Swap --|> Pool
Swap --|> Token
Collect --|> Pool
Collect --|> Token
Flash --|> Pool
Flash --|> Token
PoolHourData --|> Pool
PoolDayData --|> Pool
@enduml