@zkp2p/indexer-schema 0.2.0 → 0.2.3

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.
package/llms.txt ADDED
@@ -0,0 +1,681 @@
1
+ # @zkp2p/indexer-schema
2
+
3
+ > GraphQL schema and TypeScript types for the ZKP2P on-chain indexer. Source of truth for all downstream consumers (curator, SDK, notification server).
4
+
5
+ ZKP2P is a peer-to-peer fiat-to-crypto exchange protocol on Base (chain 8453). Makers deposit USDC liquidity with conversion rates. Takers signal intents to buy, make off-chain fiat payments (Venmo, Wise, etc.), then submit TLS proofs to release escrowed funds on-chain.
6
+
7
+ ## How to use this package
8
+
9
+ ```ts
10
+ // TypeScript types for all indexed entities
11
+ import type { Deposit, Intent, QuoteCandidate, MethodCurrency } from '@zkp2p/indexer-schema';
12
+ import { DepositStatus, IntentStatus } from '@zkp2p/indexer-schema';
13
+
14
+ // Raw GraphQL SDL string
15
+ import { schemaSDL } from '@zkp2p/indexer-schema';
16
+
17
+ // For codegen configs: node_modules/@zkp2p/indexer-schema/dist/schema.graphql
18
+ ```
19
+
20
+ ## Reading Conventions
21
+
22
+ - `Deposit.id` is the canonical join key for deposit-scoped rows: `escrowAddress_depositId`.
23
+ - `Intent.id` is the canonical join key for intent-scoped rows: `chainId_intentHash`.
24
+ - `@derivedFrom` relationships exist only where the schema declares them. Most other relationships are implicit string joins.
25
+ - Amount fields are stored in the token's smallest unit. In practice this indexer is restricted to supported USDC deployments, so most token amounts are 6-decimal USDC amounts.
26
+ - Conversion-rate fields use 1e18 fixed-point precision unless noted otherwise.
27
+ - `BigInt` fields are serialized as **strings** (too large for JSON numbers).
28
+ - `Int` fields are **numbers**.
29
+ - Addresses and hashes are lowercase hex strings.
30
+ - Currency codes are bytes32 keccak hashes.
31
+ - Timestamps are Unix seconds as BigInt strings.
32
+ - Basis points: 10000 = 100%.
33
+
34
+ ## Entity Relationship Map
35
+
36
+ ```
37
+ Deposit (1)──────(N) DepositPaymentMethod
38
+ │ │
39
+ │ │ (shares paymentMethodHash)
40
+ │ │
41
+ ├──(N) MethodCurrency ───┘ (1 per deposit × method × currency)
42
+ │ │
43
+ │ └── rates: minConversionRate, managerRate, conversionRate, takerConversionRate
44
+ │ oracle: adapter, feed, oracleRate, effectiveOracleRate
45
+
46
+ ├──(N) Intent
47
+ │ │── status: SIGNALED → FULFILLED | PRUNED | MANUALLY_RELEASED
48
+ │ │── payment proof: paymentAmount, paymentCurrency, paymentId
49
+ │ └── settlement: releasedAmount, takerAmountNetFees
50
+
51
+ ├──(N) DepositFundActivity (append-only ledger)
52
+
53
+ └──(N) DepositDailySnapshot (daily rollup)
54
+
55
+ QuoteCandidate = denormalized join of Deposit + MethodCurrency + DepositPaymentMethod
56
+ (optimized for rate-first quoting queries)
57
+
58
+ MakerStats ←── aggregated from Deposits + Intents (per maker address)
59
+ TakerStats ←── aggregated from Intents (per taker address)
60
+ MakerPlatformStats ←── per maker × payment method
61
+ MakerCurrencyStats ←── per maker × currency
62
+
63
+ RateManager (1)──(N) RateManagerRate (per method × currency)
64
+
65
+ ├──(N) ManagerStats (per deposit under this manager)
66
+ ├──(1) ManagerAggregateStats (totals across all deposits)
67
+ └──(N) ManagerDailySnapshot (daily TVL, volume, fees)
68
+
69
+ PriceSnapshot ←── daily FX rates (USD/EUR/GBP/etc.)
70
+ MakerProfitSnapshot ←── per-intent profit: quote rate vs oracle FX rate
71
+ ReferralFeeDistribution ←── per-intent referral fee breakdown
72
+ WhitelistEntry ←── per-deposit taker whitelist for private orderbooks
73
+ ```
74
+
75
+ ### Explicit Schema Edges
76
+
77
+ - `Deposit -> Intent` via `Intent.depositId` and `Deposit.intents @derivedFrom(field: "depositId")`
78
+ - `Deposit -> DepositPaymentMethod` via `DepositPaymentMethod.depositId`
79
+ - `Deposit -> MethodCurrency` via `MethodCurrency.depositId`
80
+ - `Deposit -> DepositFundActivity` via `DepositFundActivity.depositId`
81
+ - `Deposit -> DepositDailySnapshot` via `DepositDailySnapshot.depositId`
82
+
83
+ ### Implicit Joins Used by Handlers and Consumers
84
+
85
+ - `DepositPaymentMethod <-> MethodCurrency` by `(depositId, paymentMethodHash)`
86
+ - `MethodCurrency <-> QuoteCandidate` by identical tuple identity; `QuoteCandidate.id` matches `MethodCurrency.id`
87
+ - `Intent <-> ReferralFeeDistribution` by `ReferralFeeDistribution.intentId = Intent.id`
88
+ - `Deposit/Intent -> maker stats` by maker address (`Deposit.depositor`)
89
+ - `Intent -> taker stats` by taker address (`Intent.owner`)
90
+ - `Deposit/MethodCurrency/Intent -> rate-manager entities` by `(chainId, rateManagerAddress, rateManagerId)`
91
+ - `MakerProfitSnapshot -> PriceSnapshot` by `priceSnapshotId`
92
+
93
+ ### Denormalized/Projection Entities
94
+
95
+ - `QuoteCandidate` is a read-optimized projection over `Deposit + DepositPaymentMethod + MethodCurrency`.
96
+ - `MakerStats`, `MakerPlatformStats`, `MakerCurrencyStats`, `TakerStats`, `ManagerAggregateStats`, `ManagerStats`, `DepositDailySnapshot`, and `ManagerDailySnapshot` are aggregation/snapshot entities, not raw event mirrors.
97
+
98
+ ## Enum Reference
99
+
100
+ ### `DepositStatus`
101
+
102
+ - `ACTIVE`: Deposit can still participate in the maker lifecycle. Whether it is currently quoteable also depends on `acceptingIntents`, remaining liquidity, payment-method activity, and a non-zero resolved rate.
103
+ - `CLOSED`: Deposit has been explicitly closed on-chain. Quote candidates for closed deposits are deleted.
104
+
105
+ ### `IntentStatus`
106
+
107
+ - `SIGNALED`: Intent exists and funds may be locked, but settlement is not final yet.
108
+ - `FULFILLED`: Intent completed normally.
109
+ - `PRUNED`: Intent was cancelled/unlocked on-chain.
110
+ - `MANUALLY_RELEASED`: Funds were released through the manual-release path rather than the normal verifier path.
111
+
112
+ ### `PriceSnapshotStatus`
113
+
114
+ - `LIVE`: Snapshot was fetched during normal live indexing.
115
+ - `BACKFILL`: Snapshot was created during historical catch-up or another non-live backfill flow.
116
+
117
+ ### `ProfitStatus`
118
+
119
+ - `COMPUTED`: Profit could be computed because a usable FX snapshot existed.
120
+ - `PENDING`: Profit row exists, but the oracle side of the comparison was unavailable at write time.
121
+
122
+ ## Domain Entities — Full Field Reference
123
+
124
+ ### `Deposit`
125
+
126
+ Canonical maker-owned escrow position. This is the root entity for most business queries. Deposit rows are created from deposit-received events and then mutated by funding, withdrawal, closing, intent lock/unlock, delegated-rate-manager, and oracle-resolution flows.
127
+
128
+ **Relationships:**
129
+ - Parent of `Intent`, `DepositPaymentMethod`, `MethodCurrency`, `DepositFundActivity`, and `DepositDailySnapshot`
130
+ - Indirect source for `QuoteCandidate`
131
+ - Optional many-to-one relationship to `RateManager`
132
+ - Source record for `MakerStats`, `ManagerStats`, and manager aggregate balances
133
+
134
+ | Field | Type | Meaning |
135
+ |-------|------|---------|
136
+ | `id` | `string` | Canonical deposit key `escrowAddress_depositId`. This exists because raw on-chain `depositId` is not globally unique across escrows. |
137
+ | `chainId` | `number` | Chain where the escrow contract lives. |
138
+ | `escrowAddress` | `string` | Escrow contract address that owns the deposit funds and scopes the deposit namespace. |
139
+ | `depositId` | `string (BigInt)` | Raw on-chain deposit identifier emitted by the escrow contract. |
140
+ | `depositor` | `string` | Maker address that created and owns the deposit. |
141
+ | `token` | `string` | ERC20 token being sold. In practice the indexer only materializes supported USDC addresses. |
142
+ | `delegate` | `string` | Address currently allowed to manage deposit settings on behalf of the maker. |
143
+ | `intentAmountMin` | `string (BigInt)` | Smallest token amount the maker will accept for a single intent. |
144
+ | `intentAmountMax` | `string (BigInt)` | Largest token amount the maker will accept for a single intent. |
145
+ | `acceptingIntents` | `boolean` | Explicit maker toggle. Quotes should be suppressed when this is `false` even if liquidity still exists. |
146
+ | `status` | `DepositStatus` | Coarse lifecycle state. `CLOSED` means the deposit was explicitly closed; it is stronger than merely having no liquidity. |
147
+ | `remainingDeposits` | `string (BigInt)` | Immediately available maker liquidity that can still be locked into new intents or withdrawn. |
148
+ | `outstandingIntentAmount` | `string (BigInt)` | Liquidity currently reserved by signaled intents that have not been fully resolved yet. |
149
+ | `totalAmountTaken` | `string (BigInt)` | All-time amount that actually left the deposit to takers through fulfillment or manual release. |
150
+ | `totalWithdrawn` | `string (BigInt)` | All-time amount withdrawn back to the maker through withdrawal events. |
151
+ | `totalIntents` | `number` | Total number of intents ever locked against the deposit. |
152
+ | `signaledIntents` | `number` | Count of intent-lock events seen for this deposit. |
153
+ | `fulfilledIntents` | `number` | Count of intents that finished successfully or via manual release. |
154
+ | `prunedIntents` | `number` | Count of intents that were unlocked/cancelled without fulfillment. |
155
+ | `successRateBps` | `number` | Deposit-level quality score in basis points. New deposits start at `10000`; later it tracks `fulfilled / total` in basis points. |
156
+ | `blockNumber` | `string (BigInt)` | Block in which the deposit was first seen. |
157
+ | `timestamp` | `string (BigInt)` | Creation timestamp from the deposit-received event. |
158
+ | `txHash` | `string` | Transaction that created the deposit row. |
159
+ | `updatedAt` | `string (BigInt)` | Timestamp of the most recent mutation to this deposit row. |
160
+ | `rateManagerId` | `string?` | Optional delegated rate-manager identifier currently assigned to the deposit. |
161
+ | `rateManagerAddress` | `string?` | Optional rate-manager contract address paired with `rateManagerId`. |
162
+ | `delegatedAt` | `string? (BigInt)` | Timestamp when the current delegated manager assignment was applied. |
163
+
164
+ **Balance identity:** `balance = remainingDeposits + outstandingIntentAmount`
165
+ **Gross deposited (all-time):** `remainingDeposits + outstandingIntentAmount + totalAmountTaken + totalWithdrawn`
166
+
167
+ ### `DepositPaymentMethod`
168
+
169
+ Deposit-scoped payment platform configuration. Each row says "this deposit accepts this payment-method hash, with these payee details and optional gating requirements."
170
+
171
+ **Relationships:**
172
+ - Many-to-one to `Deposit` through `depositId`
173
+ - Logical sibling of `MethodCurrency` on `(depositId, paymentMethodHash)`
174
+ - One of the three source entities used to materialize `QuoteCandidate`
175
+
176
+ | Field | Type | Meaning |
177
+ |-------|------|---------|
178
+ | `id` | `string` | Composite key `escrowAddress_depositId_paymentMethodHash`. |
179
+ | `chainId` | `number` | Chain where the parent deposit lives. |
180
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
181
+ | `depositIdOnContract` | `string (BigInt)` | Raw on-chain deposit id copied for convenience and external correlation. |
182
+ | `paymentMethodHash` | `string` | Canonical bytes32-like payment-method identifier used by contracts and quoting. |
183
+ | `intentGatingService` | `string` | Optional external service address/string that must authorize or gate takers before they can use this method. |
184
+ | `payeeDetailsHash` | `string` | Hash of the off-chain payee details that the taker must prove they paid. |
185
+ | `active` | `boolean` | Method-level on/off toggle. `QuoteCandidate.isActive` also depends on this value. |
186
+
187
+ ### `MethodCurrency`
188
+
189
+ Per `(deposit, payment method, fiat currency)` pricing configuration. This is the most important rate-resolution entity in the schema. It stores the depositor's fixed floor, delegated manager input, oracle configuration and snapshots, and the final resolved rate that quoting and validation use.
190
+
191
+ **Relationships:**
192
+ - Many-to-one to `Deposit`
193
+ - Logical many-to-one to `DepositPaymentMethod` by `(depositId, paymentMethodHash)`
194
+ - Optional many-to-one to `RateManager` through `rateManagerId` plus the deposit's `rateManagerAddress`
195
+ - Source record for `QuoteCandidate`; the quote row reuses this entity's identity
196
+
197
+ | Field | Type | Meaning |
198
+ |-------|------|---------|
199
+ | `id` | `string` | Composite key `escrowAddress_depositId_paymentMethodHash_currencyCode`. |
200
+ | `chainId` | `number` | Chain where the parent deposit lives. |
201
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
202
+ | `depositIdOnContract` | `string (BigInt)` | Raw on-chain deposit id for cross-checking with contract logs. |
203
+ | `paymentMethodHash` | `string` | Payment-method component of the tuple. |
204
+ | `currencyCode` | `string` | Fiat currency component of the tuple. |
205
+ | `minConversionRate` | `string (BigInt)` | Maker-defined fixed floor for the tuple. In legacy flows this can also be the directly used static rate. |
206
+ | `managerRate` | `string? (BigInt)` | Delegated manager quote before floor enforcement and before manager fee is applied. |
207
+ | `managerFee` | `string? (BigInt)` | Delegated manager fee rate in 1e18 precision. This does not lower `conversionRate`; it is turned into a taker-facing markup when computing `takerConversionRate`. |
208
+ | `conversionRate` | `string? (BigInt)` | Final gross resolved rate used for intent validation and contract-aligned quote logic. |
209
+ | `takerConversionRate` | `string? (BigInt)` | Final all-in rate shown to takers. In delegated mode this incorporates manager fee on top of the gross rate. |
210
+ | `rateSource` | `string?` | Resolution reason for `conversionRate`: `MANAGER` \| `ORACLE` \| `ESCROW_FLOOR` \| `MANAGER_DISABLED` \| `ORACLE_HALTED` \| `NO_FLOOR`. |
211
+ | `rateManagerId` | `string?` | Delegated manager id that supplied the current delegated rate, if any. |
212
+ | `adapter` | `string?` | Oracle adapter contract address used to interpret `adapterConfig`. |
213
+ | `adapterConfig` | `string?` | Encoded adapter config bytes stored exactly as emitted. |
214
+ | `feed` | `string?` | Resolved oracle feed address or feed id after decoding the adapter config. |
215
+ | `feedDecimals` | `number?` | Feed decimals used to normalize oracle answers into the shared 1e18 rate format. |
216
+ | `spreadBps` | `number?` | Maker-configured markup applied to raw oracle output before final floor/manager resolution. |
217
+ | `maxStaleness` | `string? (BigInt)` | Maximum acceptable oracle age in seconds before the tuple is considered stale. |
218
+ | `invert` | `boolean?` | Whether the oracle answer must be inverted before being converted into the shared rate representation. |
219
+ | `oracleRate` | `string? (BigInt)` | Raw oracle-derived rate before spread markup. |
220
+ | `effectiveOracleRate` | `string? (BigInt)` | Oracle rate after applying `spreadBps`. |
221
+ | `lastOracleUpdatedAt` | `string? (BigInt)` | Timestamp of the latest accepted oracle datapoint used by this row. |
222
+ | `kind` | `string?` | Decoded oracle kind, currently `oracle_chainlink`, `oracle_pyth`, or `oracle_unknown`. |
223
+
224
+ **Rate resolution order:** Manager rate (if delegated) → Oracle rate (if configured) → Escrow floor (minConversionRate). The `rateSource` field records which path was taken.
225
+
226
+ ### `Intent`
227
+
228
+ Canonical taker intent row. An `Intent` starts when the taker signals intent and ends in fulfillment or prune. This entity intentionally separates on-chain lifecycle (`status`) from off-chain expiry reconciliation (`isExpired`).
229
+
230
+ **Relationships:**
231
+ - Many-to-one to `Deposit`
232
+ - Parent of `ReferralFeeDistribution`
233
+ - Feeds `TakerStats`, maker stats rollups, profit snapshots, and manager aggregates
234
+
235
+ **Lifecycle:** `SIGNALED` → `FULFILLED` | `PRUNED` | `MANUALLY_RELEASED`
236
+
237
+ | Field | Type | Meaning |
238
+ |-------|------|---------|
239
+ | `id` | `string` | Canonical key `chainId_intentHash`. |
240
+ | `intentHash` | `string` | Raw on-chain intent hash. |
241
+ | `orchestratorAddress` | `string` | Contract address that coordinated the intent. In legacy v2 this is effectively the escrow address; in newer flows it is the orchestrator. |
242
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
243
+ | `verifier` | `string` | Verifier contract or address associated with the payment proof. In v21 it is updated again when payment verification arrives. |
244
+ | `paymentMethodHash` | `string?` | Payment-method hash associated with the intent. Optional because some legacy flows populate it indirectly. |
245
+ | `owner` | `string` | Taker wallet that owns the intent. |
246
+ | `toAddress` | `string` | Recipient address for the released token payout. |
247
+ | `amount` | `string (BigInt)` | Token amount signaled for the intent. This is the nominal amount, not necessarily the realized release amount. |
248
+ | `fiatCurrency` | `string` | Fiat currency signaled at quote time. |
249
+ | `conversionRate` | `string (BigInt)` | Quote-time rate captured on the intent. |
250
+ | `status` | `IntentStatus` | On-chain lifecycle state only. This does not encode off-chain expiry reconciliation. |
251
+ | `isExpired` | `boolean` | Off-chain reconciler flag that says the lock has timed out and liquidity was already unlocked off-chain. An intent can be `status = SIGNALED` and `isExpired = true` at the same time. |
252
+ | `signalTxHash` | `string` | Transaction that created/signaled the intent. |
253
+ | `signalTimestamp` | `string (BigInt)` | Signal timestamp taken from the emitted event/proof context. |
254
+ | `fulfillTxHash` | `string?` | Transaction that fulfilled or manually released the intent. |
255
+ | `fulfillTimestamp` | `string? (BigInt)` | Timestamp of fulfillment/manual release. |
256
+ | `pruneTxHash` | `string?` | Transaction that pruned/unlocked the intent. |
257
+ | `pruneTimestamp` | `string? (BigInt)` | Timestamp of prune/unlock. |
258
+ | `expiryTime` | `string (BigInt)` | Canonical expiry timestamp used by the block reconciler. It is refined by lock/extend events after the signal event. |
259
+ | `updatedAt` | `string (BigInt)` | Last mutation timestamp for this intent row. |
260
+ | `paymentAmount` | `string? (BigInt)` | Actual fiat amount proven by the verifier. This may differ from `amount` in partial-payment scenarios. |
261
+ | `paymentCurrency` | `string?` | Actual fiat currency proven by the verifier. This may differ from `fiatCurrency`. |
262
+ | `paymentTimestamp` | `string? (BigInt)` | Timestamp contained in the verified payment proof. |
263
+ | `paymentId` | `string?` | External payment identifier from the payment rail/provider. |
264
+ | `releasedAmount` | `string? (BigInt)` | Gross token amount released from escrow before protocol or referral fees. May differ from `amount`. |
265
+ | `takerAmountNetFees` | `string? (BigInt)` | Net token amount actually received by the taker after protocol and referrer deductions. |
266
+ | `rateManagerId` | `string?` | Snapshotted delegated manager id relevant to this intent, if a manager fee applied. |
267
+ | `managerFee` | `string? (BigInt)` | Snapshotted manager fee rate in 1e18 precision. |
268
+ | `managerFeeRecipient` | `string?` | Address that receives the manager fee on settlement. |
269
+ | `managerFeeAmount` | `string? (BigInt)` | Signal-time fee estimate based on the signaled intent amount. |
270
+ | `realizedManagerFeeAmount` | `string? (BigInt)` | Release-time manager fee based on the actual released amount. |
271
+ | `totalReferralFeeAmount` | `string? (BigInt)` | Sum of all `ReferralFeeDistribution.feeAmount` rows written for this intent. |
272
+
273
+ ### `ReferralFeeDistribution`
274
+
275
+ Per-recipient referral-fee settlement rows for v2.2. The `Intent` stores the aggregate; this entity preserves recipient-level detail.
276
+
277
+ **Relationships:**
278
+ - Many-to-one to `Intent` through `intentId`
279
+
280
+ | Field | Type | Meaning |
281
+ |-------|------|---------|
282
+ | `id` | `string` | Composite key `chainId_intentHash_feeRecipient`. |
283
+ | `chainId` | `number` | Chain where the parent intent settled. |
284
+ | `intentHash` | `string` | Raw on-chain intent hash. |
285
+ | `intentId` | `string` | Foreign-key string to `Intent.id`. |
286
+ | `feeRecipient` | `string` | Address that received this referral-fee slice. |
287
+ | `feeAmount` | `string (BigInt)` | Actual token amount distributed to `feeRecipient`. |
288
+ | `txHash` | `string` | Transaction that emitted the distribution event. |
289
+ | `timestamp` | `string (BigInt)` | Settlement timestamp for this distribution row. |
290
+
291
+ ### `WhitelistEntry`
292
+
293
+ Per-deposit taker whitelist entry for private orderbooks. Created when the `WhitelistPreIntentHook` contract emits `TakerWhitelisted` and the hook matches the deposit's active `whitelistHookAddress`. Purged when the hook is rotated/cleared or the taker is removed.
294
+
295
+ **Relationships:**
296
+ - Many-to-one to `Deposit` via `depositId`
297
+
298
+ | Field | Type | Meaning |
299
+ |-------|------|---------|
300
+ | `id` | `string` | Composite key `escrowAddress_depositId_taker` (all lowercased). |
301
+ | `chainId` | `number` | Chain where the deposit lives. |
302
+ | `hookAddress` | `string` | WhitelistPreIntentHook contract address that emitted the event. |
303
+ | `escrowAddress` | `string` | Escrow contract address. |
304
+ | `depositId` | `string` | FK to `Deposit.id` (composite: `escrowAddress_depositId`). |
305
+ | `depositIdOnContract` | `string (BigInt)` | Raw on-chain deposit identifier. |
306
+ | `taker` | `string` | Lowercased address of the whitelisted taker. |
307
+ | `createdAt` | `string (BigInt)` | Timestamp when taker was first whitelisted. |
308
+ | `updatedAt` | `string (BigInt)` | Timestamp of most recent mutation. |
309
+
310
+ ### `QuoteCandidate`
311
+
312
+ Read-optimized quoting view. This is intentionally denormalized so curator/quote APIs do not need to join `Deposit`, `DepositPaymentMethod`, and `MethodCurrency` at request time.
313
+
314
+ **Relationships:**
315
+ - Derived from exactly one `(Deposit, DepositPaymentMethod, MethodCurrency)` tuple
316
+ - `id` intentionally equals the corresponding `MethodCurrency.id`
317
+
318
+ | Field | Type | Meaning |
319
+ |-------|------|---------|
320
+ | `id` | `string` | Same composite identity as the backing `MethodCurrency`: `escrowAddress_depositId_paymentMethodHash_currencyCode`. |
321
+ | `chainId` | `number` | Chain where the quoteable deposit lives. |
322
+ | `depositIdOnContract` | `string (BigInt)` | Raw on-chain deposit id. |
323
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
324
+ | `escrowAddress` | `string` | Escrow contract address copied from `Deposit`. |
325
+ | `depositor` | `string` | Maker address copied from `Deposit`. |
326
+ | `token` | `string` | Token address copied from `Deposit`. |
327
+ | `paymentMethodHash` | `string` | Payment-method hash copied from the tuple. |
328
+ | `currencyCode` | `string` | Fiat currency copied from the tuple. |
329
+ | `conversionRate` | `string? (BigInt)` | Final gross resolved rate copied from `MethodCurrency`. |
330
+ | `takerConversionRate` | `string? (BigInt)` | Final all-in taker-facing rate copied from `MethodCurrency`. |
331
+ | `managerFee` | `string? (BigInt)` | Manager fee rate copied from `MethodCurrency`, defaulting to zero if absent. |
332
+ | `availableTokenAmount` | `string (BigInt)` | Current immediately available maker liquidity, copied from `Deposit.remainingDeposits`. |
333
+ | `maxTokenAvailablePerIntent` | `string (BigInt)` | `min(availableTokenAmount, intentAmountMax)`, used for quote ordering and max-per-intent checks. |
334
+ | `maxFiatAvailablePerIntent` | `string (BigInt)` | Fiat value of `maxTokenAvailablePerIntent` using the taker-facing rate. |
335
+ | `maxQuoteableFiat` | `string (BigInt)` | Fiat value of the full currently available liquidity using the taker-facing rate. |
336
+ | `intentAmountMin` | `string (BigInt)` | Minimum quoteable token amount copied from `Deposit`. |
337
+ | `intentAmountMax` | `string (BigInt)` | Maximum quoteable token amount copied from `Deposit`. |
338
+ | `successRateBps` | `number` | Deposit-level success signal copied from `Deposit`. |
339
+ | `payeeDetailsHash` | `string` | Hashed payee details copied from `DepositPaymentMethod`. |
340
+ | `intentGatingService` | `string?` | Optional gating service copied from `DepositPaymentMethod`. |
341
+ | `isActive` | `boolean` | Final quoteability flag. It is `true` only when the payment method is active, the deposit is accepting intents, and the taker-facing rate is non-zero. |
342
+ | `hasMinLiquidity` | `boolean` | Whether `availableTokenAmount >= intentAmountMin`. |
343
+ | `minFiatSupported` | `string (BigInt)` | Fiat value of `intentAmountMin` using the taker-facing rate. |
344
+ | `maxFiatSupported` | `string (BigInt)` | Fiat value of `intentAmountMax` using the taker-facing rate. |
345
+ | `maxFiatAvail` | `string (BigInt)` | Fiat value of `availableTokenAmount` using the taker-facing rate. |
346
+ | `updatedAt` | `string (BigInt)` | Last time the denormalized row was recomputed. |
347
+
348
+ ### `TakerStats`
349
+
350
+ Per-owner behavioral aggregate. This row is updated from signaled, fulfilled/manual-release, and prune flows. In v21 it also carries a `lockScore` penalty based on how long cancelled intents kept liquidity locked.
351
+
352
+ **Relationships:**
353
+ - Implicit many-to-one from all `Intent` rows whose `owner` matches `TakerStats.owner`
354
+
355
+ | Field | Type | Meaning |
356
+ |-------|------|---------|
357
+ | `id` | `string` | Composite key `chainId_owner`, with the owner lowercased. |
358
+ | `chainId` | `number` | Chain on which the taker activity occurred. |
359
+ | `owner` | `string` | Lowercased taker address used as the aggregation key. |
360
+ | `lifetimeSignaledCount` | `number` | Number of intents ever signaled by this taker. |
361
+ | `lifetimeFulfilledCount` | `number` | Number of non-manual intents that fulfilled successfully. |
362
+ | `lifetimeManualReleaseCount` | `number` | Number of intents that ended via manual release. |
363
+ | `lifetimePruneCount` | `number` | Number of intents that were pruned/cancelled. Same-tx prune-then-fulfill cases are rolled back. |
364
+ | `totalCancelledVolume` | `string (BigInt)` | Sum of token amount from cancelled/pruned intents, with rollback if a same-tx prune later fulfills. |
365
+ | `totalFulfilledVolume` | `string (BigInt)` | Sum of token amount from fulfilled/manual-release intents. |
366
+ | `lockScore` | `string (BigInt)` | Penalty-style score derived from cancelled intent lock duration. Currently meaningful only in the v21 path. |
367
+ | `lastIntentAt` | `string? (BigInt)` | Timestamp of the taker's most recent intent signal. |
368
+ | `lastFulfilledAt` | `string? (BigInt)` | Timestamp of the taker's most recent fulfillment/manual release. |
369
+ | `firstSeenAt` | `string? (BigInt)` | Timestamp of the taker's first observed intent. |
370
+ | `updatedAt` | `string (BigInt)` | Last time this aggregate row changed. |
371
+
372
+ ### `MakerStats`
373
+
374
+ Per-maker aggregate across every deposit owned by the maker on a chain. This is deposit-derived state plus realized-profit rollups.
375
+
376
+ **Relationships:**
377
+ - Implicit aggregation over all `Deposit` rows where `Deposit.depositor = MakerStats.maker`
378
+ - Parent summary for `MakerPlatformStats` and `MakerCurrencyStats`
379
+
380
+ | Field | Type | Meaning |
381
+ |-------|------|---------|
382
+ | `id` | `string` | Composite key `chainId_maker`, with maker lowercased in the id. |
383
+ | `chainId` | `number` | Chain on which the maker operates. |
384
+ | `maker` | `string` | Maker/depositor address used as the aggregation key. |
385
+ | `totalAmountTaken` | `string (BigInt)` | Sum of `Deposit.totalAmountTaken` across the maker's deposits. |
386
+ | `grossDeposited` | `string (BigInt)` | All-time gross capital committed by the maker, derived per deposit as `remaining + outstanding + taken + withdrawn`. |
387
+ | `totalWithdrawn` | `string (BigInt)` | Sum of maker withdrawals across all deposits. |
388
+ | `outstandingIntentAmount` | `string (BigInt)` | Sum of liquidity currently locked in active intents across all deposits. |
389
+ | `activeDepositCount` | `number` | Number of deposits that are both `ACTIVE` and `acceptingIntents = true`. |
390
+ | `totalDepositCount` | `number` | Number of deposit rows ever created for the maker. |
391
+ | `fulfilledIntents` | `number` | Sum of `Deposit.fulfilledIntents` across the maker's deposits. |
392
+ | `prunedIntents` | `number` | Sum of `Deposit.prunedIntents` across the maker's deposits. |
393
+ | `signaledIntents` | `number` | Sum of `Deposit.signaledIntents` across the maker's deposits. |
394
+ | `totalIntents` | `number` | Sum of `Deposit.totalIntents` across the maker's deposits. |
395
+ | `manualReleaseCount` | `number` | Number of maker fills that happened through manual release. |
396
+ | `successRateBps` | `number` | Maker-level fulfillment rate in basis points, derived from aggregate `fulfilledIntents / totalIntents`. |
397
+ | `realizedProfitUsdCents` | `string (BigInt)` | Sum of computed realized profit across all maker profit snapshots. |
398
+ | `aprBps` | `number?` | Reserved APR-style metric. It is present in the schema but not currently maintained by handlers. |
399
+ | `firstSeenAt` | `string? (BigInt)` | Timestamp of the maker's earliest observed deposit. |
400
+ | `updatedAt` | `string (BigInt)` | Last time the aggregate changed. |
401
+
402
+ ### `MakerPlatformStats`
403
+
404
+ Per-maker, per-payment-method aggregate. This lets consumers break a maker's business down by payment rail or method hash.
405
+
406
+ | Field | Type | Meaning |
407
+ |-------|------|---------|
408
+ | `id` | `string` | Composite key `chainId_maker_paymentMethodHash`. |
409
+ | `chainId` | `number` | Chain on which the activity occurred. |
410
+ | `maker` | `string` | Maker address. |
411
+ | `paymentMethodHash` | `string` | Payment-method aggregation dimension. |
412
+ | `totalAmountTaken` | `string (BigInt)` | Sum of fulfilled/manual-release volume for this maker-method pair. |
413
+ | `fulfilledIntents` | `number` | Count of fulfilled/manual-release intents for this pair. |
414
+ | `prunedIntents` | `number` | Count of pruned intents for this pair. |
415
+ | `manualReleaseCount` | `number` | Count of manual-release fills for this pair. |
416
+ | `realizedProfitUsdCents` | `string (BigInt)` | Sum of realized profit allocated to this maker-method pair. |
417
+ | `computedProfitSnapshots` | `number` | Number of profit snapshots that successfully contributed realized profit to this pair. |
418
+ | `updatedAt` | `string (BigInt)` | Last time the row changed. |
419
+
420
+ ### `MakerCurrencyStats`
421
+
422
+ Per-maker, per-fiat-currency aggregate.
423
+
424
+ | Field | Type | Meaning |
425
+ |-------|------|---------|
426
+ | `id` | `string` | Composite key `chainId_maker_currencyCode`. |
427
+ | `chainId` | `number` | Chain on which the activity occurred. |
428
+ | `maker` | `string` | Maker address. |
429
+ | `currencyCode` | `string` | Fiat-currency aggregation dimension. |
430
+ | `totalAmountTaken` | `string (BigInt)` | Sum of fulfilled/manual-release volume for this maker-currency pair. |
431
+ | `fulfilledIntents` | `number` | Count of fulfilled/manual-release intents for this pair. |
432
+ | `prunedIntents` | `number` | Count of pruned intents for this pair. |
433
+ | `manualReleaseCount` | `number` | Count of manual releases for this pair. |
434
+ | `updatedAt` | `string (BigInt)` | Last time the row changed. |
435
+
436
+ ### `PriceSnapshot`
437
+
438
+ Daily FX snapshot used to translate local-fiat quote rates into a USD-denominated profitability view.
439
+
440
+ **Relationships:**
441
+ - Referenced by `MakerProfitSnapshot.priceSnapshotId`
442
+ - Used indirectly by manager aggregate PnL computation
443
+
444
+ | Field | Type | Meaning |
445
+ |-------|------|---------|
446
+ | `id` | `string` | Composite key `currencyCode_timestampDay`. |
447
+ | `currencyCode` | `string` | Normalized fiat currency code of the quote being converted to USD. |
448
+ | `timestampDay` | `string (BigInt)` | Start-of-day UTC bucket in seconds. |
449
+ | `rateUsd` | `string (BigInt)` | Provider-supplied fiat-to-USD conversion rate in provider precision. |
450
+ | `ratePrecision` | `number` | Precision/scaling factor associated with `rateUsd`. |
451
+ | `provider` | `string` | Upstream provider name used to fetch the quote. |
452
+ | `source` | `string` | Source string or provider endpoint label. |
453
+ | `status` | `PriceSnapshotStatus` | Whether this snapshot came from live indexing or backfill. |
454
+ | `effectiveAt` | `string (BigInt)` | Timestamp at which the provider says the quote is valid/effective. |
455
+ | `retrievedAt` | `string (BigInt)` | Timestamp when the indexer fetched the quote. |
456
+ | `createdAt` | `string (BigInt)` | First time this snapshot row was written. |
457
+ | `updatedAt` | `string (BigInt)` | Last time this snapshot row was written. Usually equal to `createdAt`. |
458
+
459
+ ### `MakerProfitSnapshot`
460
+
461
+ Per-intent realized-profit record for makers. This is the bridge between intent settlement and USD-denominated reporting.
462
+
463
+ **Relationships:**
464
+ - One row per settled `Intent` (`id = intentId`)
465
+ - Many-to-one to `Deposit`
466
+ - Optional many-to-one to `PriceSnapshot`
467
+
468
+ | Field | Type | Meaning |
469
+ |-------|------|---------|
470
+ | `id` | `string` | Equal to `intentId`, enforcing one profit row per intent. |
471
+ | `chainId` | `number` | Chain where the intent settled. |
472
+ | `maker` | `string` | Maker address that owned the deposit. |
473
+ | `intentId` | `string` | Foreign-key string to `Intent.id`. |
474
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
475
+ | `fiatCurrency` | `string` | Fiat currency used for the quote/profit comparison. |
476
+ | `quoteConversionRate` | `string (BigInt)` | Quote-time rate captured from the intent. |
477
+ | `oracleRate` | `string? (BigInt)` | USD-derived market reference rate computed from the linked `PriceSnapshot`. |
478
+ | `spreadBps` | `number?` | Basis-point difference between `quoteConversionRate` and `oracleRate`. |
479
+ | `amount` | `string (BigInt)` | Token amount used for the profit calculation. |
480
+ | `notionalFiatUsdCents` | `string? (BigInt)` | USD-cent value of the local-fiat notional implied by the quote. |
481
+ | `feeUsd` | `string? (BigInt)` | Reserved fee field. It is currently written as zero. |
482
+ | `realizedProfitUsdCents` | `string? (BigInt)` | Realized profit in USD cents. Can be negative. |
483
+ | `priceSnapshotId` | `string?` | Optional reference to the `PriceSnapshot` used to compute `oracleRate`. |
484
+ | `status` | `ProfitStatus` | `COMPUTED` when an FX reference existed, `PENDING` otherwise. |
485
+ | `createdAt` | `string (BigInt)` | Timestamp when the profit row was created. |
486
+ | `updatedAt` | `string (BigInt)` | Last update timestamp for the profit row. |
487
+
488
+ ### `RateManager`
489
+
490
+ Registry row for a delegated rate manager. A deposit can point at one of these via `(rateManagerAddress, rateManagerId)`.
491
+
492
+ **Relationships:**
493
+ - Parent of `RateManagerRate`
494
+ - Parent/source of `ManagerAggregateStats`, `ManagerDailySnapshot`, and `ManagerStats`
495
+ - Optional target of deposit delegation
496
+
497
+ | Field | Type | Meaning |
498
+ |-------|------|---------|
499
+ | `id` | `string` | Composite key `chainId_rateManagerAddress_rateManagerId`. |
500
+ | `chainId` | `number` | Chain where the manager contract exists. |
501
+ | `rateManagerAddress` | `string` | Rate-manager contract address. |
502
+ | `rateManagerId` | `string` | On-contract manager identifier. |
503
+ | `manager` | `string` | Account recognized as the logical manager/operator. |
504
+ | `feeRecipient` | `string` | Account that receives manager fees on settlement. |
505
+ | `maxFee` | `string (BigInt)` | Maximum allowed fee configured at manager creation. |
506
+ | `fee` | `string (BigInt)` | Current fee rate in 1e18 precision. |
507
+ | `minLiquidity` | `string (BigInt)` | Configured minimum liquidity threshold advertised by the manager contract. |
508
+ | `name` | `string?` | Optional human-readable name. |
509
+ | `uri` | `string?` | Optional metadata URI. |
510
+ | `createdAt` | `string (BigInt)` | First-seen timestamp. |
511
+ | `updatedAt` | `string (BigInt)` | Last config update timestamp. |
512
+
513
+ ### `RateManagerRate`
514
+
515
+ Per-manager quote sheet. Each row is a manager-supplied rate for one payment-method/currency pair. Deposits delegated to that manager read these rows when resolving `MethodCurrency.conversionRate`.
516
+
517
+ | Field | Type | Meaning |
518
+ |-------|------|---------|
519
+ | `id` | `string` | Composite key `chainId_rateManagerAddress_rateManagerId_paymentMethodHash_currencyCode`. |
520
+ | `chainId` | `number` | Chain where the manager contract exists. |
521
+ | `rateManagerAddress` | `string` | Manager contract address. |
522
+ | `rateManagerId` | `string` | Manager identifier. |
523
+ | `paymentMethodHash` | `string` | Payment-method dimension for the manager quote. |
524
+ | `currencyCode` | `string` | Fiat-currency dimension for the manager quote. |
525
+ | `managerRate` | `string (BigInt)` | Gross manager-provided rate before floor enforcement. |
526
+ | `updatedAt` | `string (BigInt)` | Timestamp of the last rate update event for this pair. |
527
+
528
+ ### `ManagerAggregateStats`
529
+
530
+ Portfolio-level aggregate for one delegated rate manager. This is the top-level manager reporting row.
531
+
532
+ **Relationships:**
533
+ - One-to-one logical summary for one `RateManager`
534
+ - Source for `ManagerDailySnapshot`
535
+ - Updated from delegated deposit balance changes and fulfilled intents
536
+
537
+ | Field | Type | Meaning |
538
+ |-------|------|---------|
539
+ | `id` | `string` | Same identity as the corresponding `RateManager.id`. |
540
+ | `chainId` | `number` | Chain on which the manager operates. |
541
+ | `rateManagerAddress` | `string` | Manager contract address. |
542
+ | `rateManagerId` | `string` | Manager identifier. |
543
+ | `manager` | `string` | Manager account/operator. |
544
+ | `totalFilledVolume` | `string (BigInt)` | Cumulative token volume filled across all delegated deposits. |
545
+ | `totalFeeAmount` | `string (BigInt)` | Cumulative manager fee amount actually earned across fills. |
546
+ | `totalPnlUsdCents` | `string (BigInt)` | Cumulative USD-cent PnL measured against daily FX snapshots. |
547
+ | `fulfilledIntents` | `number` | Number of fulfilled delegated intents. |
548
+ | `currentDelegatedBalance` | `string (BigInt)` | Current delegated TVL: sum of `remainingDeposits + outstandingIntentAmount` across delegated deposits. |
549
+ | `currentDelegatedDeposits` | `number` | Number of deposits currently delegated to this manager. |
550
+ | `firstSeenAt` | `string? (BigInt)` | First timestamp the manager aggregate was created. |
551
+ | `updatedAt` | `string (BigInt)` | Last time the aggregate changed. |
552
+
553
+ ### `ManagerDailySnapshot`
554
+
555
+ Daily bucketed snapshot for `ManagerAggregateStats`.
556
+
557
+ | Field | Type | Meaning |
558
+ |-------|------|---------|
559
+ | `id` | `string` | Composite key `chainId_rateManagerAddress_rateManagerId_dayTimestamp`. |
560
+ | `chainId` | `number` | Chain on which the manager operates. |
561
+ | `rateManagerAddress` | `string` | Manager contract address. |
562
+ | `rateManagerId` | `string` | Manager identifier. |
563
+ | `dayTimestamp` | `string (BigInt)` | Start-of-day UTC bucket in seconds. |
564
+ | `tvl` | `string (BigInt)` | End-of-update delegated balance for that day. |
565
+ | `delegatedDeposits` | `number` | Number of currently delegated deposits at snapshot time. |
566
+ | `dailyVolume` | `string (BigInt)` | Volume filled during that day. |
567
+ | `dailyFees` | `string (BigInt)` | Manager fees earned during that day. |
568
+ | `dailyPnlUsdCents` | `string (BigInt)` | Daily PnL in USD cents. |
569
+ | `dailyFulfilledIntents` | `number` | Number of fulfilled intents on that day. |
570
+ | `cumulativeVolume` | `string (BigInt)` | Cumulative filled volume up to this snapshot. |
571
+ | `cumulativeFees` | `string (BigInt)` | Cumulative manager fees up to this snapshot. |
572
+ | `cumulativePnlUsdCents` | `string (BigInt)` | Cumulative PnL up to this snapshot. |
573
+ | `cumulativeFulfilledIntents` | `number` | Cumulative fulfilled-intent count up to this snapshot. |
574
+ | `updatedAt` | `string (BigInt)` | Last mutation time for the day's bucket. |
575
+
576
+ ### `DepositFundActivity`
577
+
578
+ Append-only normalized ledger of deposit funding activity. This is easier to query than replaying all raw event families.
579
+
580
+ **Relationships:**
581
+ - Many-to-one to `Deposit`
582
+
583
+ | Field | Type | Meaning |
584
+ |-------|------|---------|
585
+ | `id` | `string` | Composite key `txHash_logIndex`. |
586
+ | `chainId` | `number` | Chain where the activity happened. |
587
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
588
+ | `depositor` | `string` | Maker address that owns the deposit. |
589
+ | `activityType` | `string` | Normalized activity class: `DEPOSIT_RECEIVED`, `FUNDS_ADDED`, `WITHDRAWN`, or `CLOSED`. |
590
+ | `amount` | `string (BigInt)` | Token amount relevant to the activity. `CLOSED` can legitimately record zero amount. |
591
+ | `blockNumber` | `string (BigInt)` | Block number for the activity. |
592
+ | `timestamp` | `string (BigInt)` | Timestamp for the activity. |
593
+ | `txHash` | `string` | Transaction hash for the activity. |
594
+
595
+ ### `DepositDailySnapshot`
596
+
597
+ Daily bucketed snapshot of one deposit's state and realized profitability.
598
+
599
+ **Relationships:**
600
+ - Many-to-one to `Deposit`
601
+ - Receives daily-volume and daily-PnL deltas from fulfillment flows
602
+
603
+ | Field | Type | Meaning |
604
+ |-------|------|---------|
605
+ | `id` | `string` | Composite key `depositId_dayTimestamp`. |
606
+ | `chainId` | `number` | Chain where the deposit exists. |
607
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
608
+ | `depositor` | `string` | Maker address that owns the deposit. |
609
+ | `dayTimestamp` | `string (BigInt)` | Start-of-day UTC bucket in seconds. |
610
+ | `remainingDeposits` | `string (BigInt)` | Deposit liquidity available at the time of the last update to that bucket. |
611
+ | `outstandingIntentAmount` | `string (BigInt)` | Deposit liquidity currently locked in intents at the last update. |
612
+ | `totalAmountTaken` | `string (BigInt)` | Cumulative taken volume at the last update. |
613
+ | `totalWithdrawn` | `string (BigInt)` | Cumulative withdrawn volume at the last update. |
614
+ | `signaledIntents` | `number` | Cumulative signal count at the last update. |
615
+ | `fulfilledIntents` | `number` | Cumulative fulfillment count at the last update. |
616
+ | `prunedIntents` | `number` | Cumulative prune count at the last update. |
617
+ | `successRateBps` | `number` | Deposit success rate at the last update. |
618
+ | `dailyVolume` | `string (BigInt)` | Volume taken during that day only. |
619
+ | `dailyPnlUsdCents` | `string (BigInt)` | Realized PnL accrued during that day only. |
620
+ | `cumulativeVolume` | `string (BigInt)` | All-time volume through the deposit as of this bucket. |
621
+ | `cumulativePnlUsdCents` | `string (BigInt)` | All-time realized PnL through the deposit as of this bucket. |
622
+ | `updatedAt` | `string (BigInt)` | Last mutation time for the day's bucket. |
623
+
624
+ ### `ManagerStats`
625
+
626
+ Per-deposit stats row for a delegated manager. Where `ManagerAggregateStats` is portfolio-level, `ManagerStats` is deposit-level attribution.
627
+
628
+ **Relationships:**
629
+ - Many-to-one to `Deposit`
630
+ - Many-to-one to `RateManager`
631
+
632
+ | Field | Type | Meaning |
633
+ |-------|------|---------|
634
+ | `id` | `string` | Composite key `chainId_rateManagerAddress_rateManagerId_depositId`. |
635
+ | `chainId` | `number` | Chain on which the delegation exists. |
636
+ | `rateManagerAddress` | `string` | Manager contract address. |
637
+ | `rateManagerId` | `string` | Manager identifier. |
638
+ | `depositId` | `string` | Foreign-key string to `Deposit.id`. |
639
+ | `depositor` | `string` | Maker that owns the delegated deposit. |
640
+ | `currentDelegatedBalance` | `string (BigInt)` | Current delegated balance for this one deposit: `remainingDeposits + outstandingIntentAmount`. |
641
+ | `totalAmountTaken` | `string (BigInt)` | Deposit's all-time taken amount while tracked under the manager. |
642
+ | `totalWithdrawn` | `string (BigInt)` | Deposit's all-time withdrawn amount while tracked under the manager. |
643
+ | `fulfilledIntents` | `number` | Deposit-level fulfillment count. |
644
+ | `prunedIntents` | `number` | Deposit-level prune count. |
645
+ | `successRateBps` | `number` | Deposit-level success rate. |
646
+ | `updatedAt` | `string (BigInt)` | Last mutation time for the row. |
647
+
648
+ ## ID Format Conventions
649
+
650
+ | Entity | ID Format |
651
+ |--------|-----------|
652
+ | Deposit | `{escrowAddress}_{depositId}` |
653
+ | Intent | `{chainId}_{intentHash}` |
654
+ | MethodCurrency | `{escrow}_{depositId}_{methodHash}_{currencyCode}` |
655
+ | QuoteCandidate | same as MethodCurrency |
656
+ | DepositPaymentMethod | `{escrow}_{depositId}_{paymentMethodHash}` |
657
+ | ReferralFeeDistribution | `{chainId}_{intentHash}_{feeRecipient}` |
658
+ | WhitelistEntry | `{escrowAddress}_{depositId}_{taker}` |
659
+ | MakerStats | `{chainId}_{makerAddress}` |
660
+ | TakerStats | `{chainId}_{ownerAddress}` |
661
+ | MakerPlatformStats | `{chainId}_{maker}_{paymentMethodHash}` |
662
+ | MakerCurrencyStats | `{chainId}_{maker}_{currencyCode}` |
663
+ | PriceSnapshot | `{currencyCode}_{timestampDay}` |
664
+ | MakerProfitSnapshot | `{intentId}` |
665
+ | RateManager | `{chainId}_{rateManagerAddress}_{rateManagerId}` |
666
+ | RateManagerRate | `{chainId}_{rateManagerAddress}_{rateManagerId}_{paymentMethodHash}_{currencyCode}` |
667
+ | ManagerAggregateStats | same as RateManager |
668
+ | ManagerDailySnapshot | `{chainId}_{rateManagerAddress}_{rateManagerId}_{dayTimestamp}` |
669
+ | ManagerStats | `{chainId}_{rateManagerAddress}_{rateManagerId}_{depositId}` |
670
+ | DepositFundActivity | `{txHash}_{logIndex}` |
671
+ | DepositDailySnapshot | `{depositId}_{dayTimestamp}` |
672
+
673
+ ## Known Currency Hashes
674
+
675
+ | Currency | Hash |
676
+ |----------|------|
677
+ | USD | `0xc4ae21aac0c6549d71dd96035b7e0bdb6c79ebdba8891b666115bc976d16a29e` |
678
+ | EUR | `0xfff16d60be267153303bbfa66e593fb8d06e24ea5ef24b6acca5224c2ca6b907` |
679
+ | GBP | `0x90832e2dc3221e4d56977c1aa8f6a6706b9ad6542fbbdaac13097d0fa5e42e67` |
680
+ | CAD | `0x221012e06ebf59a20b82e3003cf5d6ee973d9008bdb6e2f604faa89a27235522` |
681
+ | SGD | `0xc241cc1f9752d2d53d1ab67189223a3f330e48b75f73ebf86f50b2c78fe8df88` |