DevelopersSystem ArchitectureOverview

System Architecture

Tangle is the current protocol (EVM-based; legacy: Tangle Substrate) for instantiating and operating services (“blueprints”) secured by restaked capital. The system is intentionally split into:

  • On-chain contracts (service lifecycle, payments, restaking, incentives, slashing)
  • Off-chain runtime (operators running blueprint managers/runners that react to events and submit results)

Roles and How They Engage

  • Blueprint developers publish blueprint definitions and optionally run a service manager contract.
  • Operators register for blueprints, run the off-chain runtime, and submit results + heartbeats.
  • Restakers / delegators delegate assets to operators and (optionally) constrain delegation to specific blueprints.
  • Customers create services (by request/approve or by signed quotes) and submit jobs.

End-to-End Flow (High Level)

  1. Developer creates a blueprint (definition + schemas + execution sources).
  2. Operators register for that blueprint and advertise preferences.
  3. Customer creates a service via either:
    • Request/approve (customer specifies operators + security requirements), or
    • RFQ/quotes (operators sign quotes and the customer creates service from those quotes).
  4. Customers submit jobs; operators submit results.
  5. Protocol distributes fees (developer/protocol/operator/restakers) and tracks metrics.
  6. Operators submit heartbeats; authorized parties can propose slashes with a dispute window.

Code Map

On-Chain (tnt-core)

ComponentResponsibilityCode
TangleFacet router (dispatches calls by selector)https://github.com/tangle-network/tnt-core/blob/v2/src/v2/Tangle.sol
Tangle*Facet modulesPublic protocol surface (blueprints/services/jobs/payments/quotes/…)https://github.com/tangle-network/tnt-core/tree/v2/src/v2/facets/tangle
core/* modulesShared implementations used by facetshttps://github.com/tangle-network/tnt-core/tree/v2/src/v2/core
MultiAssetDelegationRestaking + delegation + exits + slashing applicationhttps://github.com/tangle-network/tnt-core/blob/v2/src/v2/restaking/MultiAssetDelegation.sol
ServiceFeeDistributorRestaker fee distribution (USD-weighted, per-asset commitments)https://github.com/tangle-network/tnt-core/blob/v2/src/v2/rewards/ServiceFeeDistributor.sol
OperatorStatusRegistryHeartbeats, QoS signals, and optional metric forwardinghttps://github.com/tangle-network/tnt-core/blob/v2/src/v2/restaking/OperatorStatusRegistry.sol
TangleMetricsLightweight activity recorder used by incentiveshttps://github.com/tangle-network/tnt-core/blob/v2/src/v2/rewards/TangleMetrics.sol
TangleMigrationTNT legacy-chain migration claim (Merkle + SP1/ZK)https://github.com/tangle-network/tnt-core/blob/v2/packages/migration-claim/src/TangleMigration.sol

Off-Chain (Blueprint SDK)

ComponentResponsibilityCode
ManagerLoads services from chain, selects runtime sources, runs blueprintshttps://github.com/tangle-network/blueprint/tree/v2/crates/manager
Tangle contextsProvides typed clients + operator identity + envhttps://github.com/tangle-network/blueprint/blob/v2/crates/contexts/src/tangle_evm.rs
Tangle producer/consumerEvent ingestion + result submission helpershttps://github.com/tangle-network/blueprint/tree/v2/crates/tangle-evm-extra/src

The Entrypoint Contract (Composition)

The protocol is exposed as a set of facets registered on the Tangle router. The router maps function selectors to facet implementations and delegates calls.