# Domain types enum DepositStatus { ACTIVE CLOSED } enum IntentStatus { SIGNALED FULFILLED PRUNED MANUALLY_RELEASED } enum PriceSnapshotStatus { LIVE BACKFILL } enum ProfitStatus { COMPUTED PENDING } enum DisputeProtectionIntentStatus { PENDING CANCELLED SETTLED RELEASED DISPUTED } enum EscrowIntentPeriodSource { FUNDS_LOCKED CONFIG_UPDATE } enum StakeLockStatus { ACTIVE UNLOCKED RESOLVED } enum StakeActivityKind { DEPOSITED WITHDRAWN TAKER_AUTHORIZATION_UPDATED STAKE_OWNER_SELECTED LOCK_FUNDED STAKE_LOCKED STAKE_LOCK_INCREASED STAKE_LOCK_RESIZED STAKE_UNLOCKED STAKE_LOCK_RESOLVED CLAIM_CREATED CLAIM_WITHDRAWN } type Deposit { id: ID! # escrowAddress_depositId chainId: Int! @index escrowAddress: String! # Static Deposit details depositId: BigInt! depositor: String! token: String! intentGuardian: String! # Lowercase intent guardian configured when the deposit was created # Deposit details (can be updated) delegate: String! intentAmountMin: BigInt! intentAmountMax: BigInt! acceptingIntents: Boolean! status: DepositStatus! @index # Deposit amounts used for quote calculations # Notes/identities: # - balance = remainingDeposits + outstandingIntentAmount # - grossDeposited (all-time) = remainingDeposits + outstandingIntentAmount + totalAmountTaken + totalWithdrawn remainingDeposits: BigInt! # Total USDC immediately available to be taken / withdrawn outstandingIntentAmount: BigInt! # Total USDC locked in pending intents totalAmountTaken: BigInt! # Total USDC taken by intents (incl. manual release) totalWithdrawn: BigInt! # Total USDC withdrawn via DepositWithdrawn events # Per-deposit realized profit, used for APR computation realizedProfitUsdCents: BigInt! # Lifetime sum of MakerProfitSnapshot.realizedProfitUsdCents on this deposit # Lifetime gross realized APR in basis points. avgTvlUsdCents = current grossDeposited; days = (now - deposit.timestamp) / 86400, clamped to >= 1. aprBps: Int # Intent counters totalIntents: Int! signaledIntents: Int! fulfilledIntents: Int! prunedIntents: Int! # Quality signal (basis points 0–10000; new deposits start at 10000) successRateBps: Int! # Metadata blockNumber: BigInt! timestamp: BigInt! txHash: String! attributionCodes: [String!]! # Up to 5 ordered ERC-8021 codes from direct or matched account-abstraction calldata attributionSource: String @index # First code other than the ZKP2P Base builder code updatedAt: BigInt! # V2.2 delegated rate manager assignment (optional) rateManagerId: String @index rateManagerAddress: String delegatedAt: BigInt # Whitelist hook address (optional) whitelistHookAddress: String # Address of the active whitelist pre-intent hook (optional) # Reverse links for convenience in GraphQL (via @derivedFrom) intents: [Intent!]! @derivedFrom(field: "depositId") paymentMethods: [DepositPaymentMethod!]! @derivedFrom(field: "depositId") currencies: [MethodCurrency!]! @derivedFrom(field: "depositId") fundActivities: [DepositFundActivity!]! @derivedFrom(field: "depositId") dailySnapshots: [DepositDailySnapshot!]! @derivedFrom(field: "depositId") } type DepositPaymentMethod { id: ID! # escrowAddress_depositId_paymentMethodHash chainId: Int! # Corresponding Deposit details depositId: String! @index # escrowAddress_depositId (foreign key) depositIdOnContract: BigInt! # Payment method details paymentMethodHash: String! intentGatingService: String! payeeDetailsHash: String! active: Boolean! } type MethodCurrency { id: ID! # escrowAddress_depositId_paymentMethodHash_currencyCode chainId: Int! # Chain where the deposit lives # Corresponding Deposit details depositId: String! @index # Foreign key to Deposit.id (escrowAddress_depositId) depositIdOnContract: BigInt! # Raw on-chain deposit id # Payment method details paymentMethodHash: String! @index # Payment method bytes32 hash for this tuple currencyCode: String! @index # Fiat currency bytes32 hash for this tuple # Rate state minConversionRate: BigInt! # Depositor-set fixed floor only; not oracle-adjusted and not fee-adjusted managerRate: BigInt # Delegated manager quote before floor enforcement and before fee managerFee: BigInt # 1e18 manager fee rate charged separately by OrchestratorV2 on token release conversionRate: BigInt # Final gross resolved rate; contract-aligned and used for intent validation takerConversionRate: BigInt # Final taker-facing all-in rate derived from conversionRate rateSource: String # Binding source/reason for conversionRate: MANAGER | ORACLE | ESCROW_FLOOR | MANAGER_DISABLED | ORACLE_HALTED | NO_FLOOR rateManagerId: String # Delegated rate manager id when this tuple is manager-controlled # Oracle rate config and state adapter: String # Oracle adapter contract address adapterConfig: String # Encoded adapter configuration bytes feed: String # Resolved oracle feed address or feed id feedDecimals: Int # Feed decimals used to scale oracle answers spreadBps: Int # Depositor-configured spread markup in basis points maxStaleness: BigInt # Maximum accepted oracle age in seconds invert: Boolean # Whether the oracle answer must be inverted before scaling oracleRate: BigInt # Raw oracle rate before spread is applied effectiveOracleRate: BigInt # Oracle rate after spread is applied lastOracleUpdatedAt: BigInt # Timestamp of the last accepted oracle snapshot kind: String @index # Oracle kind: oracle_chainlink | oracle_pyth | oracle_unknown } type Intent { id: ID! # chainId_intentHash intentHash: String! orchestratorAddress: String! # Corresponding Deposit details depositId: String! @index # escrowAddress_depositId (foreign key) # Verifier details verifier: String! paymentMethodHash: String # Association to payment method # Recipient details owner: String! toAddress: String! # Payment details amount: BigInt! fiatCurrency: String! conversionRate: BigInt! status: IntentStatus! @index # SIGNALED | FULFILLED | PRUNED | MANUALLY_RELEASED (on-chain states only) isExpired: Boolean! # Set by off-chain reconciler when expiryTime has passed # Tx hashes and timestamps signalTxHash: String! signalTimestamp: BigInt! attributionCodes: [String!]! # Up to 5 ordered ERC-8021 codes from direct or matched account-abstraction calldata attributionSource: String @index # First code other than the ZKP2P Base builder code fulfillTxHash: String fulfillTimestamp: BigInt pruneTxHash: String pruneTimestamp: BigInt expiryTime: BigInt! @index fillLatencySeconds: Int updatedAt: BigInt! # Verified payment details (from UnifiedVerifier_V21_PaymentVerified) # These capture the "real" fiat payment details which may differ from signaled values # for partial payments or wrong currency scenarios paymentAmount: BigInt # Actual fiat amount paid (may be partial) paymentCurrency: String # Actual currency paid (may differ from fiatCurrency) paymentTimestamp: BigInt # When payment was made (from proof) paymentId: String # External payment ID (platform-specific) # Released USDC amount (from Escrow_V21_FundsUnlockedAndTransferred) # May differ from signaled `amount` for partial payments releasedAmount: BigInt # Actual USDC released (gross, before protocol fees) # Net executable amount after fees. takerAmountNetFees: BigInt # V2.2 manager fee snapshot (set via IntentManagerFeeSnapshotted) rateManagerId: String # Snapshotted delegated manager id for this intent managerFee: BigInt # Snapshotted manager fee rate in 1e18 precision managerFeeRecipient: String # Recipient that receives the manager fee on release managerFeeAmount: BigInt # Signal-time estimate: intent.amount * managerFee / 1e18 realizedManagerFeeAmount: BigInt # Release-time realized fee: releasedAmount * managerFee / 1e18 # Referral fee distribution (set via IntentReferralFeeDistributed at fulfill time) totalReferralFeeAmount: BigInt # Sum of all referral fee USDC amounts distributed at fulfill } type ReferralFeeDistribution { id: ID! # chainId_intentHash_feeRecipient chainId: Int! intentHash: String! intentId: String! @index # FK -> Intent.id (chainId_intentHash) feeRecipient: String! feeAmount: BigInt! # Actual USDC amount distributed to this recipient txHash: String! timestamp: BigInt! } # Per-(recipient, depositor) lifetime aggregate of referral fee distributions. type ReferralRecipientDepositorStats { id: ID! # chainId_feeRecipient_depositor (lowercased) chainId: Int! feeRecipient: String! @index depositor: String! # maker whose intent generated the fee totalFeeAmount: BigInt! # cumulative USDC base units (6 decimals) distributionCount: Int! lastDistributedAt: BigInt! # max block timestamp seen (unix seconds) } # Per-owner operational aggregates used by Curator (v0: stats only) type TakerStats { id: ID! # chainId_owner (owner lowercased) chainId: Int! owner: String! # Lifetime counters lifetimeSignaledCount: Int! lifetimeFulfilledCount: Int! lifetimeManualReleaseCount: Int! lifetimePruneCount: Int! totalCancelledVolume: BigInt! totalFulfilledVolume: BigInt! # Current state lastIntentAt: BigInt lastFulfilledAt: BigInt firstSeenAt: BigInt # Metadata updatedAt: BigInt! } type TakerPlatformStats { id: ID! # chainId_taker_paymentMethodHash chainId: Int! taker: String! paymentMethodHash: String! totalAmountTaken: BigInt! fulfilledIntents: Int! prunedIntents: Int! manualReleaseCount: Int! updatedAt: BigInt! } type MakerStats { id: ID! # chainId_maker (maker lowercased) chainId: Int! @index maker: String! totalAmountTaken: BigInt! grossDeposited: BigInt! totalWithdrawn: BigInt! outstandingIntentAmount: BigInt! activeDepositCount: Int! totalDepositCount: Int! fulfilledIntents: Int! prunedIntents: Int! signaledIntents: Int! totalIntents: Int! manualReleaseCount: Int! successRateBps: Int! realizedProfitUsdCents: BigInt! spreadBpsVolumeWeightedSum: BigInt! spreadWeightedVolumeUsdc: BigInt! # Lifetime gross realized APR in basis points. Approximation: avgTvlUsdCents = current grossDeposited; days = (now - firstSeenAt) / 86400, clamped to >= 1. aprBps: Int firstSeenAt: BigInt updatedAt: BigInt! } type DailyPlatformVolume { id: ID! # "{chainId}_{payeeDetailsHash}_{paymentPlatform}_{dayTimestamp}" chainId: Int! payeeDetailsHash: String! @index maker: String! @index # current owner of payeeDetailsHash at time of write paymentPlatform: String! @index dayTimestamp: BigInt! @index # UTC day start timestamp fillCount: Int! volumeUsdc: BigInt! cumulativeFillCount: Int! cumulativeVolumeUsdc: BigInt! updateSequence: BigInt! # monotonic, incremented on every update updatedAt: BigInt! } type DailyPlatformVolumeCursor { id: ID! # "{chainId}_{payeeDetailsHash}_{paymentPlatform}" chainId: Int! @index payeeDetailsHash: String! @index paymentPlatform: String! @index maker: String! @index # current owner of payeeDetailsHash at time of latest write lastDayTimestamp: BigInt! cumulativeFillCount: Int! cumulativeVolumeUsdc: BigInt! updatedAt: BigInt! } type GlobalDailyStats { id: ID! # "{chainId}_{dayTimestamp}" chainId: Int! @index dayTimestamp: BigInt! @index # UTC day start timestamp fulfilledVolumeUsdCents: BigInt! realizedPnlUsdCents: BigInt! fulfilledIntentCount: Int! vaultFulfilledVolumeUsdCents: BigInt! vaultFulfilledIntentCount: Int! activeMakersCount: Int! cumulativeFulfilledVolumeUsdCents: BigInt! cumulativeRealizedPnlUsdCents: BigInt! cumulativeFulfilledIntentCount: Int! cumulativeVaultFulfilledVolumeUsdCents: BigInt! cumulativeVaultFulfilledIntentCount: Int! updatedAt: BigInt! } type GlobalDailyCursor { id: ID! # "{chainId}" chainId: Int! @index lastDayTimestamp: BigInt! cumulativeFulfilledVolumeUsdCents: BigInt! cumulativeRealizedPnlUsdCents: BigInt! cumulativeFulfilledIntentCount: Int! cumulativeVaultFulfilledVolumeUsdCents: BigInt! cumulativeVaultFulfilledIntentCount: Int! updatedAt: BigInt! } type GlobalDailyActiveMaker { id: ID! # "{chainId}_{dayTimestamp}_{maker}" chainId: Int! @index dayTimestamp: BigInt! @index # UTC day start timestamp maker: String! @index updatedAt: BigInt! } type PlatformDailyStats { id: ID! # "{chainId}_{paymentPlatform}_{dayTimestamp}" chainId: Int! @index paymentPlatform: String! @index # active payment method name used by DailyPlatformVolume dayTimestamp: BigInt! @index # UTC day start timestamp fillCount: Int! volumeUsdc: BigInt! # USDC micros taken via fulfillments that day (same basis as DailyPlatformVolume: gross released/transferred amount) realizedPnlUsdCents: BigInt! # realized maker profit attributed to this platform that day capitalUsdCentsDays: BigInt! # time-weighted capital listed on this platform that day cumulativeFillCount: Int! cumulativeVolumeUsdc: BigInt! cumulativeRealizedPnlUsdCents: BigInt! cumulativeCapitalUsdCentsDays: BigInt! updatedAt: BigInt! } type PlatformDailyCursor { id: ID! # "{chainId}_{paymentPlatform}" chainId: Int! @index paymentPlatform: String! @index lastDayTimestamp: BigInt! cumulativeFillCount: Int! cumulativeVolumeUsdc: BigInt! cumulativeRealizedPnlUsdCents: BigInt! cumulativeCapitalUsdCentsDays: BigInt! updatedAt: BigInt! } type MakerDailySnapshot { id: ID! # "{chainId}_{maker}_{dayTimestamp}" chainId: Int! maker: String! @index dayTimestamp: BigInt! @index # UTC day start timestamp fillsToday: Int! earnedTodayUsdCents: BigInt! fulfilledVolumeUsdc: BigInt spreadBpsVolumeWeightedSum: BigInt spreadWeightedVolumeUsdc: BigInt capitalUsdCentsDay: BigInt cumulativePnlUsdCents: BigInt! cumulativeVolumeUsdc: BigInt! cumulativeFulfilledIntents: Int! cumulativeSpreadBpsVolumeWeightedSum: BigInt! cumulativeSpreadWeightedVolumeUsdc: BigInt! cumulativeCapitalUsdCentsDay: BigInt! activeDeposits: Int! averageLivePct: Float! updateSequence: BigInt! updatedAt: BigInt! } type MakerDailyCursor { id: ID! # "{chainId}_{maker}" chainId: Int! @index maker: String! @index lastDayTimestamp: BigInt! cumulativePnlUsdCents: BigInt! cumulativeVolumeUsdc: BigInt! cumulativeFulfilledIntents: Int! cumulativeSpreadBpsVolumeWeightedSum: BigInt! cumulativeSpreadWeightedVolumeUsdc: BigInt! cumulativeCapitalUsdCentsDay: BigInt! updatedAt: BigInt! } type MakerRolling90DayStats { id: ID! # "{chainId}_{maker}" chainId: Int! @index maker: String! @index windowStartDayTimestamp: BigInt! # UTC day bucket at the start of the 90-day window windowEndDayTimestamp: BigInt! @index # UTC day bucket at the end of the 90-day window totalAmountTaken: BigInt! # Fulfilled/manual-release USDC base units across the window fulfilledIntents: Int! # Fulfilled/manual-release intent count across the window isSettledToZero: Boolean @index # True once dormant maker's trailing window is provably empty nextSweepDayTimestamp: BigInt @index # UTC day when the live sweep should next revisit this row updatedAt: BigInt! } type MakerPlatformStats { id: ID! # chainId_maker_paymentMethodHash chainId: Int! maker: String! paymentMethodHash: String! totalAmountTaken: BigInt! nonManualReleaseVolume: BigInt! # Fulfilled volume excluding manual releases manualReleaseVolume: BigInt! # Fulfilled volume from manual releases fulfilledIntents: Int! prunedIntents: Int! manualReleaseCount: Int! realizedProfitUsdCents: BigInt! computedProfitSnapshots: Int! updatedAt: BigInt! } type MakerCurrencyStats { id: ID! # chainId_maker_currencyCode chainId: Int! maker: String! currencyCode: String! totalAmountTaken: BigInt! fulfilledIntents: Int! prunedIntents: Int! manualReleaseCount: Int! updatedAt: BigInt! } type PriceSnapshot { id: ID! # currencyCode_timestampHour currencyCode: String! timestampDay: BigInt! rateUsd: BigInt! ratePrecision: Int! provider: String! source: String! status: PriceSnapshotStatus! effectiveAt: BigInt! retrievedAt: BigInt! createdAt: BigInt! updatedAt: BigInt! } type MakerProfitSnapshot { id: ID! # intentId chainId: Int! maker: String! intentId: String! depositId: String! @index fiatCurrency: String! quoteConversionRate: BigInt! oracleRate: BigInt spreadBps: Int amount: BigInt! notionalFiatUsdCents: BigInt feeUsd: BigInt realizedProfitUsdCents: BigInt priceSnapshotId: String status: ProfitStatus! paymentMethodHash: String! @index paymentPlatform: String! @index createdAt: BigInt! @index updatedAt: BigInt! } type RateManager { id: ID! # chainId_rateManagerAddress_rateManagerId chainId: Int! rateManagerAddress: String! @index rateManagerId: String! @index manager: String! feeRecipient: String! maxFee: BigInt! fee: BigInt! minLiquidity: BigInt! name: String uri: String createdAt: BigInt! updatedAt: BigInt! } type RateManagerRate { id: ID! # chainId_rateManagerAddress_rateManagerId_paymentMethodHash_currencyCode chainId: Int! rateManagerAddress: String! @index rateManagerId: String! @index paymentMethodHash: String! currencyCode: String! managerRate: BigInt! updatedAt: BigInt! } type ManagerAggregateStats { id: ID! # chainId_rateManagerAddress_rateManagerId chainId: Int! @index rateManagerAddress: String! @index rateManagerId: String! @index manager: String! totalFilledVolume: BigInt! totalFeeAmount: BigInt! totalPnlUsdCents: BigInt! fulfilledIntents: Int! currentDelegatedBalance: BigInt! currentDelegatedDeposits: Int! firstSeenAt: BigInt updatedAt: BigInt! } type ManagerDailySnapshot { id: ID! # chainId_rateManagerAddress_rateManagerId_dayTimestamp chainId: Int! rateManagerAddress: String! @index rateManagerId: String! @index dayTimestamp: BigInt! @index tvl: BigInt! delegatedDeposits: Int! delegatedCapitalUsdCentsDays: BigInt! activeDepositorsCount: Int! dailyVolume: BigInt! dailyFees: BigInt! dailyPnlUsdCents: BigInt! dailyFulfilledIntents: Int! cumulativeVolume: BigInt! cumulativeFees: BigInt! cumulativePnlUsdCents: BigInt! cumulativeFulfilledIntents: Int! cumulativeDelegatedCapitalUsdCentsDays: BigInt! updatedAt: BigInt! } type ManagerDailyCursor { id: ID! # chainId_rateManagerAddress_rateManagerId chainId: Int! @index rateManagerAddress: String! @index rateManagerId: String! @index lastDayTimestamp: BigInt! lastCapitalAccruedAt: BigInt! cumulativeVolume: BigInt! cumulativeFees: BigInt! cumulativePnlUsdCents: BigInt! cumulativeFulfilledIntents: Int! cumulativeDelegatedCapitalUsdCentsDays: BigInt! updatedAt: BigInt! } type DailyCapitalSweepCursor { id: ID! # "{chainId}" chainId: Int! @index lastSweptDayTimestamp: BigInt! # latest completed UTC day start swept updatedAt: BigInt! } type DepositFundActivity { id: ID! # txHash_logIndex chainId: Int! depositId: String! @index # FK -> Deposit.id depositor: String! activityType: String! @index # DEPOSIT_RECEIVED | FUNDS_ADDED | WITHDRAWN | CLOSED amount: BigInt! blockNumber: BigInt! timestamp: BigInt! @index txHash: String! } type DepositDailySnapshot { id: ID! # depositId_dayTimestamp chainId: Int! depositId: String! @index # FK -> Deposit.id depositor: String! dayTimestamp: BigInt! @index remainingDeposits: BigInt! outstandingIntentAmount: BigInt! totalAmountTaken: BigInt! totalWithdrawn: BigInt! signaledIntents: Int! fulfilledIntents: Int! prunedIntents: Int! successRateBps: Int! dailyVolume: BigInt! # USDC taken via fulfillments that day dailyPnlUsdCents: BigInt! # Realized profit that day capitalUsdCentsDay: BigInt # Time-weighted live balance denominator for APR cumulativeVolume: BigInt! cumulativePnlUsdCents: BigInt! cumulativeCapitalUsdCentsDay: BigInt! updatedAt: BigInt! } type DepositDailyCursor { id: ID! # depositId chainId: Int! @index depositId: String! @index depositor: String! @index lastDayTimestamp: BigInt! lastCapitalAccruedAt: BigInt! cumulativeVolume: BigInt! cumulativePnlUsdCents: BigInt! cumulativeCapitalUsdCentsDay: BigInt! updatedAt: BigInt! } type ManagerStats { id: ID! # chainId_rateManagerAddress_rateManagerId_depositId chainId: Int! rateManagerAddress: String! @index rateManagerId: String! @index depositId: String! @index depositor: String! currentDelegatedBalance: BigInt! totalAmountTaken: BigInt! totalWithdrawn: BigInt! fulfilledIntents: Int! prunedIntents: Int! successRateBps: Int! updatedAt: BigInt! } """ Current immediately available token liquidity for one fiat currency across all active deposits on a chain. Amounts use the deposited token's native units (USDC has 6 decimals). """ type CurrencyLiquidity { id: ID! # chainId_currencyCode chainId: Int! @index currencyCode: String! @index availableTokenAmount: BigInt! updatedAt: BigInt! } """ Deduplicated per-deposit contribution used to maintain CurrencyLiquidity. Multiple active payment methods for the same deposit/currency count once. """ type DepositCurrencyLiquidity { id: ID! # depositId_currencyCode chainId: Int! @index depositId: String! @index currencyCode: String! @index availableTokenAmount: BigInt! updatedAt: BigInt! } """ Current immediately available liquidity for one deposited token across all active deposits on a chain. Amounts use the token's native units. """ type TokenLiquidity { id: ID! # chainId_token chainId: Int! @index token: String! @index availableTokenAmount: BigInt! updatedAt: BigInt! } """ Deduplicated per-deposit contribution used to maintain TokenLiquidity. A deposit contributes once when it has at least one active quote. """ type DepositTokenLiquidity { id: ID! # depositId chainId: Int! @index depositId: String! @index token: String! @index availableTokenAmount: BigInt! updatedAt: BigInt! } """ Current immediately available token liquidity for one fiat currency and payment-platform pair across all active deposits on a chain. """ type CurrencyPlatformLiquidity { id: ID! # chainId_currencyCode_paymentMethodHash chainId: Int! @index currencyCode: String! @index paymentMethodHash: String! @index availableTokenAmount: BigInt! updatedAt: BigInt! } """ Deduplicated per-deposit contribution used to maintain CurrencyPlatformLiquidity. """ type DepositCurrencyPlatformLiquidity { id: ID! # depositId_currencyCode_paymentMethodHash chainId: Int! @index depositId: String! @index currencyCode: String! @index paymentMethodHash: String! @index availableTokenAmount: BigInt! updatedAt: BigInt! } """ Denormalized view that joins Deposit, MethodCurrency, and DepositPaymentMethod for rate-first quoting. """ type QuoteCandidate { id: ID! # escrowAddress_depositId_paymentMethodHash_currencyCode chainId: Int! # Chain where the quoteable deposit lives depositIdOnContract: BigInt! # Raw on-chain deposit id depositId: String! @index # Foreign key to Deposit.id escrowAddress: String! # Escrow address holding the deposit depositor: String! @index # Maker address that owns the deposit token: String! # ERC20 token address being sold paymentMethodHash: String! # Payment method bytes32 hash currencyCode: String! # Fiat currency bytes32 hash conversionRate: BigInt # Final gross resolved rate copied from MethodCurrency oracleRate: BigInt # Raw oracle rate before spread, copied from MethodCurrency takerConversionRate: BigInt # Final taker-facing all-in rate copied from MethodCurrency managerFee: BigInt # 1e18 manager fee rate applied separately at fulfillment rateManagerId: String # Delegated rate manager id, copied from MethodCurrency availableTokenAmount: BigInt! # Maker liquidity currently available for new intents maxTokenAvailablePerIntent: BigInt! # min(availableTokenAmount, intentAmountMax) for nearby token quote ordering maxFiatAvailablePerIntent: BigInt! # maxTokenAvailablePerIntent converted using takerConversionRate maxQuoteableFiat: BigInt! # availableTokenAmount converted using takerConversionRate intentAmountMin: BigInt! # Minimum token amount the maker will accept per intent intentAmountMax: BigInt! # Maximum token amount the maker will accept per intent successRateBps: Int! # Maker success rate for deposit-level filtering payeeDetailsHash: String! # Hashed payee details required for verification intentGatingService: String # Optional gating service that must authorize takers intentGuardian: String! @index # Lowercase guardian inherited from the deposit whitelistHookAddress: String # OrchestratorV2 per-deposit whitelist hook; null under OrchestratorV3 whitelistEnabled: Boolean! # OrchestratorV3 deposit/payment-method policy gate; false means fail-open disputeProtectionOptedOut: Boolean! # Depositor explicitly opted this deposit/payment-method tuple out of default-on dispute protection on the active policy disputeProtectionRequiresStake: Boolean! # Active policy routes non-whitelisted takers through stake-backed admission (not opted out and nonzero risk window) allowedGroupIds: [String!]! # OrchestratorV3 deposit/payment-method policy group ids isActive: Boolean! # Whether this tuple is currently quoteable for takers hasMinLiquidity: Boolean! # Whether availableTokenAmount is at least intentAmountMin minFiatSupported: BigInt! # intentAmountMin converted using takerConversionRate maxFiatSupported: BigInt! # intentAmountMax converted using takerConversionRate maxFiatAvail: BigInt! # availableTokenAmount converted using takerConversionRate updatedAt: BigInt! # Last time the denormalized row was refreshed } """ Frontend-oriented orderbook projection derived from QuoteCandidate. Keeps one row per deposit/payment-platform/currency tuple and exposes the fields the curator/frontend need for sorting and filtering. """ type OrderbookEntry { id: ID! # deposit/payment-platform/currency tuple identity chainId: Int! @index depositIdOnContract: BigInt! depositId: String! @index escrowAddress: String! @index depositor: String! @index token: String! @index paymentMethodHash: String! @index paymentPlatform: String! @index currencyCode: String! @index currency: String! @index price: BigInt! # Taker-facing all-in conversion rate oracleRate: BigInt # Raw oracle rate before spread, copied from QuoteCandidate conversionRate: BigInt # Final gross resolved rate copied from QuoteCandidate rateManagerId: String # Delegated rate manager id, copied from QuoteCandidate availableTokenAmount: BigInt! availableFiatAmount: BigInt! intentAmountMin: BigInt! intentAmountMax: BigInt! minFiatSupported: BigInt! maxFiatSupported: BigInt! hasMinLiquidity: Boolean! successRateBps: Int! payeeDetailsHash: String! @index intentGatingService: String! # Non-null admission gate; zero address is ungated; lowercase-normalized for exact equality whitelistHookAddress: String # OrchestratorV2 per-deposit whitelist hook; null under OrchestratorV3 whitelistEnabled: Boolean! # OrchestratorV3 deposit/payment-method policy gate; false means fail-open disputeProtectionOptedOut: Boolean! # Depositor explicitly opted this deposit/payment-method tuple out of default-on dispute protection on the active policy disputeProtectionRequiresStake: Boolean! # Active policy routes non-whitelisted takers through stake-backed admission (not opted out and nonzero risk window) allowedGroupIds: [String!]! # OrchestratorV3 deposit/payment-method policy group ids isActive: Boolean! updatedAt: BigInt! } """ Per-deposit taker whitelist entry. Created when a taker is whitelisted for a specific deposit via a WhitelistPreIntentHook contract. Deleted when the taker is removed or the hook is rotated. """ type WhitelistEntry { id: ID! # escrowAddress_depositId_taker chainId: Int! hookAddress: String! escrowAddress: String! @index depositId: String! @index depositIdOnContract: BigInt! taker: String! @index createdAt: BigInt! updatedAt: BigInt! } """ Curator-managed address group in an AddressGroupRegistry. Groups are only unique per (chainId, registryAddress, groupId); attaching a group to a deposit delegates admission policy to the group's curator and optional resolver contract. """ type AddressGroup { id: ID! # chainId_registryAddress_groupId chainId: Int! registryAddress: String! @index groupId: String! name: String! # Human-readable label from GroupCreated (event-only, not stored on-chain) curator: String! @index # Curator responsible for group admission policy pendingCurator: String # Nonzero pending curator during a 2-step transfer resolver: String # Optional external membership resolver contract; null = curated members only isPublic: Boolean! memberCount: Int! # Count of curated membership rows (resolver-side members excluded) createdAt: BigInt! updatedAt: BigInt! } """ Curated membership row for an AddressGroup. Deleted when the member is removed; resolver-based (external contract) membership is not representable on-chain as events and is therefore not indexed. """ type AddressGroupMember { id: ID! # chainId_registryAddress_groupId_member chainId: Int! registryAddress: String! groupId: String! groupEntityId: String! @index # Foreign key to AddressGroup.id member: String! @index createdAt: BigInt! updatedAt: BigInt! } """ Per-deposit-and-payment-method admission policy in a WhitelistPolicy contract. Directly whitelisted addresses remain deposit-wide and are represented independently; this row tracks tuple-specific enforcement and allowed AddressGroupRegistry groups. """ type DepositWhitelistPolicy { id: ID! # chainId_policyAddress_escrowAddress_depositIdOnContract_paymentMethodHash chainId: Int! policyAddress: String! @index escrowAddress: String! depositId: String! @index # Foreign key to Deposit.id (escrowAddress_depositIdOnContract) depositIdOnContract: BigInt! paymentMethodHash: String! @index enabled: Boolean! allowedGroupCount: Int! # Count of DepositAllowedGroup rows whitelistedAddressCount: Int! # Deposit-wide direct-address count repeated on each method policy createdAt: BigInt! updatedAt: BigInt! } """ Directly whitelisted taker for one deposit policy. Deleted when the taker is removed; duplicate add events only refresh the row timestamp. """ type DepositWhitelistedAddress { id: ID! # chainId_policyAddress_escrowAddress_depositIdOnContract_taker chainId: Int! policyAddress: String! escrowAddress: String! depositId: String! @index # Foreign key to Deposit.id depositIdOnContract: BigInt! taker: String! @index createdAt: BigInt! updatedAt: BigInt! } """ AddressGroupRegistry group allowed by one deposit/payment-method policy. Deleted when the group is removed; groupId is the bytes32 registry group identifier. """ type DepositAllowedGroup { id: ID! # chainId_policyAddress_escrowAddress_depositIdOnContract_paymentMethodHash_groupId chainId: Int! policyAddress: String! escrowAddress: String! depositId: String! @index # Foreign key to Deposit.id depositIdOnContract: BigInt! paymentMethodHash: String! @index policyEntityId: String! @index # Foreign key to DepositWhitelistPolicy.id groupId: String! @index # bytes32 AddressGroupRegistry group id createdAt: BigInt! updatedAt: BigInt! } """ Current lifecycle hook configured for one OrchestratorV3 deployment. """ type OrchestratorLifecycleHook { id: ID! # chainId_orchestratorAddress chainId: Int! @index orchestratorAddress: String! @index lifecycleHook: String # null when cleared / zero address updatedAt: BigInt! } """Current dispute-admission governance state for one DisputeProtectionPolicy deployment.""" type DisputeProtectionPolicyState { id: ID! # chainId_policyAddress chainId: Int! @index policyAddress: String! @index admissionsPaused: Boolean! authorizedLifecycleHooks: [String!]! updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """Current Orchestrator membership in one OrchestratorRegistry deployment.""" type OrchestratorRegistrationState { id: ID! # chainId_registryAddress_orchestratorAddress chainId: Int! @index registryAddress: String! @index orchestratorAddress: String! @index registered: Boolean! updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """ Group attached to a deposit on a WhitelistPreIntentHookV2. Faithful mirror of hook storage: rows persist across whitelist-hook rotation on the deposit (hook config is point-in-time admission policy that resumes if the hook is reattached). Consumers derive the effective policy by joining Deposit.whitelistHookAddress == hookAddress. """ type DepositGroupAttachment { id: ID! # chainId_hookAddress_escrowAddress_depositIdOnContract_groupId chainId: Int! hookAddress: String! @index escrowAddress: String! depositId: String! @index # Foreign key to Deposit.id (escrowAddress_depositId) depositIdOnContract: BigInt! groupId: BigInt! createdAt: BigInt! updatedAt: BigInt! } """Effective and explicitly selected stake ownership for one taker.""" type TakerStakeState { id: ID! # chainId_vaultAddress_taker chainId: Int! @index vaultAddress: String! @index taker: String! @index stakeOwner: String! @index # Effective owner: selectedStakeOwner when valid, otherwise taker selectedStakeOwner: String @index selectionAuthorized: Boolean! updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """Authoritative stake principal, locked principal, and immediately available principal for one owner.""" type StakeAccountState { id: ID! # chainId_vaultAddress_stakeOwner chainId: Int! @index vaultAddress: String! @index stakeOwner: String! @index totalStake: BigInt! lockedStake: BigInt! freeStake: BigInt! updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """Current immediately withdrawable non-stake balance for one beneficiary.""" type ClaimAccountState { id: ID! # chainId_vaultAddress_beneficiary chainId: Int! @index vaultAddress: String! @index beneficiary: String! @index claimableAmount: BigInt! updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """One owner's authorization for one taker. Multiple owners may authorize the same taker.""" type TakerStakeAuthorization { id: ID! # chainId_vaultAddress_stakeOwner_taker chainId: Int! @index vaultAddress: String! @index taker: String! @index stakeOwner: String! @index authorized: Boolean! @index updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """Current lifecycle and accounting for one generic StakeVault lock.""" type StakeLock { id: ID! # chainId_vaultAddress_lockId chainId: Int! @index vaultAddress: String! @index lockId: String! @index stakeOwner: String! @index initialAmount: BigInt! currentAmount: BigInt! maturesAt: BigInt! @index status: StakeLockStatus! @index unlockedAmount: BigInt! claimedAmount: BigInt! createdAt: BigInt! updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """Append-only normalized stake, ownership, lock, and claim activity.""" type StakeActivity { id: ID! # chainId_blockNumber_logIndex chainId: Int! @index vaultAddress: String! @index stakeOwner: String @index taker: String @index beneficiary: String @index kind: StakeActivityKind! @index lockId: String @index counterparty: String amount: BigInt! previousAmount: BigInt stakeBalanceAfter: BigInt lockedStakeAfter: BigInt freeStakeAfter: BigInt claimableAfter: BigInt maturesAt: BigInt blockNumber: BigInt! @index logIndex: BigInt! @index timestamp: BigInt! } """Canonical one-to-one payment-nullifier binding emitted by NullifierRegistryV2.""" type PaymentIntentBinding { id: ID! # chainId_registryAddress_nullifier chainId: Int! @index registryAddress: String! @index nullifier: String! @index intentHash: String! @index writer: String! @index transactionHash: String! @index logIndex: BigInt! blockNumber: BigInt! blockTimestamp: BigInt! } """Current Escrow base intent period used before paid extensions begin.""" type EscrowIntentPeriodState { id: ID! # chainId_escrowAddress chainId: Int! @index escrowAddress: String! @index intentExpirationPeriod: BigInt! observedFrom: EscrowIntentPeriodSource! updatedAt: BigInt! } type StakeVaultConfig { id: ID! # chainId_vaultAddress chainId: Int! @index vaultAddress: String! @index controller: String pendingController: String pendingControllerValidAt: BigInt updatedAtBlockNumber: BigInt! updatedAt: BigInt! } """Current stake-backed dispute protection lifecycle for one intent.""" type DisputeProtectionIntent { id: ID! # chainId_intentHash chainId: Int! @index policyAddress: String! @index intentHash: String! @index status: DisputeProtectionIntentStatus! @index stakeOwner: String! @index depositor: String! @index taker: String! @index paymentMethod: String! @index amount: BigInt! # Full on-chain intent amount initially locked as collateral riskWindow: BigInt! releaseEligibleAt: BigInt @index releaseAmount: BigInt isManualRelease: Boolean compensatedAmount: BigInt disputeId: String openedAt: BigInt! openedTxHash: String! cancelledAt: BigInt cancelledTxHash: String settledAt: BigInt settledTxHash: String releasedAt: BigInt releasedTxHash: String disputedAt: BigInt disputedTxHash: String disputedAtBlockNumber: BigInt @index disputedAtLogIndex: BigInt @index updatedAt: BigInt! } """Dispute protection admission setting for one policy, escrow deposit, and payment method.""" type DepositDisputeProtectionConfig { id: ID! # chainId_policyAddress_escrowAddress_depositIdOnContract_paymentMethodHash chainId: Int! @index policyAddress: String! @index escrowAddress: String! @index depositId: String! @index # Foreign key to Deposit.id depositIdOnContract: BigInt! paymentMethodHash: String! @index enabled: Boolean! @index # Raw value from DisputeProtectionEnabledUpdated: false records opt-out, true undoes it; absence is default-on for windowed methods updatedAt: BigInt! } """Minimum post-settlement collateral hold configured for one payment method.""" type DisputeProtectionRiskWindow { id: ID! # chainId_policyAddress_paymentMethod chainId: Int! @index policyAddress: String! @index paymentMethod: String! @index riskWindow: BigInt! updatedAt: BigInt! } type IntentLifecycleHookState { id: ID! # chainId_intentHash chainId: Int! @index intentHash: String! @index orchestratorAddress: String! @index lifecycleHook: String updatedAt: BigInt! }