TECHNICAL SPEC v1.0.2

System Architecture

The Morpheus protocol is designed as an asynchronous, high-integrity bridge between deterministic blockchain environments and the non-deterministic Web2 world. It utilizes a three-plane architecture to ensure that sensitive data remains confidential while results are cryptographically verifiable.

LOGICAL DATA FLOW
Neo N3/X Contracts
Async Relayer
Phala TEE Worker

The Three Core Planes

1. On-Chain Control Plane

The entrance and exit points of the protocol. MorpheusOracle contracts on Neo handle request queuing, prepaid fee accounting, and final callback execution.

  • N3 Implementation: C# contracts with native Oracle service integration.
  • Neo X Implementation: Solidity reference interfaces and contracts prepared for publication.

2. Asynchronous Relayer Plane

A robust middleware layer responsible for event monitoring and transaction management. It ensures that every request is accounted for and that TEE-signed results are successfully delivered back to the source chain.

Blind Relaying: The relayer only transports ciphertext payloads, metadata, and signed result envelopes. It never needs the decrypted request contents.

3. Phala TEE Runtime Plane

The "Brain" of the protocol. Running inside Phala's attested TEE runtime, this environment provides:

  • Confidentiality: Decryption happens strictly in hardware-protected memory.
  • Isolation: User scripts and WASM modules are time-bounded and sandboxed.
  • Attestation: Every response is cryptographically bound to the hardware instance.

Security & Verification Model

Morpheus operates on a Trust-but-Verify model. Contracts verify the relayed fulfillment signature, while applications can additionally inspect TEE attestation metadata for stronger assurance.

1. Fast Verification (On-Chain)

Contracts verify the fulfillment against the Oracle verification key configured in the registry contract.

2. High Assurance (Off-Chain)

DApps can inspect app_id, compose_hash, instance_id, and report_data through the attestation verifier.

Developer Note

To reduce unnecessary chain writes, Morpheus batches qualifying pricefeed updates into a single Neo N3 transaction whenever multiple pairs exceed the 0.1% threshold in the same 15-second scan.

Previous IntroductionNextQuickstart
REVISION 1.0.2LAST UPDATED: 2026-03-11