Space and Time 백서

Space and Time

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 1쪽

Space and Time (SXT Chain) The blockchain for ZK-proven data. Scott Dykstra Jay White, PhD Catherine Daly Ian Joiner, PhD May 2025 v2.0 whitepaper Abstract Smart contracts lack native data processing capabilities, and securely connecting external data is cumbersome. Space and Time (SXT Chain) addresses these challenges by introducing Proof of SQL , a breakthrough zero-knowledge (ZK) circuit that provides verifiable SQL queries against tamperproof tables. Delivered as a decentralized database loaded with ready-to-go indexed blockchain data compatible with Proof of SQL, SXT Chain is ushering in a new era of data-rich smart contracts. By storing only cryptographic commitments onchain, SXT Chain secures an unlimited number of tables/ledgers without bloating the blockchain. Developers gain the ability to run ZK-verified queries on massive datasets from major blockchains or user-provided offchain data, all while supplementing the limited compute power of smart contracts. This powerful combination propels the creation of sophisticated, cross-chain dapps—ultimately fulfilling the blockchain vision of a permissionless, trustless, and data-rich digital economy. 1 Table of Contents Abstract 1 Table of Contents 2 1 The Problem: Untapped Potential of Web3 4 1.1 Smart Contracts Can’t Access Critical Data 4 1.2 Current ZK Solutions and Their Limitations 5 1.3 The Need for an “Onchain Database” 5 2 The Solution: SXT Chain with Proof of SQL 6 2.1 Coprocessing Unlocked for Smart Contracts 6 2.2 Query Examples for ZK-proven Onchain Data 6 2.3 Design Goals 8 2.4 Components of the Network 9 2.4.1 Indexer Nodes 9 2.4.2 Prover Nodes 10 2.4.3 SXT Chain Validators 10 2.4.4 Target Chain and Offchain Components 11 2.5 Ingestion Layer with Verifiable Indexing 12 2.6 Decentralized Database Design 12 2.7 Infinite Tables with Onchain Verification 13 3 Design of the Proof of SQL Protocol 15 3.1 Overall Architecture 15 3.1.1 Data Ingestion 15 3.1.2 Query Request 17 3.1.3 Proof Protocol Overview 17 3.2 Parsing 18 3.3 Query Executor and Interactive Protocol Builder 18 3.3.1 Query Execution / Witness Generation 19 3.3.2 Commitment Computation / Multiple Rounds 21 3.3.3 Constraint Building 21 3.4 Notation 21 3.5 Example Subprotocols 22 3.5.1 Equality Protocol Builder 22 3.5.2 Group By Protocol Builder 23 3.6 Relation Proof Protocol (Sum-check) 24 3.7 Commitment Evaluator 25 4 Use Cases for the Next-Generation of Web3 27 2 4.1 Building a Flexible ZK-Rollup/L2 27 4.2 Secure Bridges and Multichain Data Backends 27 4.3 Dapp Backend (Decentralized) 27 4.4 Data-Driven Lending 27 4.5 Cross-Chain Financial Instruments 28 4.6 Gaming Rewards 28 4.7 Social Apps 28 4.8 Settlement Systems and Third-Party Auditing 29 4.9 Real World Assets (RWAs) 29 4.10 Transaction Security and Wallet Whitelists 30 4.11 Liquidity Pool Rebalancing Based on Market Conditions 30 5 Economic Model for SXT Chain 30 5.1 SXT Token Utility 32 5.2 Security Budget Vault 32 5.3 Table Owner Rewards Vault 33 5.4 Network Fee Structure and Data Marketplace 34 6 Conclusion 34 Appendix 35 A Data that Smart Contracts Can Access without Space and Time 35 B HTAP to Replace Point Solutions 36 C Proof of SQL “Bring Your Own Database” 37 D Leveraging an Append-Only Database as a Tamperproof Offchain Ledger 39 E Space and Time in the Market 40 E.1 Web3’s evolution as a digital economy powering novel apps 40 E.2 Proven value in data warehousing 41 E.3 New compute paradigm removes trust requirements 41 References 43 3 1 The Problem: Untapped Potential of Web3 1.1 Smart Contracts Can’t Access Critical Data Smart contracts underpin major decentralized finance (DeFi) protocols like Uniswap, Aave, Compound, and Synthetix, each securing billions on the Ethereum Virtual Machine (EVM). While these protocols provide trustless, permissionless asset management, they lack data-driven sophistication—Aave, for instance, can’t differentiate a new borrower from one with established onchain history. In traditional finance (TradFi), options derivatives exceed their underlying assets’ capital, with over 40 million contracts traded daily. Yet these options are largely missing onchain because trustless deployment requires external data processing, which standard smart contracts cannot perform. By contrast, onchain perpetual futures see an annual volume of $39 trillion, thanks to simpler logic that relies only on token price feeds. Smart contracts can only access wallet balances, current transaction data, basic blockchain metadata, and their own internal state. They cannot directly query the historical data stored by blockchain nodes. Using archive nodes, an external offchain client can only access simple datapoints such as: ● The state of the entire blockchain at any given time in history (e.g. who is the first owner of the “Cryptopunk #1” NFT). ● The transactions—and events emitted as a result of transactions—at any given time in history (e.g. John’s wallet swapped 1000 USDC to 0.5ETH on 4/18/2023). Offchain indexing solutions can parse this history but introduce trust assumptions; such solutions are typically centralized and unverified. Decentralized oracle networks bridged this gap by providing the infrastructure to aggregate, validate, and deliver offchain data to blockchains, but require connectivity to external systems to handle complex datasets, SQL execution, rich onchain history, etc. As multichain protocols spread, many rely on a “hub” contract on Ethereum linked to “spoke” contracts on other chains. Monitoring spoke activity in a trustless way remains difficult. Similarly, Web3 games struggle to reward in-game actions or onchain NFT milestones because the underlying data isn’t directly accessible to the smart contract. Some teams resort to centralized services, undermining the trustless ethos of Web3 and highlighting an urgent need for trustless data processing. 4 1.2 Current ZK Solutions and Their Limitations ZK proofs have been heralded as the panacea for trustless data access, offering client verification by allowing data to be confirmed without revealing its contents to the client. By offloading computation offchain and verifying the results onchain, ZK proofs can bolster the limited data access and compute power of smart contracts. They eliminate the need for cumbersome offchain consensus by letting a single node act as a coprocessor to an L1/L2 chain. However, current ZK solutions are still maturing and face several key challenges. First, ZK proofs lack scalability when handling large-scale data. Proof generation often takes minutes, making ZK proofs impractical for complex queries against, for example, multi-year transaction histories. Second, the ecosystem is highly fragmented, with some projects aimed at privacy, others at scaling, and still others at specific use cases like rollups. Tying these disparate solutions together is time-consuming, costly, and prone to error. Third, the developer experience remains unfamiliar and demanding, often requiring new languages (e.g., Cairo) and specialized hardware deployments (e.g., zkEVM rollups). Finally, existing ZK solutions do not address the missing query layer in Web3, leaving decentralized applications without a truly trustless way to process and analyze large datasets. 1.3 The Need for an “Onchain Database” In traditional SaaS applications, business logic follows a straightforward cycle of querying data, executing actions based on the query results, and updating system state. This pattern is evident across industries: lenders check a borrower’s creditworthiness, decide terms, and update loan states; e-commerce platforms query product availability, manage purchases, and adjust inventories; travel services query accommodations and flights before finalizing bookings; and social networks query a user’s connections to display and rank content. However, in Web3, while blockchains and smart contracts provide state management and basic logic, they lack a dedicated query layer which limits data processing and onchain computation for more advanced decentralized applications. Space and Time addresses this gap by serving as a “query coprocessor,” delivering robust offchain data processing alongside major blockchains. Over the past 15 years, tech conglomerates have accumulated and monetized user data within proprietary cloud warehouses. This centralized control conflicts with the Web3 vision of a decentralized internet, where individuals manage their own information, maintain privacy via wallet-based identities, and participate in transparent governance. A community-operated database model can help reclaim data sovereignty, as end users collectively determine how data is accessed, used, and monetized. Through wallet-based public key infrastructure (PKI), individuals can sign off on how their interactions are recorded, shared, or deleted. 5 Yet, existing blockchains primarily function as single-ledger databases with no native query engine, resulting in state bloat and limited data capabilities. Achieving the data flexibility required by modern decentralized apps calls for a more expansive approach—one that supports near-infinite tables/ledgers, each dedicated to a specific crypto app domain, while preserving the trustless security model of blockchains. 2 The Solution: SXT Chain with Proof of SQL 2.1 Coprocessing Unlocked for Smart Contracts SXT Chain addresses the need for a query coprocessor for smart contracts by providing a tamperproof, community-operated decentralized database that indexes and verifies data from major blockchains or user-owned tables using ZK proofs. Community-operated validators store threshold-signed cryptographic commitments (one per table) instead of raw data. Validators and archive nodes locally pin raw data or act as comprehensive repositories to ensure redundancy and availability. Indexed data from major blockchains (e.g., Ethereum, Bitcoin, ZKsync, Sui, Avalanche, Base) is validated and summarized into onchain cryptographic commitments (e.g., KZG, Nova, Dory), which act as tamperproof digital fingerprints of the underlying tables. When data insertions are submitted via DDL/DML transactions, the network updates the affected table's cryptographic commitment to reflect its new state. Proof of SQL is a groundbreaking ZK proof protocol that ensures the accuracy of SQL query results and the integrity of underlying data tables stored on SXT Chain using cryptographic commitments specifically to ensure underlying data tables are tamperproof as part of the mechanism (described in a later section of this paper). The network's Prover nodes, running the Proof of SQL protocol, handle both query processing and proof generation. The protocol targets online latencies while proving computations over entire chain histories an order of magnitude faster than state-of-the art zkVMs and coprocessors. SQL proving times are currently benchmarked at under a second for analytic queries on million-row tables using a single NVIDIA GPU. 2.2 Query Examples for ZK-proven Onchain Data Ultimately, Space and Time allows smart contracts to “ask ZK-proven questions” regarding activity on their own chain, other chains, or offchain. For example, a smart contract can request the SQL equivalent of: 6 ● Loans paid off: “Show me the volume of loans already paid off by this wallet attempting a borrow transaction” (in order to offer a discounted loan rate to a loyal borrower who has paid off loans onchain already). ● Liquidity Pools TVL: “Show me all liquidity pools with a TVL greater than $1M that were deployed at least one month ago.” ● Liquidity Pools Collateral: “Sum up the total collateral available right now in all liquidity pools our protocol operates across the following four chains…” ● DEX Loyalty Program: “Given that wallet ‘xyz’ is currently attempting a trade, show me the number of prior trades this wallet has already made with DEX liquidity pool address ‘xyz’” (in order for the DEX contract can apply a discount or reward to the current trade). ● LP position management (active/dynamic): “Alert me when the delta between the average price of the LINK and ETH has deviated more than 10%” (for Uniswap v4 LP rebalancing via hooks). ● Avg. Lending Rates Onchain: “Show me the volume-weighted average lending rate for USDC on Aave, Maker, and Compound right now.” ● Wallets with Token Balance Criteria: “Show me all wallets that have a balance > $1000 of LINK tokens and have interacted with at least one Chainlink smart contract.” ● Bridge Transactions: “Show me all transactions across ‘xyz’ bridges that moved at least $1M of tokens per wallet from Chain A to Chain B.” ● Gamer Achievements: “Show me all gamer wallets that have at least 2 hours of playtime in-game, have minted our NFT, and played with ‘xyz’ weapon.” ● CeFi Options Markets: “Give me the at-the-money implied volatility of Bitcoin call options expiring end-of-year averaged (volume-weighted) across Deribit and Binance.” ● Gas Oracles: “Show me the average gas used across all transactions on ‘xyz’ bridge over the last hour.” ● Token Price Oracles: “Show me the volume-weighted average price of LINK and wrapped LINK tokens traded across the hundreds of liquidity pools that swap LINK: Uniswap, PancakeSwap, Sushiswap, Trader Joe, Quickswap, etc.” ● Trustless ETFs/Indexes: “Create a volume-weighted index of the following 10 tokens calculated from price oracle SQL calculations and deliver it to my contract as a single price index.” ● Airdrop Criteria: “Roll up the wallet transaction histories of all wallets that meet the following criteria for my airdrop…” ● Governance Engagement Score: “Roll up engagement scores for wallet activity that meets the following criteria… where volume transacted in ‘xyz’ token, onchain governance voting participation, and past NFT ownership will contribute to rewards/discounts associated with a wallet engagement score.” 7 ● Governance Qualification: “Find all wallets that have participated in governance votes and rank them with a cross-section of the amount of ‘xyz’ token held and how long it’s been held.” ● Weather (Onchain Insurance Payouts): “Show me the average wind speeds across all reported weather stations in Miami, Florida today.” ● Github Activity (Open Source Contributions): “Rank developer wallets by their total code contributions through ingested GitHub activity data.” ● Oracle Activity: “Show me total volume of oracle requests over the last hour that did not complete the request within two blocks.” ● Pricing Blockspace: “Determine blockspace ‘market rates’ by averaging transaction gas fees along with block header metadata.” ● NFT Floor Prices: “Look at NFT trading information onchain and find the current average floor price for collection ‘xyz.’” ● Perp Funding Rates: “Calculate the implied volatility of both ETH and BTC using onchain perpetual futures funding rates as a leading indicator.” ● Ethereum Staking Yields: “Show me the risk-minimized average returns on Ethereum liquid staking via Lido over the past hour.” 2.3 Design Goals The Space and Time solution was designed with the following goals around data processing: 1. End-to-End Trustless : Leverage a ZK approach for proving rather than building yet another consensus-based, ‘trust-minimized’ approach with 12 to 30 nodes. This removes reliance on a manually configured set of permissioned nodes while offering improved scalability. 2. Verifiable Onchain: Ensure ZK proofs generated offchain are verifiable within the computational capabilities of the EVM, rather than only verifying offchain using a third-party service such as an oracle or relayer. Thus, a smart contract on any major chain (consensus-based or ZK-rollup chains) can verify the proof and relay the verified query result to a client contract which made the request. 3. Familiar, Easy Developer Experience : Provide a UX common in Web2 (SQL) so developers don’t have to learn any extensive new frameworks or languages. 4. Support for Arbitrary Computations : Facilitate common data processing jobs that require aggregations, sorts, filters, arithmetic, joins, etc., as well as Turing-complete arbitrary computations using SQL. 5. Low-Latency at 100 Gigabyte-Scale : Deliver verified query results back to a client smart contract within seconds—not minutes—using a more scalable approach than 8 redundant computations proven with consensus. Must support queries over the entire chain state (often multiple terabytes of data per chain since genesis, broken up into sub-tables that often exceed 100 gigabytes each). 6. Comprehensive Chain Data Coverage : Persist entire copies of each major chain (including all events, transactions, blocks, logs, balances, token price changes, etc.) to facilitate cross-chain queries against current and historical activity. Given the limitations of arbitrary ZK proof circuits and the potential strengths of a circuit constructed around a SQL parser, we considered the following: 1. Optimized Circuit Design: We narrowed our initial focus to only SQL operations in order to create highly optimized ZK circuits tailored for data processing. This level of specificity allows for streamlined verification and reduced computational overhead. 2. Broad Applicability: SQL is ubiquitous—a widely understood and universally accepted language for data operations that operates at the heart of both complex financial systems and basic web applicat
프로젝트로 돌아가기