@zkp2p/indexer-schema 0.2.0 → 0.2.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,1391 @@
1
+ # Schema Field Reference
2
+
3
+ This document explains the current merged [`schema.graphql`](../schema.graphql) at the level of entity intent, field semantics, and relationships.
4
+ It is written against the generated top-level schema, not just the source fragments under `schema/`.
5
+
6
+ ## Reading conventions
7
+
8
+ - `Deposit.id` is the canonical join key for deposit-scoped rows. It is a synthetic composite: `escrowAddress_depositId`.
9
+ - `Intent.id` is the canonical join key for intent-scoped rows. It is `chainId_intentHash`.
10
+ - `@derivedFrom` relationships exist only where the schema declares them. Most other relationships are implicit string joins.
11
+ - 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.
12
+ - Conversion-rate fields use 1e18 fixed-point precision unless noted otherwise.
13
+ - Audit/event entities are append-only mirrors of emitted contract events. They usually store raw on-chain IDs such as `depositId` rather than the synthetic `Deposit.id`.
14
+
15
+ ## Enum reference
16
+
17
+ ### `DepositStatus`
18
+
19
+ - `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.
20
+ - `CLOSED`: Deposit has been explicitly closed on-chain. Quote candidates for closed deposits are deleted.
21
+
22
+ ### `IntentStatus`
23
+
24
+ - `SIGNALED`: Intent exists and funds may be locked, but settlement is not final yet.
25
+ - `FULFILLED`: Intent completed normally.
26
+ - `PRUNED`: Intent was cancelled/unlocked on-chain.
27
+ - `MANUALLY_RELEASED`: Funds were released through the manual-release path rather than the normal verifier path.
28
+
29
+ ### `PriceSnapshotStatus`
30
+
31
+ - `LIVE`: Snapshot was fetched during normal live indexing.
32
+ - `BACKFILL`: Snapshot was created during historical catch-up or another non-live backfill flow.
33
+
34
+ ### `ProfitStatus`
35
+
36
+ - `COMPUTED`: Profit could be computed because a usable FX snapshot existed.
37
+ - `PENDING`: Profit row exists, but the oracle side of the comparison was unavailable at write time.
38
+
39
+ ## Relationship map
40
+
41
+ ### Explicit schema edges
42
+
43
+ - `Deposit -> Intent` via `Intent.depositId` and `Deposit.intents @derivedFrom(field: "depositId")`
44
+ - `Deposit -> DepositPaymentMethod` via `DepositPaymentMethod.depositId`
45
+ - `Deposit -> MethodCurrency` via `MethodCurrency.depositId`
46
+ - `Deposit -> DepositFundActivity` via `DepositFundActivity.depositId`
47
+ - `Deposit -> DepositDailySnapshot` via `DepositDailySnapshot.depositId`
48
+
49
+ ### Implicit joins used by handlers and consumers
50
+
51
+ - `DepositPaymentMethod <-> MethodCurrency` by `(depositId, paymentMethodHash)`
52
+ - `MethodCurrency <-> QuoteCandidate` by identical tuple identity; `QuoteCandidate.id` matches the `MethodCurrency.id`
53
+ - `Intent <-> ReferralFeeDistribution` by `ReferralFeeDistribution.intentId = Intent.id`
54
+ - `Deposit/Intent -> maker stats` by maker address (`Deposit.depositor`)
55
+ - `Intent -> taker stats` by taker address (`Intent.owner`)
56
+ - `Deposit/MethodCurrency/Intent -> rate-manager entities` by `(chainId, rateManagerAddress, rateManagerId)`
57
+ - `MakerProfitSnapshot -> PriceSnapshot` by `priceSnapshotId`
58
+
59
+ ### Denormalized/projection entities
60
+
61
+ - `QuoteCandidate` is a read-optimized projection over `Deposit + DepositPaymentMethod + MethodCurrency`.
62
+ - `MakerStats`, `MakerPlatformStats`, `MakerCurrencyStats`, `TakerStats`, `ManagerAggregateStats`, `ManagerStats`, `DepositDailySnapshot`, and `ManagerDailySnapshot` are aggregation/snapshot entities, not raw event mirrors.
63
+
64
+ ## Domain entities
65
+
66
+ ### `Deposit`
67
+
68
+ 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.
69
+
70
+ **Relationships**
71
+
72
+ - Parent of `Intent`, `DepositPaymentMethod`, `MethodCurrency`, `DepositFundActivity`, and `DepositDailySnapshot`
73
+ - Indirect source for `QuoteCandidate`
74
+ - Optional many-to-one relationship to `RateManager`
75
+ - Source record for `MakerStats`, `ManagerStats`, and manager aggregate balances
76
+
77
+ | Field | Meaning |
78
+ | --- | --- |
79
+ | `id` | Canonical deposit key `escrowAddress_depositId`. This exists because raw on-chain `depositId` is not globally unique across escrows. |
80
+ | `chainId` | Chain where the escrow contract lives. |
81
+ | `escrowAddress` | Escrow contract address that owns the deposit funds and scopes the deposit namespace. |
82
+ | `depositId` | Raw on-chain deposit identifier emitted by the escrow contract. |
83
+ | `depositor` | Maker address that created and owns the deposit. |
84
+ | `token` | ERC20 token being sold. In practice the indexer only materializes supported USDC addresses. |
85
+ | `delegate` | Address currently allowed to manage deposit settings on behalf of the maker. |
86
+ | `intentAmountMin` | Smallest token amount the maker will accept for a single intent. |
87
+ | `intentAmountMax` | Largest token amount the maker will accept for a single intent. |
88
+ | `acceptingIntents` | Explicit maker toggle. Quotes should be suppressed when this is `false` even if liquidity still exists. |
89
+ | `status` | Coarse lifecycle state. `CLOSED` means the deposit was explicitly closed; it is stronger than merely having no liquidity. |
90
+ | `remainingDeposits` | Immediately available maker liquidity that can still be locked into new intents or withdrawn. |
91
+ | `outstandingIntentAmount` | Liquidity currently reserved by signaled intents that have not been fully resolved yet. |
92
+ | `totalAmountTaken` | All-time amount that actually left the deposit to takers through fulfillment or manual release. |
93
+ | `totalWithdrawn` | All-time amount withdrawn back to the maker through withdrawal events. |
94
+ | `totalIntents` | Total number of intents ever locked against the deposit. |
95
+ | `signaledIntents` | Count of intent-lock events seen for this deposit. |
96
+ | `fulfilledIntents` | Count of intents that finished successfully or via manual release. |
97
+ | `prunedIntents` | Count of intents that were unlocked/cancelled without fulfillment. |
98
+ | `successRateBps` | Deposit-level quality score in basis points. New deposits start at `10000`; later it tracks `fulfilled / total` in basis points. |
99
+ | `blockNumber` | Block in which the deposit was first seen. |
100
+ | `timestamp` | Creation timestamp from the deposit-received event. |
101
+ | `txHash` | Transaction that created the deposit row. |
102
+ | `updatedAt` | Timestamp of the most recent mutation to this deposit row. |
103
+ | `rateManagerId` | Optional delegated rate-manager identifier currently assigned to the deposit. |
104
+ | `rateManagerAddress` | Optional rate-manager contract address paired with `rateManagerId`. |
105
+ | `delegatedAt` | Timestamp when the current delegated manager assignment was applied. |
106
+ | `intents` | Reverse GraphQL edge to all `Intent` rows whose `depositId` points at this deposit. |
107
+ | `paymentMethods` | Reverse edge to `DepositPaymentMethod` rows for this deposit. |
108
+ | `currencies` | Reverse edge to `MethodCurrency` rows for this deposit. |
109
+ | `fundActivities` | Reverse edge to append-only `DepositFundActivity` rows. |
110
+ | `dailySnapshots` | Reverse edge to `DepositDailySnapshot` rows keyed by day bucket. |
111
+
112
+ ### `DepositPaymentMethod`
113
+
114
+ Deposit-scoped payment platform configuration. Each row says "this deposit accepts this payment-method hash, with these payee details and optional gating requirements."
115
+
116
+ **Relationships**
117
+
118
+ - Many-to-one to `Deposit` through `depositId`
119
+ - Logical sibling of `MethodCurrency` on `(depositId, paymentMethodHash)`
120
+ - One of the three source entities used to materialize `QuoteCandidate`
121
+
122
+ | Field | Meaning |
123
+ | --- | --- |
124
+ | `id` | Composite key `escrowAddress_depositId_paymentMethodHash`. |
125
+ | `chainId` | Chain where the parent deposit lives. |
126
+ | `depositId` | Foreign-key string to `Deposit.id`. |
127
+ | `depositIdOnContract` | Raw on-chain deposit id copied for convenience and external correlation. |
128
+ | `paymentMethodHash` | Canonical bytes32-like payment-method identifier used by contracts and quoting. |
129
+ | `intentGatingService` | Optional external service address/string that must authorize or gate takers before they can use this method. |
130
+ | `payeeDetailsHash` | Hash of the off-chain payee details that the taker must prove they paid. |
131
+ | `active` | Method-level on/off toggle. `QuoteCandidate.isActive` also depends on this value. |
132
+
133
+ ### `MethodCurrency`
134
+
135
+ 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.
136
+
137
+ **Relationships**
138
+
139
+ - Many-to-one to `Deposit`
140
+ - Logical many-to-one to `DepositPaymentMethod` by `(depositId, paymentMethodHash)`
141
+ - Optional many-to-one to `RateManager` through `rateManagerId` plus the deposit's `rateManagerAddress`
142
+ - Source record for `QuoteCandidate`; the quote row reuses this entity's identity
143
+
144
+ | Field | Meaning |
145
+ | --- | --- |
146
+ | `id` | Composite key `escrowAddress_depositId_paymentMethodHash_currencyCode`. |
147
+ | `chainId` | Chain where the parent deposit lives. |
148
+ | `depositId` | Foreign-key string to `Deposit.id`. |
149
+ | `depositIdOnContract` | Raw on-chain deposit id for cross-checking with contract logs. |
150
+ | `paymentMethodHash` | Payment-method component of the tuple. |
151
+ | `currencyCode` | Fiat currency component of the tuple. |
152
+ | `minConversionRate` | Maker-defined fixed floor for the tuple. In legacy flows this can also be the directly used static rate. |
153
+ | `managerRate` | Delegated manager quote before floor enforcement and before manager fee is applied. |
154
+ | `managerFee` | Delegated manager fee rate in 1e18 precision. This does not lower `conversionRate`; it is turned into a taker-facing markup when computing `takerConversionRate`. |
155
+ | `conversionRate` | Final gross resolved rate used for intent validation and contract-aligned quote logic. |
156
+ | `takerConversionRate` | Final all-in rate shown to takers. In delegated mode this incorporates manager fee on top of the gross rate. |
157
+ | `rateSource` | Resolution reason for `conversionRate`, such as `MANAGER`, `ORACLE`, `ESCROW_FLOOR`, `MANAGER_DISABLED`, `ORACLE_HALTED`, or `NO_FLOOR`. |
158
+ | `rateManagerId` | Delegated manager id that supplied the current delegated rate, if any. |
159
+ | `adapter` | Oracle adapter contract address used to interpret `adapterConfig`. |
160
+ | `adapterConfig` | Encoded adapter config bytes stored exactly as emitted. |
161
+ | `feed` | Resolved oracle feed address or feed id after decoding the adapter config. |
162
+ | `feedDecimals` | Feed decimals used to normalize oracle answers into the shared 1e18 rate format. |
163
+ | `spreadBps` | Maker-configured markup applied to raw oracle output before final floor/manager resolution. |
164
+ | `maxStaleness` | Maximum acceptable oracle age in seconds before the tuple is considered stale. |
165
+ | `invert` | Whether the oracle answer must be inverted before being converted into the shared rate representation. |
166
+ | `oracleRate` | Raw oracle-derived rate before spread markup. |
167
+ | `effectiveOracleRate` | Oracle rate after applying `spreadBps`. |
168
+ | `lastOracleUpdatedAt` | Timestamp of the latest accepted oracle datapoint used by this row. |
169
+ | `kind` | Decoded oracle kind, currently `oracle_chainlink`, `oracle_pyth`, or `oracle_unknown`. |
170
+
171
+ ### `Intent`
172
+
173
+ 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`).
174
+
175
+ **Relationships**
176
+
177
+ - Many-to-one to `Deposit`
178
+ - Parent of `ReferralFeeDistribution`
179
+ - Feeds `TakerStats`, maker stats rollups, profit snapshots, and manager aggregates
180
+
181
+ | Field | Meaning |
182
+ | --- | --- |
183
+ | `id` | Canonical key `chainId_intentHash`. |
184
+ | `intentHash` | Raw on-chain intent hash. |
185
+ | `orchestratorAddress` | Contract address that coordinated the intent. In legacy v2 this is effectively the escrow address; in newer flows it is the orchestrator. |
186
+ | `depositId` | Foreign-key string to `Deposit.id`. |
187
+ | `verifier` | Verifier contract or address associated with the payment proof. In v21 it is updated again when payment verification arrives. |
188
+ | `paymentMethodHash` | Payment-method hash associated with the intent. Optional because some legacy flows populate it indirectly. |
189
+ | `owner` | Taker wallet that owns the intent. |
190
+ | `toAddress` | Recipient address for the released token payout. |
191
+ | `amount` | Token amount signaled for the intent. This is the nominal amount, not necessarily the realized release amount. |
192
+ | `fiatCurrency` | Fiat currency signaled at quote time. |
193
+ | `conversionRate` | Quote-time rate captured on the intent. |
194
+ | `status` | On-chain lifecycle state only. This does not encode off-chain expiry reconciliation. |
195
+ | `isExpired` | 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. |
196
+ | `signalTxHash` | Transaction that created/signaled the intent. |
197
+ | `signalTimestamp` | Signal timestamp taken from the emitted event/proof context. |
198
+ | `fulfillTxHash` | Transaction that fulfilled or manually released the intent. |
199
+ | `fulfillTimestamp` | Timestamp of fulfillment/manual release. |
200
+ | `pruneTxHash` | Transaction that pruned/unlocked the intent. |
201
+ | `pruneTimestamp` | Timestamp of prune/unlock. |
202
+ | `expiryTime` | Canonical expiry timestamp used by the block reconciler. It is refined by lock/extend events after the signal event. |
203
+ | `updatedAt` | Last mutation timestamp for this intent row. |
204
+ | `paymentAmount` | Actual fiat amount proven by the verifier. This may differ from `amount` in partial-payment scenarios. |
205
+ | `paymentCurrency` | Actual fiat currency proven by the verifier. This may differ from `fiatCurrency`. |
206
+ | `paymentTimestamp` | Timestamp contained in the verified payment proof. |
207
+ | `paymentId` | External payment identifier from the payment rail/provider. |
208
+ | `releasedAmount` | Gross token amount released from escrow before protocol or referral fees. May differ from `amount`. |
209
+ | `takerAmountNetFees` | Net token amount actually received by the taker after protocol and referrer deductions. |
210
+ | `rateManagerId` | Snapshotted delegated manager id relevant to this intent, if a manager fee applied. |
211
+ | `managerFee` | Snapshotted manager fee rate in 1e18 precision. |
212
+ | `managerFeeRecipient` | Address that receives the manager fee on settlement. |
213
+ | `managerFeeAmount` | Signal-time fee estimate based on the signaled intent amount. |
214
+ | `realizedManagerFeeAmount` | Release-time manager fee based on the actual released amount. |
215
+ | `totalReferralFeeAmount` | Sum of all `ReferralFeeDistribution.feeAmount` rows written for this intent. |
216
+
217
+ ### `ReferralFeeDistribution`
218
+
219
+ Per-recipient referral-fee settlement rows for v2.2. The `Intent` stores the aggregate; this entity preserves recipient-level detail.
220
+
221
+ **Relationships**
222
+
223
+ - Many-to-one to `Intent` through `intentId`
224
+
225
+ | Field | Meaning |
226
+ | --- | --- |
227
+ | `id` | Composite key `chainId_intentHash_feeRecipient`. |
228
+ | `chainId` | Chain where the parent intent settled. |
229
+ | `intentHash` | Raw on-chain intent hash. |
230
+ | `intentId` | Foreign-key string to `Intent.id`. |
231
+ | `feeRecipient` | Address that received this referral-fee slice. |
232
+ | `feeAmount` | Actual token amount distributed to `feeRecipient`. |
233
+ | `txHash` | Transaction that emitted the distribution event. |
234
+ | `timestamp` | Settlement timestamp for this distribution row. |
235
+
236
+ ### `TakerStats`
237
+
238
+ 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.
239
+
240
+ **Relationships**
241
+
242
+ - Implicit many-to-one from all `Intent` rows whose `owner` matches `TakerStats.owner`
243
+
244
+ | Field | Meaning |
245
+ | --- | --- |
246
+ | `id` | Composite key `chainId_owner`, with the owner lowercased. |
247
+ | `chainId` | Chain on which the taker activity occurred. |
248
+ | `owner` | Lowercased taker address used as the aggregation key. |
249
+ | `lifetimeSignaledCount` | Number of intents ever signaled by this taker. |
250
+ | `lifetimeFulfilledCount` | Number of non-manual intents that fulfilled successfully. |
251
+ | `lifetimeManualReleaseCount` | Number of intents that ended via manual release. |
252
+ | `lifetimePruneCount` | Number of intents that were pruned/cancelled. Same-tx prune-then-fulfill cases are rolled back. |
253
+ | `totalCancelledVolume` | Sum of token amount from cancelled/pruned intents, with rollback if a same-tx prune later fulfills. |
254
+ | `totalFulfilledVolume` | Sum of token amount from fulfilled/manual-release intents. |
255
+ | `lockScore` | Penalty-style score derived from cancelled intent lock duration. Currently meaningful only in the v21 path. |
256
+ | `lastIntentAt` | Timestamp of the taker's most recent intent signal. |
257
+ | `lastFulfilledAt` | Timestamp of the taker's most recent fulfillment/manual release. |
258
+ | `firstSeenAt` | Timestamp of the taker's first observed intent. |
259
+ | `updatedAt` | Last time this aggregate row changed. |
260
+
261
+ ### `MakerStats`
262
+
263
+ Per-maker aggregate across every deposit owned by the maker on a chain. This is deposit-derived state plus realized-profit rollups.
264
+
265
+ **Relationships**
266
+
267
+ - Implicit aggregation over all `Deposit` rows where `Deposit.depositor = MakerStats.maker`
268
+ - Parent summary for `MakerPlatformStats` and `MakerCurrencyStats`
269
+
270
+ | Field | Meaning |
271
+ | --- | --- |
272
+ | `id` | Composite key `chainId_maker`, with maker lowercased in the id. |
273
+ | `chainId` | Chain on which the maker operates. |
274
+ | `maker` | Maker/depositor address used as the aggregation key. |
275
+ | `totalAmountTaken` | Sum of `Deposit.totalAmountTaken` across the maker's deposits. |
276
+ | `grossDeposited` | All-time gross capital committed by the maker, derived per deposit as `remaining + outstanding + taken + withdrawn`. |
277
+ | `totalWithdrawn` | Sum of maker withdrawals across all deposits. |
278
+ | `outstandingIntentAmount` | Sum of liquidity currently locked in active intents across all deposits. |
279
+ | `activeDepositCount` | Number of deposits that are both `ACTIVE` and `acceptingIntents = true`. |
280
+ | `totalDepositCount` | Number of deposit rows ever created for the maker. |
281
+ | `fulfilledIntents` | Sum of `Deposit.fulfilledIntents` across the maker's deposits. |
282
+ | `prunedIntents` | Sum of `Deposit.prunedIntents` across the maker's deposits. |
283
+ | `signaledIntents` | Sum of `Deposit.signaledIntents` across the maker's deposits. |
284
+ | `totalIntents` | Sum of `Deposit.totalIntents` across the maker's deposits. |
285
+ | `manualReleaseCount` | Number of maker fills that happened through manual release. |
286
+ | `successRateBps` | Maker-level fulfillment rate in basis points, derived from aggregate `fulfilledIntents / totalIntents`. |
287
+ | `realizedProfitUsdCents` | Sum of computed realized profit across all maker profit snapshots. |
288
+ | `aprBps` | Reserved APR-style metric. It is present in the schema but not currently maintained by handlers. |
289
+ | `firstSeenAt` | Timestamp of the maker's earliest observed deposit. |
290
+ | `updatedAt` | Last time the aggregate changed. |
291
+
292
+ ### `MakerPlatformStats`
293
+
294
+ Per-maker, per-payment-method aggregate. This lets consumers break a maker's business down by payment rail or method hash.
295
+
296
+ **Relationships**
297
+
298
+ - Implicit aggregation over intents/fills for one maker and one `paymentMethodHash`
299
+
300
+ | Field | Meaning |
301
+ | --- | --- |
302
+ | `id` | Composite key `chainId_maker_paymentMethodHash`. |
303
+ | `chainId` | Chain on which the activity occurred. |
304
+ | `maker` | Maker address. |
305
+ | `paymentMethodHash` | Payment-method aggregation dimension. |
306
+ | `totalAmountTaken` | Sum of fulfilled/manual-release volume for this maker-method pair. |
307
+ | `fulfilledIntents` | Count of fulfilled/manual-release intents for this pair. |
308
+ | `prunedIntents` | Count of pruned intents for this pair. |
309
+ | `manualReleaseCount` | Count of manual-release fills for this pair. |
310
+ | `realizedProfitUsdCents` | Sum of realized profit allocated to this maker-method pair. |
311
+ | `computedProfitSnapshots` | Number of profit snapshots that successfully contributed realized profit to this pair. |
312
+ | `updatedAt` | Last time the row changed. |
313
+
314
+ ### `MakerCurrencyStats`
315
+
316
+ Per-maker, per-fiat-currency aggregate.
317
+
318
+ **Relationships**
319
+
320
+ - Implicit aggregation over intents/fills for one maker and one fiat currency
321
+
322
+ | Field | Meaning |
323
+ | --- | --- |
324
+ | `id` | Composite key `chainId_maker_currencyCode`. |
325
+ | `chainId` | Chain on which the activity occurred. |
326
+ | `maker` | Maker address. |
327
+ | `currencyCode` | Fiat-currency aggregation dimension. |
328
+ | `totalAmountTaken` | Sum of fulfilled/manual-release volume for this maker-currency pair. |
329
+ | `fulfilledIntents` | Count of fulfilled/manual-release intents for this pair. |
330
+ | `prunedIntents` | Count of pruned intents for this pair. |
331
+ | `manualReleaseCount` | Count of manual releases for this pair. |
332
+ | `updatedAt` | Last time the row changed. |
333
+
334
+ ### `PriceSnapshot`
335
+
336
+ Daily FX snapshot used to translate local-fiat quote rates into a USD-denominated profitability view.
337
+
338
+ **Relationships**
339
+
340
+ - Referenced by `MakerProfitSnapshot.priceSnapshotId`
341
+ - Used indirectly by manager aggregate PnL computation
342
+
343
+ | Field | Meaning |
344
+ | --- | --- |
345
+ | `id` | Composite key `currencyCode_timestampDay`. |
346
+ | `currencyCode` | Normalized fiat currency code of the quote being converted to USD. |
347
+ | `timestampDay` | Start-of-day UTC bucket in seconds. |
348
+ | `rateUsd` | Provider-supplied fiat-to-USD conversion rate in provider precision. |
349
+ | `ratePrecision` | Precision/scaling factor associated with `rateUsd`. |
350
+ | `provider` | Upstream provider name used to fetch the quote. |
351
+ | `source` | Source string or provider endpoint label. |
352
+ | `status` | Whether this snapshot came from live indexing or backfill. |
353
+ | `effectiveAt` | Timestamp at which the provider says the quote is valid/effective. |
354
+ | `retrievedAt` | Timestamp when the indexer fetched the quote. |
355
+ | `createdAt` | First time this snapshot row was written. |
356
+ | `updatedAt` | Last time this snapshot row was written. Usually equal to `createdAt`. |
357
+
358
+ ### `MakerProfitSnapshot`
359
+
360
+ Per-intent realized-profit record for makers. This is the bridge between intent settlement and USD-denominated reporting.
361
+
362
+ **Relationships**
363
+
364
+ - One row per settled `Intent` (`id = intentId`)
365
+ - Many-to-one to `Deposit`
366
+ - Optional many-to-one to `PriceSnapshot`
367
+
368
+ | Field | Meaning |
369
+ | --- | --- |
370
+ | `id` | Equal to `intentId`, enforcing one profit row per intent. |
371
+ | `chainId` | Chain where the intent settled. |
372
+ | `maker` | Maker address that owned the deposit. |
373
+ | `intentId` | Foreign-key string to `Intent.id`. |
374
+ | `depositId` | Foreign-key string to `Deposit.id`. |
375
+ | `fiatCurrency` | Fiat currency used for the quote/profit comparison. |
376
+ | `quoteConversionRate` | Quote-time rate captured from the intent. |
377
+ | `oracleRate` | USD-derived market reference rate computed from the linked `PriceSnapshot`. |
378
+ | `spreadBps` | Basis-point difference between `quoteConversionRate` and `oracleRate`. |
379
+ | `amount` | Token amount used for the profit calculation. |
380
+ | `notionalFiatUsdCents` | USD-cent value of the local-fiat notional implied by the quote. |
381
+ | `feeUsd` | Reserved fee field. It is currently written as zero. |
382
+ | `realizedProfitUsdCents` | Realized profit in USD cents. Can be negative. |
383
+ | `priceSnapshotId` | Optional reference to the `PriceSnapshot` used to compute `oracleRate`. |
384
+ | `status` | `COMPUTED` when an FX reference existed, `PENDING` otherwise. |
385
+ | `createdAt` | Timestamp when the profit row was created. |
386
+ | `updatedAt` | Last update timestamp for the profit row. |
387
+
388
+ ### `RateManager`
389
+
390
+ Registry row for a delegated rate manager. A deposit can point at one of these via `(rateManagerAddress, rateManagerId)`.
391
+
392
+ **Relationships**
393
+
394
+ - Parent of `RateManagerRate`
395
+ - Parent/source of `ManagerAggregateStats`, `ManagerDailySnapshot`, and `ManagerStats`
396
+ - Optional target of deposit delegation
397
+
398
+ | Field | Meaning |
399
+ | --- | --- |
400
+ | `id` | Composite key `chainId_rateManagerAddress_rateManagerId`. |
401
+ | `chainId` | Chain where the manager contract exists. |
402
+ | `rateManagerAddress` | Rate-manager contract address. |
403
+ | `rateManagerId` | On-contract manager identifier. |
404
+ | `manager` | Account recognized as the logical manager/operator. |
405
+ | `feeRecipient` | Account that receives manager fees on settlement. |
406
+ | `maxFee` | Maximum allowed fee configured at manager creation. |
407
+ | `fee` | Current fee rate in 1e18 precision. |
408
+ | `minLiquidity` | Configured minimum liquidity threshold advertised by the manager contract. |
409
+ | `name` | Optional human-readable name. |
410
+ | `uri` | Optional metadata URI. |
411
+ | `createdAt` | First-seen timestamp. |
412
+ | `updatedAt` | Last config update timestamp. |
413
+
414
+ ### `RateManagerRate`
415
+
416
+ 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`.
417
+
418
+ | Field | Meaning |
419
+ | --- | --- |
420
+ | `id` | Composite key `chainId_rateManagerAddress_rateManagerId_paymentMethodHash_currencyCode`. |
421
+ | `chainId` | Chain where the manager contract exists. |
422
+ | `rateManagerAddress` | Manager contract address. |
423
+ | `rateManagerId` | Manager identifier. |
424
+ | `paymentMethodHash` | Payment-method dimension for the manager quote. |
425
+ | `currencyCode` | Fiat-currency dimension for the manager quote. |
426
+ | `managerRate` | Gross manager-provided rate before floor enforcement. |
427
+ | `updatedAt` | Timestamp of the last rate update event for this pair. |
428
+
429
+ ### `ManagerAggregateStats`
430
+
431
+ Portfolio-level aggregate for one delegated rate manager. This is the top-level manager reporting row.
432
+
433
+ **Relationships**
434
+
435
+ - One-to-one logical summary for one `RateManager`
436
+ - Source for `ManagerDailySnapshot`
437
+ - Updated from delegated deposit balance changes and fulfilled intents
438
+
439
+ | Field | Meaning |
440
+ | --- | --- |
441
+ | `id` | Same identity as the corresponding `RateManager.id`. |
442
+ | `chainId` | Chain on which the manager operates. |
443
+ | `rateManagerAddress` | Manager contract address. |
444
+ | `rateManagerId` | Manager identifier. |
445
+ | `manager` | Manager account/operator. |
446
+ | `totalFilledVolume` | Cumulative token volume filled across all delegated deposits. |
447
+ | `totalFeeAmount` | Cumulative manager fee amount actually earned across fills. |
448
+ | `totalPnlUsdCents` | Cumulative USD-cent PnL measured against daily FX snapshots. |
449
+ | `fulfilledIntents` | Number of fulfilled delegated intents. |
450
+ | `currentDelegatedBalance` | Current delegated TVL, computed as the sum of `remainingDeposits + outstandingIntentAmount` across delegated deposits. |
451
+ | `currentDelegatedDeposits` | Number of deposits currently delegated to this manager. |
452
+ | `firstSeenAt` | First timestamp the manager aggregate was created. |
453
+ | `updatedAt` | Last time the aggregate changed. |
454
+
455
+ ### `ManagerDailySnapshot`
456
+
457
+ Daily bucketed snapshot for `ManagerAggregateStats`.
458
+
459
+ | Field | Meaning |
460
+ | --- | --- |
461
+ | `id` | Composite key `chainId_rateManagerAddress_rateManagerId_dayTimestamp`. |
462
+ | `chainId` | Chain on which the manager operates. |
463
+ | `rateManagerAddress` | Manager contract address. |
464
+ | `rateManagerId` | Manager identifier. |
465
+ | `dayTimestamp` | Start-of-day UTC bucket in seconds. |
466
+ | `tvl` | End-of-update delegated balance for that day. |
467
+ | `delegatedDeposits` | Number of currently delegated deposits at snapshot time. |
468
+ | `dailyVolume` | Volume filled during that day. |
469
+ | `dailyFees` | Manager fees earned during that day. |
470
+ | `dailyPnlUsdCents` | Daily PnL in USD cents. |
471
+ | `dailyFulfilledIntents` | Number of fulfilled intents on that day. |
472
+ | `cumulativeVolume` | Cumulative filled volume up to this snapshot. |
473
+ | `cumulativeFees` | Cumulative manager fees up to this snapshot. |
474
+ | `cumulativePnlUsdCents` | Cumulative PnL up to this snapshot. |
475
+ | `cumulativeFulfilledIntents` | Cumulative fulfilled-intent count up to this snapshot. |
476
+ | `updatedAt` | Last mutation time for the day's bucket. |
477
+
478
+ ### `DepositFundActivity`
479
+
480
+ Append-only normalized ledger of deposit funding activity. This is easier to query than replaying all raw event families.
481
+
482
+ **Relationships**
483
+
484
+ - Many-to-one to `Deposit`
485
+
486
+ | Field | Meaning |
487
+ | --- | --- |
488
+ | `id` | Composite key `txHash_logIndex`. |
489
+ | `chainId` | Chain where the activity happened. |
490
+ | `depositId` | Foreign-key string to `Deposit.id`. |
491
+ | `depositor` | Maker address that owns the deposit. |
492
+ | `activityType` | Normalized activity class: `DEPOSIT_RECEIVED`, `FUNDS_ADDED`, `WITHDRAWN`, or `CLOSED`. |
493
+ | `amount` | Token amount relevant to the activity. `CLOSED` can legitimately record zero amount. |
494
+ | `blockNumber` | Block number for the activity. |
495
+ | `timestamp` | Timestamp for the activity. |
496
+ | `txHash` | Transaction hash for the activity. |
497
+
498
+ ### `DepositDailySnapshot`
499
+
500
+ Daily bucketed snapshot of one deposit's state and realized profitability.
501
+
502
+ **Relationships**
503
+
504
+ - Many-to-one to `Deposit`
505
+ - Receives daily-volume and daily-PnL deltas from fulfillment flows
506
+
507
+ | Field | Meaning |
508
+ | --- | --- |
509
+ | `id` | Composite key `depositId_dayTimestamp`. |
510
+ | `chainId` | Chain where the deposit exists. |
511
+ | `depositId` | Foreign-key string to `Deposit.id`. |
512
+ | `depositor` | Maker address that owns the deposit. |
513
+ | `dayTimestamp` | Start-of-day UTC bucket in seconds. |
514
+ | `remainingDeposits` | Deposit liquidity available at the time of the last update to that bucket. |
515
+ | `outstandingIntentAmount` | Deposit liquidity currently locked in intents at the last update. |
516
+ | `totalAmountTaken` | Cumulative taken volume at the last update. |
517
+ | `totalWithdrawn` | Cumulative withdrawn volume at the last update. |
518
+ | `signaledIntents` | Cumulative signal count at the last update. |
519
+ | `fulfilledIntents` | Cumulative fulfillment count at the last update. |
520
+ | `prunedIntents` | Cumulative prune count at the last update. |
521
+ | `successRateBps` | Deposit success rate at the last update. |
522
+ | `dailyVolume` | Volume taken during that day only. |
523
+ | `dailyPnlUsdCents` | Realized PnL accrued during that day only. |
524
+ | `cumulativeVolume` | All-time volume through the deposit as of this bucket. |
525
+ | `cumulativePnlUsdCents` | All-time realized PnL through the deposit as of this bucket. |
526
+ | `updatedAt` | Last mutation time for the day's bucket. |
527
+
528
+ ### `ManagerStats`
529
+
530
+ Per-deposit stats row for a delegated manager. Where `ManagerAggregateStats` is portfolio-level, `ManagerStats` is deposit-level attribution.
531
+
532
+ **Relationships**
533
+
534
+ - Many-to-one to `Deposit`
535
+ - Many-to-one to `RateManager`
536
+
537
+ | Field | Meaning |
538
+ | --- | --- |
539
+ | `id` | Composite key `chainId_rateManagerAddress_rateManagerId_depositId`. |
540
+ | `chainId` | Chain on which the delegation exists. |
541
+ | `rateManagerAddress` | Manager contract address. |
542
+ | `rateManagerId` | Manager identifier. |
543
+ | `depositId` | Foreign-key string to `Deposit.id`. |
544
+ | `depositor` | Maker that owns the delegated deposit. |
545
+ | `currentDelegatedBalance` | Current delegated balance for this one deposit: `remainingDeposits + outstandingIntentAmount`. |
546
+ | `totalAmountTaken` | Deposit's all-time taken amount while tracked under the manager. |
547
+ | `totalWithdrawn` | Deposit's all-time withdrawn amount while tracked under the manager. |
548
+ | `fulfilledIntents` | Deposit-level fulfillment count. |
549
+ | `prunedIntents` | Deposit-level prune count. |
550
+ | `successRateBps` | Deposit-level success rate. |
551
+ | `updatedAt` | Last mutation time for the row. |
552
+
553
+ ### `QuoteCandidate`
554
+
555
+ Read-optimized quoting view. This is intentionally denormalized so curator/quote APIs do not need to join `Deposit`, `DepositPaymentMethod`, and `MethodCurrency` at request time.
556
+
557
+ **Relationships**
558
+
559
+ - Derived from exactly one `(Deposit, DepositPaymentMethod, MethodCurrency)` tuple
560
+ - `id` intentionally equals the corresponding `MethodCurrency.id`
561
+
562
+ | Field | Meaning |
563
+ | --- | --- |
564
+ | `id` | Same composite identity as the backing `MethodCurrency`: `escrowAddress_depositId_paymentMethodHash_currencyCode`. |
565
+ | `chainId` | Chain where the quoteable deposit lives. |
566
+ | `depositIdOnContract` | Raw on-chain deposit id. |
567
+ | `depositId` | Foreign-key string to `Deposit.id`. |
568
+ | `escrowAddress` | Escrow contract address copied from `Deposit`. |
569
+ | `depositor` | Maker address copied from `Deposit`. |
570
+ | `token` | Token address copied from `Deposit`. |
571
+ | `paymentMethodHash` | Payment-method hash copied from the tuple. |
572
+ | `currencyCode` | Fiat currency copied from the tuple. |
573
+ | `conversionRate` | Final gross resolved rate copied from `MethodCurrency`. |
574
+ | `takerConversionRate` | Final all-in taker-facing rate copied from `MethodCurrency`. |
575
+ | `managerFee` | Manager fee rate copied from `MethodCurrency`, defaulting to zero if absent. |
576
+ | `availableTokenAmount` | Current immediately available maker liquidity, copied from `Deposit.remainingDeposits`. |
577
+ | `maxTokenAvailablePerIntent` | `min(availableTokenAmount, intentAmountMax)`, used for quote ordering and max-per-intent checks. |
578
+ | `maxFiatAvailablePerIntent` | Fiat value of `maxTokenAvailablePerIntent` using the taker-facing rate. |
579
+ | `maxQuoteableFiat` | Fiat value of the full currently available liquidity using the taker-facing rate. |
580
+ | `intentAmountMin` | Minimum quoteable token amount copied from `Deposit`. |
581
+ | `intentAmountMax` | Maximum quoteable token amount copied from `Deposit`. |
582
+ | `successRateBps` | Deposit-level success signal copied from `Deposit`. |
583
+ | `payeeDetailsHash` | Hashed payee details copied from `DepositPaymentMethod`. |
584
+ | `intentGatingService` | Optional gating service copied from `DepositPaymentMethod`. |
585
+ | `isActive` | 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. |
586
+ | `hasMinLiquidity` | Whether `availableTokenAmount >= intentAmountMin`. |
587
+ | `minFiatSupported` | Fiat value of `intentAmountMin` using the taker-facing rate. |
588
+ | `maxFiatSupported` | Fiat value of `intentAmountMax` using the taker-facing rate. |
589
+ | `maxFiatAvail` | Fiat value of `availableTokenAmount` using the taker-facing rate. |
590
+ | `updatedAt` | Last time the denormalized row was recomputed. |
591
+
592
+ ## Audit/event entities
593
+
594
+ The remainder of the schema is an audit catalog of raw contract events. These rows are append-only and are useful for debugging, event replay validation, and answering "what exactly was emitted on-chain?" questions.
595
+
596
+ ### Shared audit-field conventions
597
+
598
+ - `id`: unless noted otherwise, event rows use a synthetic key of the form `chainId_blockNumber_logIndex`.
599
+ - `depositId`: for audit entities this is usually the raw on-chain deposit id, not `Deposit.id`.
600
+ - `intentHash`: raw on-chain intent hash. To join back to `Intent`, combine it with `chainId` to rebuild `Intent.id`.
601
+ - Most audit entities do not declare GraphQL foreign keys even when they are logically tied to domain rows.
602
+
603
+ ### Legacy v2 audit entities (`Escrow_V2_*`)
604
+
605
+ These entities mirror the deprecated v2 contracts. Unlike the newer v2.1/v2.2 flow, the legacy v2 path writes many core rows directly from these event handlers.
606
+
607
+ #### `Escrow_V2_DepositClosed`
608
+
609
+ Purpose: append-only record that a legacy v2 deposit was closed. This is the canonical close audit event for the v2 path and drives `Deposit.status = CLOSED`.
610
+
611
+ | Field | Meaning |
612
+ | --- | --- |
613
+ | `id` | Synthetic audit-event id. |
614
+ | `depositId` | Raw on-chain deposit id from the legacy v2 escrow. |
615
+ | `depositor` | Maker address that owned the deposit when it was closed. |
616
+
617
+ #### `Escrow_V2_DepositConversionRateUpdated`
618
+
619
+ Purpose: append-only record that a legacy v2 `(verifier, currency)` tuple changed its conversion rate. In the v2 path it also updates the corresponding `MethodCurrency` row.
620
+
621
+ | Field | Meaning |
622
+ | --- | --- |
623
+ | `id` | Synthetic audit-event id. |
624
+ | `depositId` | Raw on-chain deposit id. |
625
+ | `verifier` | Legacy verifier address used to infer or expand payment-method hashes. |
626
+ | `currency` | Fiat currency whose rate changed. |
627
+ | `newConversionRate` | New legacy conversion rate emitted by the contract. |
628
+
629
+ #### `Escrow_V2_DepositCurrencyAdded`
630
+
631
+ Purpose: append-only record that a legacy v2 deposit started supporting one verifier/currency pair. This event seeds a `MethodCurrency` row.
632
+
633
+ | Field | Meaning |
634
+ | --- | --- |
635
+ | `id` | Synthetic audit-event id. |
636
+ | `depositId` | Raw on-chain deposit id. |
637
+ | `verifier` | Verifier address that implies the payment method(s). |
638
+ | `currency` | Fiat currency added for quoting. |
639
+ | `conversionRate` | Initial conversion rate for the new tuple. |
640
+
641
+ #### `Escrow_V2_DepositReceived`
642
+
643
+ Purpose: append-only record that a legacy v2 deposit was created. This event is the canonical creator of the legacy `Deposit` row.
644
+
645
+ | Field | Meaning |
646
+ | --- | --- |
647
+ | `id` | Synthetic audit-event id. |
648
+ | `depositId` | Raw on-chain deposit id. |
649
+ | `depositor` | Maker address that created the deposit. |
650
+ | `token` | Token address deposited into escrow. |
651
+ | `amount` | Initial deposited token amount. |
652
+ | `intentAmountRange_0` | Minimum per-intent token amount emitted by the contract. |
653
+ | `intentAmountRange_1` | Maximum per-intent token amount emitted by the contract. |
654
+
655
+ #### `Escrow_V2_DepositVerifierAdded`
656
+
657
+ Purpose: append-only record that a verifier/payment-method source was added to a legacy v2 deposit. In the handler this event creates one or more `DepositPaymentMethod` rows.
658
+
659
+ | Field | Meaning |
660
+ | --- | --- |
661
+ | `id` | Synthetic audit-event id. |
662
+ | `depositId` | Raw on-chain deposit id. |
663
+ | `verifier` | Verifier address that maps to one or more payment-method hashes. |
664
+ | `payeeDetailsHash` | Hash of the maker's payee details for that verifier/method. |
665
+ | `intentGatingService` | Optional gating service associated with the verifier/method. |
666
+
667
+ #### `Escrow_V2_DepositWithdrawn`
668
+
669
+ Purpose: append-only record that a maker withdrew liquidity from a legacy v2 deposit. This event drives `remainingDeposits` and `totalWithdrawn`.
670
+
671
+ | Field | Meaning |
672
+ | --- | --- |
673
+ | `id` | Synthetic audit-event id. |
674
+ | `depositId` | Raw on-chain deposit id. |
675
+ | `depositor` | Maker address that withdrew funds. |
676
+ | `amount` | Token amount withdrawn. |
677
+
678
+ #### `Escrow_V2_IntentFulfilled`
679
+
680
+ Purpose: append-only record that a legacy v2 intent fulfilled. In the legacy path this is also the canonical fulfillment trigger for `Deposit` and `Intent` state.
681
+
682
+ | Field | Meaning |
683
+ | --- | --- |
684
+ | `id` | Synthetic audit-event id. |
685
+ | `intentHash` | Raw intent hash. |
686
+ | `depositId` | Raw deposit id against which the intent was signaled. |
687
+ | `verifier` | Verifier address that fulfilled the intent. Zero address implies manual release. |
688
+ | `owner` | Taker/intent owner. |
689
+ | `to` | Recipient of the token transfer. |
690
+ | `amount` | Token amount fulfilled. |
691
+ | `sustainabilityFee` | Protocol fee component emitted by the contract. |
692
+ | `verifierFee` | Verifier fee component emitted by the contract. |
693
+
694
+ #### `Escrow_V2_IntentPruned`
695
+
696
+ Purpose: append-only record that a legacy v2 intent was pruned/cancelled.
697
+
698
+ | Field | Meaning |
699
+ | --- | --- |
700
+ | `id` | Synthetic audit-event id. |
701
+ | `intentHash` | Raw intent hash. |
702
+ | `depositId` | Raw deposit id whose liquidity was unlocked. |
703
+
704
+ #### `Escrow_V2_IntentSignaled`
705
+
706
+ Purpose: append-only record that a legacy v2 taker signaled an intent. This event is the canonical creator of the legacy `Intent` row.
707
+
708
+ | Field | Meaning |
709
+ | --- | --- |
710
+ | `id` | Synthetic audit-event id. |
711
+ | `intentHash` | Raw intent hash. |
712
+ | `depositId` | Raw deposit id targeted by the intent. |
713
+ | `verifier` | Verifier address used for the payment rail. |
714
+ | `owner` | Taker/intent owner. |
715
+ | `to` | Recipient address for the payout. |
716
+ | `amount` | Signaled token amount. |
717
+ | `fiatCurrency` | Fiat currency quoted for the payment. |
718
+ | `conversionRate` | Quote-time conversion rate. |
719
+ | `timestamp` | Signal timestamp from the contract. |
720
+
721
+ ### V2.1 audit entities (`Escrow_V21_*`, `Orchestrator_V21_*`, `UnifiedVerifier_V21_*`)
722
+
723
+ These entities mirror the richer v2.1 contract split. A key implementation detail is that deposit counters are intentionally updated from escrow-side lock/unlock events rather than from the orchestrator signal/fulfill events, to avoid preload race conditions.
724
+
725
+ #### `Escrow_V21_DepositPaymentMethodAdded`
726
+
727
+ Purpose: append-only record that a v2.1 deposit added a payment method. This event creates a `DepositPaymentMethod` row and can trigger `QuoteCandidate` creation once currencies exist.
728
+
729
+ | Field | Meaning |
730
+ | --- | --- |
731
+ | `id` | Synthetic audit-event id. |
732
+ | `depositId` | Raw on-chain deposit id. |
733
+ | `paymentMethod` | Payment-method hash added to the deposit. |
734
+ | `payeeDetailsHash` | Hash of the maker's payee details. |
735
+ | `intentGatingService` | Optional gating service for the payment method. |
736
+
737
+ #### `Escrow_V21_DepositPaymentMethodActiveUpdated`
738
+
739
+ Purpose: append-only record that a v2.1 payment method was activated or deactivated. This ultimately affects `QuoteCandidate.isActive`.
740
+
741
+ | Field | Meaning |
742
+ | --- | --- |
743
+ | `id` | Synthetic audit-event id. |
744
+ | `depositId` | Raw deposit id. |
745
+ | `paymentMethod` | Payment-method hash whose active flag changed. |
746
+ | `isActive` | New active/inactive state for that method. |
747
+
748
+ #### `Escrow_V21_DepositCurrencyAdded`
749
+
750
+ Purpose: append-only record that a v2.1 payment-method/currency tuple was added. This creates the corresponding `MethodCurrency` row.
751
+
752
+ | Field | Meaning |
753
+ | --- | --- |
754
+ | `id` | Synthetic audit-event id. |
755
+ | `depositId` | Raw deposit id. |
756
+ | `paymentMethod` | Payment-method hash component of the tuple. |
757
+ | `currency` | Fiat currency component of the tuple. |
758
+ | `minConversionRate` | Initial maker floor/conversion rate for the tuple. |
759
+
760
+ #### `Escrow_V21_DepositConversionRateUpdated`
761
+
762
+ Purpose: schema-level audit surface for a v2.1 conversion-rate update event. Current live v2.1 handlers maintain rate state via `Escrow_V21_DepositMinConversionRateUpdated`, so this entity exists mainly for schema compatibility and historical completeness.
763
+
764
+ | Field | Meaning |
765
+ | --- | --- |
766
+ | `id` | Synthetic audit-event id. |
767
+ | `depositId` | Raw deposit id. |
768
+ | `paymentMethod` | Payment-method hash whose rate changed. |
769
+ | `currency` | Fiat currency whose rate changed. |
770
+ | `newConversionRate` | New conversion rate emitted by that event. |
771
+
772
+ #### `Escrow_V21_DepositIntentAmountRangeUpdated`
773
+
774
+ Purpose: append-only record that the maker changed `intentAmountMin` or `intentAmountMax` on a deposit. This affects both `Deposit` and any derived `QuoteCandidate` rows.
775
+
776
+ | Field | Meaning |
777
+ | --- | --- |
778
+ | `id` | Synthetic audit-event id. |
779
+ | `depositId` | Raw deposit id. |
780
+ | `intentAmountRange_0` | New minimum per-intent amount. |
781
+ | `intentAmountRange_1` | New maximum per-intent amount. |
782
+
783
+ #### `Escrow_V21_DepositMinConversionRateUpdated`
784
+
785
+ Purpose: append-only record that the maker changed the fixed floor for one payment-method/currency tuple. This is the canonical v2.1 rate-update audit row used by current handlers.
786
+
787
+ | Field | Meaning |
788
+ | --- | --- |
789
+ | `id` | Synthetic audit-event id. |
790
+ | `depositId` | Raw deposit id. |
791
+ | `paymentMethod` | Payment-method hash whose floor changed. |
792
+ | `currency` | Fiat currency whose floor changed. |
793
+ | `newMinConversionRate` | New maker floor. |
794
+
795
+ #### `Escrow_V21_DepositAcceptingIntentsUpdated`
796
+
797
+ Purpose: append-only record that the maker toggled whether the deposit accepts new intents.
798
+
799
+ | Field | Meaning |
800
+ | --- | --- |
801
+ | `id` | Synthetic audit-event id. |
802
+ | `depositId` | Raw deposit id. |
803
+ | `acceptingIntents` | New deposit-level accepting-intents flag. |
804
+
805
+ #### `Escrow_V21_DepositReceived`
806
+
807
+ Purpose: append-only record that a v2.1 deposit was created. This is the canonical creator of the v2.1 `Deposit` row.
808
+
809
+ | Field | Meaning |
810
+ | --- | --- |
811
+ | `id` | Synthetic audit-event id. |
812
+ | `depositId` | Raw deposit id. |
813
+ | `depositor` | Maker address that created the deposit. |
814
+ | `token` | Token address deposited into escrow. |
815
+ | `amount` | Initial deposit amount. |
816
+ | `intentAmountRange_0` | Initial minimum per-intent amount. |
817
+ | `intentAmountRange_1` | Initial maximum per-intent amount. |
818
+ | `delegate` | Initial delegate address for the deposit. |
819
+ | `intentGuardian` | Contract-level guardian emitted by the event. It is audit-only and not persisted on `Deposit`. |
820
+
821
+ #### `Escrow_V21_DepositDelegateSet`
822
+
823
+ Purpose: append-only record that the maker set or changed a deposit delegate.
824
+
825
+ | Field | Meaning |
826
+ | --- | --- |
827
+ | `id` | Synthetic audit-event id. |
828
+ | `depositId` | Raw deposit id. |
829
+ | `depositor` | Maker address that owns the deposit. |
830
+ | `delegate` | New delegate address. |
831
+
832
+ #### `Escrow_V21_DepositDelegateRemoved`
833
+
834
+ Purpose: append-only record that the deposit delegate was removed.
835
+
836
+ | Field | Meaning |
837
+ | --- | --- |
838
+ | `id` | Synthetic audit-event id. |
839
+ | `depositId` | Raw deposit id. |
840
+ | `depositor` | Maker address that owned the deposit. |
841
+
842
+ #### `Escrow_V21_DepositFundsAdded`
843
+
844
+ Purpose: append-only record that more liquidity was added to a v2.1 deposit. This increases `remainingDeposits`.
845
+
846
+ | Field | Meaning |
847
+ | --- | --- |
848
+ | `id` | Synthetic audit-event id. |
849
+ | `depositId` | Raw deposit id. |
850
+ | `depositor` | Maker address that added funds. |
851
+ | `amount` | Additional token amount deposited. |
852
+
853
+ #### `Escrow_V21_DepositWithdrawn`
854
+
855
+ Purpose: append-only record that liquidity was withdrawn from a v2.1 deposit.
856
+
857
+ | Field | Meaning |
858
+ | --- | --- |
859
+ | `id` | Synthetic audit-event id. |
860
+ | `depositId` | Raw deposit id. |
861
+ | `depositor` | Maker address that withdrew funds. |
862
+ | `amount` | Token amount withdrawn. |
863
+
864
+ #### `Escrow_V21_DepositClosed`
865
+
866
+ Purpose: append-only record that a v2.1 deposit was closed. This drives `Deposit.status = CLOSED`, cleanup of quote rows, and a normalized `DepositFundActivity`.
867
+
868
+ | Field | Meaning |
869
+ | --- | --- |
870
+ | `id` | Synthetic audit-event id. |
871
+ | `depositId` | Raw deposit id. |
872
+ | `depositor` | Maker address that owned the deposit at close time. |
873
+
874
+ #### `Escrow_V21_FundsLocked`
875
+
876
+ Purpose: canonical audit row for locking liquidity behind a signaled intent. In v2.1 this is the authoritative trigger for incrementing `Deposit.signaledIntents` and `Deposit.totalIntents`.
877
+
878
+ | Field | Meaning |
879
+ | --- | --- |
880
+ | `id` | Synthetic audit-event id. |
881
+ | `depositId` | Raw deposit id whose liquidity was locked. |
882
+ | `intentHash` | Raw intent hash that received the lock. |
883
+ | `amount` | Token amount locked. |
884
+ | `expiryTime` | Lock expiry timestamp set by the contract. |
885
+
886
+ #### `Escrow_V21_FundsUnlocked`
887
+
888
+ Purpose: canonical audit row for unlocking liquidity. In v2.1 this is the authoritative prune source because orchestrator-side prune events can fail inside contract `try/catch`.
889
+
890
+ | Field | Meaning |
891
+ | --- | --- |
892
+ | `id` | Synthetic audit-event id. |
893
+ | `depositId` | Raw deposit id whose liquidity was unlocked. |
894
+ | `intentHash` | Raw intent hash being unlocked. |
895
+ | `amount` | Token amount unlocked. |
896
+
897
+ #### `Escrow_V21_FundsUnlockedAndTransferred`
898
+
899
+ Purpose: canonical v2.1 settlement audit row. This event finalizes gross released amount, deposit counters, daily volume, realized PnL, manager aggregates, and quote-liquidity updates.
900
+
901
+ | Field | Meaning |
902
+ | --- | --- |
903
+ | `id` | Synthetic audit-event id. |
904
+ | `depositId` | Raw deposit id whose funds were unlocked. |
905
+ | `intentHash` | Raw intent hash being settled. |
906
+ | `unlockedAmount` | Total amount unlocked from escrow. |
907
+ | `transferredAmount` | Portion actually transferred to the taker. The difference is reclaimed back to the maker's deposit. |
908
+ | `to` | Recipient address for the transfer. |
909
+
910
+ #### `Escrow_V21_IntentExpiryExtended`
911
+
912
+ Purpose: append-only record that an intent's expiry time was extended. This updates `Intent.expiryTime`.
913
+
914
+ | Field | Meaning |
915
+ | --- | --- |
916
+ | `id` | Synthetic audit-event id. |
917
+ | `depositId` | Raw deposit id associated with the intent. |
918
+ | `intentHash` | Raw intent hash whose expiry changed. |
919
+ | `newExpiryTime` | New canonical expiry timestamp. |
920
+
921
+ #### `Orchestrator_V21_IntentSignaled`
922
+
923
+ Purpose: append-only record that the orchestrator saw an intent signal. This creates the `Intent` row, but deposit counters are deliberately updated later by `Escrow_V21_FundsLocked`.
924
+
925
+ | Field | Meaning |
926
+ | --- | --- |
927
+ | `id` | Synthetic audit-event id. |
928
+ | `intentHash` | Raw intent hash. |
929
+ | `escrow` | Escrow address targeted by the intent. This is part of how the composite `Deposit.id` is rebuilt. |
930
+ | `depositId` | Raw deposit id inside that escrow. |
931
+ | `paymentMethod` | Payment-method hash signaled by the taker. |
932
+ | `owner` | Taker/intent owner. |
933
+ | `to` | Recipient address for settlement. |
934
+ | `amount` | Signaled token amount. |
935
+ | `fiatCurrency` | Signaled fiat currency. |
936
+ | `conversionRate` | Quote-time conversion rate. |
937
+ | `timestamp` | Signal timestamp. |
938
+
939
+ #### `Orchestrator_V21_IntentPruned`
940
+
941
+ Purpose: audit-only record that the orchestrator attempted to prune an intent. Current business state does not trust this as canonical; `Escrow_V21_FundsUnlocked` is authoritative.
942
+
943
+ | Field | Meaning |
944
+ | --- | --- |
945
+ | `id` | Synthetic audit-event id. |
946
+ | `intentHash` | Raw intent hash that the orchestrator reported as pruned. |
947
+
948
+ #### `Orchestrator_V21_IntentFulfilled`
949
+
950
+ Purpose: append-only record that the orchestrator reported an intent fulfillment. It enriches the `Intent` with net taker payout, but deposit counters are finalized from `Escrow_V21_FundsUnlockedAndTransferred`.
951
+
952
+ | Field | Meaning |
953
+ | --- | --- |
954
+ | `id` | Synthetic audit-event id. |
955
+ | `intentHash` | Raw intent hash. |
956
+ | `fundsTransferredTo` | Address that received the taker's net payout. |
957
+ | `amount` | Net amount received by the taker after protocol/referral fees. |
958
+ | `isManualRelease` | Whether the fulfillment used the manual-release path. |
959
+
960
+ #### `UnifiedVerifier_V21_PaymentVerified`
961
+
962
+ Purpose: append-only proof-audit row that carries the actual fiat payment details. This enriches the matching `Intent` and can differ from the signaled amount/currency in partial-payment cases.
963
+
964
+ | Field | Meaning |
965
+ | --- | --- |
966
+ | `id` | Synthetic audit-event id. |
967
+ | `intentHash` | Raw intent hash whose payment was proven. |
968
+ | `method` | Payment method/provider identifier inside the proof. |
969
+ | `currency` | Actual fiat currency observed in the proof. |
970
+ | `amount` | Actual fiat amount observed in the proof. |
971
+ | `timestamp` | Proof/payment timestamp. |
972
+ | `paymentId` | External payment identifier from the provider. |
973
+ | `payeeId` | Provider-specific payee identifier that complements `payeeDetailsHash`. |
974
+
975
+ ### V2.2 and infrastructure audit entities (`EscrowV2_*`, `OrchestratorV2_*`, `RateManagerV1_*`, registry/oracle feeds)
976
+
977
+ Important implementation note: the current v2.2 code reuses the v2.1 handlers for most shared deposit/intent lifecycle logic. That means the canonical audit rows for shared lifecycle events are often still the `Escrow_V21_*` / `Orchestrator_V21_*` entities. The v2.2-prefixed entities below are still part of the schema, but several of the shared-lifecycle ones are effectively compatibility placeholders today unless a dedicated writer is added later.
978
+
979
+ #### `EscrowV2_DepositReceived`
980
+
981
+ Purpose: schema-level audit surface for a v2.2 deposit creation event. Current handler wiring forwards the shared lifecycle into the v2.1 deposit handler, so the equivalent `Escrow_V21_DepositReceived` row is the one currently written.
982
+
983
+ | Field | Meaning |
984
+ | --- | --- |
985
+ | `id` | Synthetic audit-event id. |
986
+ | `depositId` | Raw deposit id. |
987
+ | `depositor` | Maker address. |
988
+ | `token` | Token address deposited. |
989
+ | `amount` | Initial deposit amount. |
990
+ | `intentAmountRange_0` | Minimum per-intent amount. |
991
+ | `intentAmountRange_1` | Maximum per-intent amount. |
992
+ | `delegate` | Initial delegate address. |
993
+ | `intentGuardian` | Audit-only guardian field emitted by the contract. |
994
+
995
+ #### `EscrowV2_DepositDelegateSet`
996
+
997
+ Purpose: schema-level audit surface for a v2.2 delegate set event. Shared lifecycle currently flows through the v2.1-compatible audit entity.
998
+
999
+ | Field | Meaning |
1000
+ | --- | --- |
1001
+ | `id` | Synthetic audit-event id. |
1002
+ | `depositId` | Raw deposit id. |
1003
+ | `depositor` | Maker address. |
1004
+ | `delegate` | New delegate address. |
1005
+
1006
+ #### `EscrowV2_DepositDelegateRemoved`
1007
+
1008
+ Purpose: schema-level audit surface for removing a v2.2 deposit delegate.
1009
+
1010
+ | Field | Meaning |
1011
+ | --- | --- |
1012
+ | `id` | Synthetic audit-event id. |
1013
+ | `depositId` | Raw deposit id. |
1014
+ | `depositor` | Maker address. |
1015
+
1016
+ #### `EscrowV2_DepositFundsAdded`
1017
+
1018
+ Purpose: schema-level audit surface for adding liquidity to a v2.2 deposit.
1019
+
1020
+ | Field | Meaning |
1021
+ | --- | --- |
1022
+ | `id` | Synthetic audit-event id. |
1023
+ | `depositId` | Raw deposit id. |
1024
+ | `depositor` | Maker address. |
1025
+ | `amount` | Additional liquidity amount. |
1026
+
1027
+ #### `EscrowV2_DepositWithdrawn`
1028
+
1029
+ Purpose: schema-level audit surface for withdrawing liquidity from a v2.2 deposit.
1030
+
1031
+ | Field | Meaning |
1032
+ | --- | --- |
1033
+ | `id` | Synthetic audit-event id. |
1034
+ | `depositId` | Raw deposit id. |
1035
+ | `depositor` | Maker address. |
1036
+ | `amount` | Withdrawal amount. |
1037
+
1038
+ #### `EscrowV2_DepositClosed`
1039
+
1040
+ Purpose: schema-level audit surface for closing a v2.2 deposit.
1041
+
1042
+ | Field | Meaning |
1043
+ | --- | --- |
1044
+ | `id` | Synthetic audit-event id. |
1045
+ | `depositId` | Raw deposit id. |
1046
+ | `depositor` | Maker address. |
1047
+
1048
+ #### `EscrowV2_DepositPaymentMethodAdded`
1049
+
1050
+ Purpose: schema-level audit surface for adding a payment method to a v2.2 deposit.
1051
+
1052
+ | Field | Meaning |
1053
+ | --- | --- |
1054
+ | `id` | Synthetic audit-event id. |
1055
+ | `depositId` | Raw deposit id. |
1056
+ | `paymentMethod` | Payment-method hash added. |
1057
+ | `payeeDetailsHash` | Hash of payee details. |
1058
+ | `intentGatingService` | Optional gating service. |
1059
+
1060
+ #### `EscrowV2_DepositPaymentMethodActiveUpdated`
1061
+
1062
+ Purpose: schema-level audit surface for toggling a v2.2 payment method's active flag.
1063
+
1064
+ | Field | Meaning |
1065
+ | --- | --- |
1066
+ | `id` | Synthetic audit-event id. |
1067
+ | `depositId` | Raw deposit id. |
1068
+ | `paymentMethod` | Payment-method hash changed. |
1069
+ | `isActive` | New active/inactive state. |
1070
+
1071
+ #### `EscrowV2_DepositCurrencyAdded`
1072
+
1073
+ Purpose: schema-level audit surface for adding a v2.2 payment-method/currency tuple.
1074
+
1075
+ | Field | Meaning |
1076
+ | --- | --- |
1077
+ | `id` | Synthetic audit-event id. |
1078
+ | `depositId` | Raw deposit id. |
1079
+ | `paymentMethod` | Payment-method hash component. |
1080
+ | `currency` | Fiat currency component. |
1081
+ | `minConversionRate` | Initial maker floor for the tuple. |
1082
+
1083
+ #### `EscrowV2_FundsLocked`
1084
+
1085
+ Purpose: schema-level audit surface for locking liquidity in the v2.2 path. Current logic forwards to the v2.1-style canonical lock writer.
1086
+
1087
+ | Field | Meaning |
1088
+ | --- | --- |
1089
+ | `id` | Synthetic audit-event id. |
1090
+ | `depositId` | Raw deposit id. |
1091
+ | `intentHash` | Raw intent hash. |
1092
+ | `amount` | Locked amount. |
1093
+ | `expiryTime` | Lock expiry timestamp. |
1094
+
1095
+ #### `EscrowV2_FundsUnlocked`
1096
+
1097
+ Purpose: schema-level audit surface for unlocking liquidity in the v2.2 path.
1098
+
1099
+ | Field | Meaning |
1100
+ | --- | --- |
1101
+ | `id` | Synthetic audit-event id. |
1102
+ | `depositId` | Raw deposit id. |
1103
+ | `intentHash` | Raw intent hash. |
1104
+ | `amount` | Unlocked amount. |
1105
+
1106
+ #### `EscrowV2_FundsUnlockedAndTransferred`
1107
+
1108
+ Purpose: schema-level audit surface for v2.2 settlement and transfer.
1109
+
1110
+ | Field | Meaning |
1111
+ | --- | --- |
1112
+ | `id` | Synthetic audit-event id. |
1113
+ | `depositId` | Raw deposit id. |
1114
+ | `intentHash` | Raw intent hash. |
1115
+ | `unlockedAmount` | Total unlocked amount. |
1116
+ | `transferredAmount` | Portion actually transferred to the taker. |
1117
+ | `to` | Recipient address of the transfer. |
1118
+
1119
+ #### `EscrowV2_IntentExpiryExtended`
1120
+
1121
+ Purpose: schema-level audit surface for extending a v2.2 intent expiry.
1122
+
1123
+ | Field | Meaning |
1124
+ | --- | --- |
1125
+ | `id` | Synthetic audit-event id. |
1126
+ | `depositId` | Raw deposit id. |
1127
+ | `intentHash` | Raw intent hash. |
1128
+ | `newExpiryTime` | New expiry timestamp. |
1129
+
1130
+ #### `EscrowV2_DepositIntentAmountRangeUpdated`
1131
+
1132
+ Purpose: schema-level audit surface for changing v2.2 intent amount bounds.
1133
+
1134
+ | Field | Meaning |
1135
+ | --- | --- |
1136
+ | `id` | Synthetic audit-event id. |
1137
+ | `depositId` | Raw deposit id. |
1138
+ | `intentAmountRange_0` | New minimum per-intent amount. |
1139
+ | `intentAmountRange_1` | New maximum per-intent amount. |
1140
+
1141
+ #### `EscrowV2_DepositMinConversionRateUpdated`
1142
+
1143
+ Purpose: schema-level audit surface for changing the fixed floor on a v2.2 tuple.
1144
+
1145
+ | Field | Meaning |
1146
+ | --- | --- |
1147
+ | `id` | Synthetic audit-event id. |
1148
+ | `depositId` | Raw deposit id. |
1149
+ | `paymentMethod` | Payment-method hash changed. |
1150
+ | `currency` | Fiat currency changed. |
1151
+ | `newMinConversionRate` | New maker floor. |
1152
+
1153
+ #### `EscrowV2_DepositAcceptingIntentsUpdated`
1154
+
1155
+ Purpose: schema-level audit surface for toggling `Deposit.acceptingIntents` in the v2.2 path.
1156
+
1157
+ | Field | Meaning |
1158
+ | --- | --- |
1159
+ | `id` | Synthetic audit-event id. |
1160
+ | `depositId` | Raw deposit id. |
1161
+ | `acceptingIntents` | New accepting-intents flag. |
1162
+
1163
+ #### `EscrowV2_DepositOracleRateConfigSet`
1164
+
1165
+ Purpose: append-only record that a tuple received oracle configuration in the v2.2 path. This is a dedicated v2.2-only audit row and is actively written by current handlers. It feeds the oracle-related fields on `MethodCurrency`.
1166
+
1167
+ | Field | Meaning |
1168
+ | --- | --- |
1169
+ | `id` | Synthetic audit-event id. |
1170
+ | `depositId` | Raw deposit id whose tuple is being configured. |
1171
+ | `paymentMethod` | Payment-method hash component of the tuple. |
1172
+ | `currencyCode` | Fiat currency component of the tuple. |
1173
+ | `adapter` | Oracle adapter contract address. |
1174
+ | `adapterConfig` | Encoded adapter configuration bytes. |
1175
+ | `spreadBps` | Spread markup to apply to the oracle-derived rate. |
1176
+ | `maxStaleness` | Maximum accepted oracle age in seconds. |
1177
+
1178
+ #### `EscrowV2_DepositOracleRateConfigRemoved`
1179
+
1180
+ Purpose: append-only record that oracle configuration was removed from a v2.2 tuple. Current handlers clear oracle fields from `MethodCurrency` and recompute the final tuple rate.
1181
+
1182
+ | Field | Meaning |
1183
+ | --- | --- |
1184
+ | `id` | Synthetic audit-event id. |
1185
+ | `depositId` | Raw deposit id. |
1186
+ | `paymentMethod` | Payment-method hash component. |
1187
+ | `currencyCode` | Fiat currency component. |
1188
+
1189
+ #### `EscrowV2_DepositRateManagerSet`
1190
+
1191
+ Purpose: append-only record that a v2.2 deposit was delegated to a rate manager. This is a dedicated v2.2-only audit row and is actively written by current handlers. It also updates `Deposit`, `ManagerStats`, `ManagerAggregateStats`, and all affected `MethodCurrency` rows.
1192
+
1193
+ | Field | Meaning |
1194
+ | --- | --- |
1195
+ | `id` | Synthetic audit-event id. |
1196
+ | `depositId` | Raw deposit id receiving delegation. |
1197
+ | `rateManager` | Rate-manager contract address. |
1198
+ | `rateManagerId` | On-contract manager identifier. |
1199
+
1200
+ #### `EscrowV2_DepositRateManagerCleared`
1201
+
1202
+ Purpose: append-only record that a v2.2 deposit delegation was removed. Current handlers clear the manager assignment and recompute all affected tuple rates.
1203
+
1204
+ | Field | Meaning |
1205
+ | --- | --- |
1206
+ | `id` | Synthetic audit-event id. |
1207
+ | `depositId` | Raw deposit id whose delegation was cleared. |
1208
+ | `rateManager` | Previously assigned rate-manager contract address. |
1209
+ | `rateManagerId` | Previously assigned manager identifier. |
1210
+
1211
+ #### `EscrowV2_OrchestratorRegistryUpdated`
1212
+
1213
+ Purpose: append-only record that the escrow contract updated which orchestrator registry it points at.
1214
+
1215
+ | Field | Meaning |
1216
+ | --- | --- |
1217
+ | `id` | Synthetic audit-event id. |
1218
+ | `orchestratorRegistry` | New orchestrator-registry contract address. |
1219
+
1220
+ #### `OrchestratorV2_IntentSignaled`
1221
+
1222
+ Purpose: schema-level audit surface for a v2.2 orchestrator signal event. Current shared lifecycle wiring forwards to the v2.1 audit entity instead.
1223
+
1224
+ | Field | Meaning |
1225
+ | --- | --- |
1226
+ | `id` | Synthetic audit-event id. |
1227
+ | `intentHash` | Raw intent hash. |
1228
+ | `escrow` | Escrow address targeted by the intent. |
1229
+ | `depositId` | Raw deposit id inside that escrow. |
1230
+ | `paymentMethod` | Payment-method hash signaled. |
1231
+ | `owner` | Taker/intent owner. |
1232
+ | `to` | Recipient address for settlement. |
1233
+ | `amount` | Signaled token amount. |
1234
+ | `fiatCurrency` | Signaled fiat currency. |
1235
+ | `conversionRate` | Quote-time rate. |
1236
+ | `timestamp` | Signal timestamp. |
1237
+
1238
+ #### `OrchestratorV2_IntentPruned`
1239
+
1240
+ Purpose: schema-level audit surface for a v2.2 orchestrator prune event. Current canonical prune logic still comes from escrow-side unlock events.
1241
+
1242
+ | Field | Meaning |
1243
+ | --- | --- |
1244
+ | `id` | Synthetic audit-event id. |
1245
+ | `intentHash` | Raw intent hash. |
1246
+
1247
+ #### `OrchestratorV2_IntentFulfilled`
1248
+
1249
+ Purpose: schema-level audit surface for a v2.2 orchestrator fulfill event. Current canonical deposit-counter updates still come from the escrow-side settlement event.
1250
+
1251
+ | Field | Meaning |
1252
+ | --- | --- |
1253
+ | `id` | Synthetic audit-event id. |
1254
+ | `intentHash` | Raw intent hash. |
1255
+ | `fundsTransferredTo` | Address that received the net payout. |
1256
+ | `amount` | Net amount received by the taker. |
1257
+ | `isManualRelease` | Whether the fulfill path was manual release. |
1258
+
1259
+ #### `OrchestratorV2_IntentManagerFeeSnapshotted`
1260
+
1261
+ Purpose: dedicated v2.2 audit row for manager-fee snapshotting on an intent. This is actively written and enriches `Intent` with manager-fee details.
1262
+
1263
+ | Field | Meaning |
1264
+ | --- | --- |
1265
+ | `id` | Synthetic audit-event id. |
1266
+ | `intentHash` | Raw intent hash being enriched. |
1267
+ | `feeRecipient` | Manager-fee recipient for the intent. |
1268
+ | `fee` | Snapshotted manager-fee rate in 1e18 precision. |
1269
+
1270
+ #### `OrchestratorV2_IntentReferralFeeDistributed`
1271
+
1272
+ Purpose: dedicated v2.2 audit row for referral-fee payout. This is actively written and also fans out into `ReferralFeeDistribution`.
1273
+
1274
+ | Field | Meaning |
1275
+ | --- | --- |
1276
+ | `id` | Synthetic audit-event id. |
1277
+ | `intentHash` | Raw intent hash that generated the referral fee. |
1278
+ | `feeRecipient` | Recipient of this referral-fee slice. |
1279
+ | `feeAmount` | Token amount distributed to that recipient. |
1280
+
1281
+ #### `RateManagerV1_RateManagerCreated`
1282
+
1283
+ Purpose: append-only record that a new delegated rate manager was created. This seeds both `RateManager` and `ManagerAggregateStats`.
1284
+
1285
+ | Field | Meaning |
1286
+ | --- | --- |
1287
+ | `id` | Synthetic audit-event id. |
1288
+ | `rateManagerId` | On-contract manager identifier. |
1289
+ | `manager` | Logical manager/operator account. |
1290
+ | `feeRecipient` | Recipient of manager fees. |
1291
+ | `maxFee` | Maximum allowed fee for the manager. |
1292
+ | `fee` | Initial active fee. |
1293
+ | `name` | Optional human-readable name. |
1294
+ | `uri` | Optional metadata URI. |
1295
+
1296
+ #### `RateManagerV1_RateManagerConfigUpdated`
1297
+
1298
+ Purpose: append-only record that mutable manager metadata changed.
1299
+
1300
+ | Field | Meaning |
1301
+ | --- | --- |
1302
+ | `id` | Synthetic audit-event id. |
1303
+ | `rateManagerId` | Manager identifier updated. |
1304
+ | `manager` | Updated manager/operator account. |
1305
+ | `feeRecipient` | Updated fee-recipient account. |
1306
+ | `name` | Updated display name. |
1307
+ | `uri` | Updated metadata URI. |
1308
+
1309
+ #### `RateManagerV1_RateManagerFeeUpdated`
1310
+
1311
+ Purpose: append-only record that the manager's active fee changed. Current handlers also recompute delegated tuple rates because taker-facing pricing changes when the fee changes.
1312
+
1313
+ | Field | Meaning |
1314
+ | --- | --- |
1315
+ | `id` | Synthetic audit-event id. |
1316
+ | `rateManagerId` | Manager identifier updated. |
1317
+ | `fee` | New active fee in 1e18 precision. |
1318
+
1319
+ #### `RateManagerV1_RateManagerRateUpdated`
1320
+
1321
+ Purpose: append-only record that one manager payment-method/currency pair received a new quote. This writes a `RateManagerRate` row and propagates the new rate to all delegated deposits using that manager.
1322
+
1323
+ | Field | Meaning |
1324
+ | --- | --- |
1325
+ | `id` | Synthetic audit-event id. |
1326
+ | `rateManagerId` | Manager identifier updated. |
1327
+ | `paymentMethod` | Payment-method hash dimension. |
1328
+ | `currencyCode` | Fiat-currency dimension. |
1329
+ | `rate` | New manager-provided gross rate. |
1330
+
1331
+ #### `RateManagerV1_RateManagerRatesBatchUpdated`
1332
+
1333
+ Purpose: append-only acknowledgement that a batch update occurred at the contract layer. Current handlers keep this as audit-only; individual pair rows still come from per-pair update events.
1334
+
1335
+ | Field | Meaning |
1336
+ | --- | --- |
1337
+ | `id` | Synthetic audit-event id. |
1338
+ | `rateManagerId` | Manager identifier whose batch update completed. |
1339
+ | `totalUpdated` | Number of pair rows updated by the batch operation. |
1340
+
1341
+ #### `RateManagerV1_MinLiquidityUpdated`
1342
+
1343
+ Purpose: append-only record that a manager updated its advertised minimum-liquidity threshold. Current handlers update `RateManager.minLiquidity`, but this threshold is not yet part of `QuoteCandidate.isActive`.
1344
+
1345
+ | Field | Meaning |
1346
+ | --- | --- |
1347
+ | `id` | Synthetic audit-event id. |
1348
+ | `rateManagerId` | Manager identifier updated. |
1349
+ | `minLiquidity` | New minimum-liquidity threshold. |
1350
+
1351
+ #### `OrchestratorRegistry_OrchestratorAdded`
1352
+
1353
+ Purpose: append-only registry record that an orchestrator was added to the allowed set.
1354
+
1355
+ | Field | Meaning |
1356
+ | --- | --- |
1357
+ | `id` | Synthetic audit-event id. |
1358
+ | `orchestrator` | Orchestrator contract address that was added. |
1359
+
1360
+ #### `OrchestratorRegistry_OrchestratorRemoved`
1361
+
1362
+ Purpose: append-only registry record that an orchestrator was removed from the allowed set.
1363
+
1364
+ | Field | Meaning |
1365
+ | --- | --- |
1366
+ | `id` | Synthetic audit-event id. |
1367
+ | `orchestrator` | Orchestrator contract address that was removed. |
1368
+
1369
+ #### `ChainlinkAggregatorV3_AnswerUpdated`
1370
+
1371
+ Purpose: append-only audit row for live Chainlink price-feed updates. Current handlers use it to find matching `MethodCurrency` rows and refresh their oracle-derived rates.
1372
+
1373
+ | Field | Meaning |
1374
+ | --- | --- |
1375
+ | `id` | Synthetic audit-event id. |
1376
+ | `feed` | Feed or aggregator address that emitted the update. |
1377
+ | `current` | Current Chainlink answer value. |
1378
+ | `roundId` | Round id associated with the answer. |
1379
+ | `updatedAt` | Oracle-side update timestamp, not necessarily the block timestamp. |
1380
+
1381
+ #### `PythPriceFeed_PriceFeedUpdate`
1382
+
1383
+ Purpose: append-only audit row for live Pyth price-feed updates. Current handlers use it to refresh matching `MethodCurrency` rows with `kind = oracle_pyth`.
1384
+
1385
+ | Field | Meaning |
1386
+ | --- | --- |
1387
+ | `id` | Event id string used by the Pyth handler for the update row. |
1388
+ | `feedId` | Pyth feed id that emitted the update. |
1389
+ | `publishTime` | Pyth publish timestamp. |
1390
+ | `price` | Raw Pyth price value. |
1391
+ | `conf` | Pyth confidence interval value emitted alongside the price. |