@@ -50,10 +50,10 @@ type Token @entity {
50
50
51
51
factory : DatatokenFactory #
52
52
53
- creator : String # TODO
54
- publisher : String # TODO
55
- minter : String # TODO
56
- editor : String # TODO
53
+ creator : String # TODO:
54
+ publisher : String # TODO:
55
+ minter : String # TODO:
56
+ editor : String # TODO:
57
57
58
58
holderCount : BigInt # Number of addresses holding a balance of datatoken
59
59
orderCount : BigInt # Number of orders executed for this datatoken
@@ -67,37 +67,26 @@ type Token @entity {
67
67
68
68
type Pool @entity {
69
69
id : ID ! # Pool address
70
- factoryID --> poolFactory : PoolFactory !
70
+ poolFactory : PoolFactory ! # Pool factory
71
71
controller : Bytes ! # Controller address
72
- publicSwap --> isPublicSwap : Boolean ! # isPublicSwap
73
- finalized --> isFinalized : Boolean ! # isFinalized
72
+ isPublicSwap : Boolean ! # TODO : what is this?
73
+ isFinalized : Boolean ! # only finalized pools are relevant to us
74
74
75
- // will be able to change in v4 , set by market or maybe by user
76
75
symbol : String # Pool token symbol
77
- // will be a user inputed name
78
76
name : String # Pool token name
79
77
cap : BigInt # Maximum supply if any
80
- active --> isActive : Boolean ! # isActive
78
+ isActive : Boolean ! #
81
79
swapFee : BigDecimal ! # Swap Fees
82
80
83
- totalWeight : BigDecimal !
81
+ totalWeight : BigDecimal ! # TODO: What is this?
84
82
totalShares : BigDecimal ! # Total pool token shares
85
83
totalSwapVolume : BigDecimal ! # Total swap volume in main token
86
- totalSwapFee : BigDecimal ! # Total swap fee in main token
84
+ totalSwapFee : BigDecimal ! # TODO: is this correct ? Total swap fee in main token
87
85
88
- valueLocked : BigDecimal ! # value locked in pool expressed in main token (captures both Ocean and Datatoken)
89
- //will be on token
90
- datatokenReserve : BigDecimal ! # Total pool reserve of Datatoken
91
- // will be on token
92
- mainTokenReserve : BigDecimal ! # Total pool reserve of main token
86
+ totalValueLocked : BigDecimal ! # value locked in pool expressed in main token (captures both Ocean and Datatoken)
93
87
94
88
spotPrice : BigDecimal !
95
- consumePrice : BigDecimal !
96
-
97
- // remove
98
- tokenCount : BigInt ! # Number of tokens in the pool
99
- // remove
100
- holderCount : BigInt ! # Number of addresses holding a positive balance of pool shares
89
+ consumePrice : BigDecimal ! # TODO: still need?
101
90
102
91
// what is the point of the counts , we never used them => remove
103
92
joinCount : BigInt ! # liquidity has been added
@@ -388,3 +377,26 @@ type DispenserTransaction @entity {
388
377
tx : Bytes !
389
378
type : String !
390
379
}
380
+
381
+
382
+ type PoolSnapshotTokenValue @entity {
383
+ id : ID ! # pool tx + tokenAddress
384
+ tokenAddress : String !
385
+ value : BigDecimal !
386
+ tokenReserve : BigDecimal !
387
+ feeValue : BigDecimal ! # Swap fee value in OCEAN
388
+ type : String !
389
+ poolSnapshot : PoolSnapshot !
390
+ }
391
+
392
+
393
+ type PoolSnapshot @entity {
394
+ id : ID !
395
+ pool : Pool !
396
+ totalShares : BigDecimal !
397
+ swapVolume : BigDecimal !
398
+ swapFees : BigDecimal !
399
+ timestamp : Int !
400
+ tokens : [PoolSnapshotTokenValue ! ] @derivedFrom (field : " poolSnapshot" )
401
+ }
402
+
0 commit comments