Skip to content

[FEATURE] USDC Swap Chain #173

@ezeike

Description

@ezeike

Describe the feature you'd like

Implement a consensus-driven oracle on the USDC Chain to efficiently integrate off-chain data from the Ethereum blockchain, focusing on the synchronization of lock and close orders through a robust state machine.

Motivation

The integration of off-chain data via an oracle enables real-time functionality and reliability in handling transactions on the USDC Chain. This ensures that the system accurately reflects finalized Ethereum blocks and maintains integrity in order processing.

Additional context

The USDC Chain must operate with the understanding that Ethereum does not provide immediate block finality. The use of a committee for consensus, combined with an efficient WebSocket notifier, is critical for managing order flows and ensuring that both lock and close orders are appropriately processed in line with finalized Ethereum block updates.

Possible implementation

  1. Modify sock.go to enable effective communication with the Ethereum blockchain for new block arrivals.
  2. Implement a WebSocket notifier in the RPC or controller package that listens for incoming Ethereum block data.
  3. Develop lib.EthereumChainInfo to facilitate data processing from the Ethereum chain.
  4. Adapt swap.go/ProcessRootChainOrderBook to ensure proper parsing and handling of incoming lock and close orders.
  5. Establish the Consensus Rule (CR) based on the received orders and update the Root Chain Order Book accordingly.
  6. Create a reset mechanism that triggers when close orders are not detected within a predefined timeframe post-block parsing.

Required Tags

  • Priority: High
  • Module: Multi-Module

Metadata

Metadata

Assignees

Labels

High PriorityHighest priority issueNestedIssue is regarding a nested chainX-Large Shirt8 weeks worth of work

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions