Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 5424d72

Browse files
authored
Refactoring Sygma docs (#136)
* add veridise audit report * update github repos * update spectre audit report unwatermarked version * update github corner link * update dictionary * restructure sygma sdk top level section * retitle Ecosystem top level for integrating * restructure Resources top level to Reference * switch hierarchy between architecture and sygma-sdk * rename architecture to protocol. move governance under sygma protocol path * major restructure of architecture filepath * adding structure for spectre and zipline * rewrite tailored security intro section * add better desc for spectre; add static asset * update dictionary * config + moved environment * dictionary * relayer partner page formatting * init evm ecosystem docs * working on evm docs * add more context to evm contract ecosystem; add introductions to MPC and spectre signifying the difference between the two * dictionary * major revisions for tailored security, relayers, and evm support * update all examples to cronos testnet where applicable * fix broken links * broken link testing; yarn build failing on btc and cosmos links. seeing if its because its in draft true status * spellcheck * removing direct links to btc and cosmos pages * updated glossary * dictionary updates mehagain * add substrate token reserve account addresses; reformatted Environments page; update Environment table of contents for readability * update glossary * add spectre flow diagram; update spectre docs per timofey suggestions * dictionary * add more details on spectre based on timofey input * add documentation for widget * cleaning up index pages * dictionary * update faq * fix widget.ts link * change wording to resources; reference is a technical documentation term for APIs * update links * spellcheck * update config * fix broken links * context for manual or dynamic selection of tailored security * dictionary * add documentation for fee handler mapping in bridge and pallet * adjusting copy in fee collection
1 parent 39ea188 commit 5424d72

File tree

85 files changed

+1083
-480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1083
-480
lines changed

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

dictionary.txt

+93
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,102 @@ Base-sepolia
367367
ERC1155TST
368368
sepolia
369369
ERC1155Handler
370+
sygma-core
371+
sygma-x-solidity
372+
zk
373+
Spectre
374+
spectre-node
375+
sygma-inclusion-prover
376+
prover
377+
sygma-widget
378+
Customizable
379+
sygma-explorer-indexer
380+
Veridise
370381
EVM-compatible
382+
Sygma-X-Solidity
383+
protocol-relayers
384+
tailoredsecurity
385+
tailoredsecurity-mpc-intro
386+
tss
387+
mpc-tss
388+
mpc-peerdisc
389+
mpc-keygen
390+
mpc-signing
391+
mpc-reshare
392+
EVM-compatible
393+
Amoy
394+
offchain
395+
tailoredsecurity-introduction
396+
modularized
397+
ZK
398+
spectre
399+
tailoredsecurity-spectre-intro
400+
coprocessor
401+
Gasper
402+
Spectre's
403+
Prover
404+
Verifier
405+
verifier
406+
Halo2
407+
halo2-lib
408+
auditability
409+
hardfork
410+
zipline
411+
tailoredsecurity-zipline-intro
371412
Amoy
372413
Blockops
373414
Veridise
374415
Spectre
375416
Sygma-X-Solidity
417+
resourceID
418+
MPC-specific
419+
Onchain
420+
Sygma-integrated
421+
MPC-verified
422+
Spectre-specific
423+
Spectre-verified
424+
evm
425+
protocol-evm
426+
DynamicERC20FeeHandlerEVM
427+
URI
428+
mb
429+
lr
430+
tradeoffs
431+
Sygma-specific
432+
L1
433+
middleware
434+
architected
435+
optionality
436+
zk-SNARK
437+
rollups
438+
Zipline's
439+
btc
440+
protocol-btc
441+
Tendermint-based
442+
subfield
443+
cryptosystem
444+
amongst
445+
decrypt
446+
ZKP
447+
rollup
448+
436H4jatj6ntHTVm3wh9zs1Mqa8p1ykfcdkNH7txmjmohTu3
449+
5EYCAe5jLbHcAAMKvLFSXgCTbPrLgBJusvPwfKcaKzuf5X5e
450+
Merkle
451+
sygma-widget-index
452+
customizable
453+
frontend
454+
Vite
455+
behaviour
456+
sygma-widget-lit
457+
codebase
458+
sygma-widget-react
459+
provers
460+
Gasper-based
461+
Validator
462+
eth
463+
holeskyETH
464+
incentivization
465+
domainID
466+
caip2
467+
caip19
468+
optionalities

docs/01-introduction/01-index.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ Sygma is a fully open source ([Lesser General Public License version 3.0 (LGPL-3
1313

1414
## What's Next
1515

16-
- Get started with our [Quick Start Guide](/docs/02-sygma-sdk/03-Quick-Start/01-installing-the-sdk.md)
17-
- Run your first [cross-chain token transfer](../02-sygma-sdk/03-Quick-Start/07-Examples/01-Basic-ERC-20-Token-Transfers/01-EVM-EVM-example.md)
18-
- Pass your first [generic message cross-chain](../02-sygma-sdk/03-Quick-Start/07-Examples/02-GMP-Examples/04-GMP-Example-With-A-Simple-Storage-Contract.md)
19-
- See the [environments](../06-environments/01-index.md) Sygma is deployed in
20-
- Look under the hood at the [architecture](../03-architecture/01-index.md)
16+
- Get started with our [Quick Start Guide](../03-sygma-sdk/01-index.md)
17+
- Run your first [cross-chain token transfer](../03-sygma-sdk/04-Examples/01-Basic-ERC-20-Token-Transfers/01-EVM-EVM-example.md)
18+
- Pass your first [generic message cross-chain](../03-sygma-sdk/04-Examples/02-GMP-Examples/01-GMP-Example-With-A-Simple-Storage-Contract.md)
19+
- See the [environments](../08-resources/01-environments/01-index.md) Sygma is deployed in
20+
- Look under the hood at the [architecture](../02-sygma-protocol/01-index.md)
21+
- Integrate the [Sygma Widget](https://sygma-react-widget.pages.dev/) into your dApp
2122
- Read more on the [Sygma Vision](02-origins.md)
2223

23-
For the complete source code, please check out [Sygma's GitHub Repositories](../05-github-repositories.md).
24+
For the complete source code, please check out [Sygma's GitHub Repositories](../08-resources/04-github-repositories.md).

docs/02-sygma-protocol/01-index.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
slug: /protocol
3+
id: protocol-index
4+
title: Sygma Protocol
5+
description: The following details the architecture of Sygma.
6+
---
7+
8+
:::info
9+
The following sections detail the architectural components of the Sygma protocol.
10+
:::
11+
12+
The Sygma interoperability protocol is able to transfer both tokens and arbitrary data. This allows developers and users to transfer ERC-20 tokens, ERC-721 tokens, ERC-1155 tokens, and **[Generic data](./06-generic.md).** Generic data can be used to bridge governance proposals or voting actions, for example, or any other contract call by transferring [calldata](https://ethereum.stackexchange.com/questions/52989/what-is-calldata).
13+
14+
The Sygma protocol stack is designed to leverage the combined strength of both trusted and trustless verification systems. This ultimately forms a hybrid, trust-minimized system that facilitates secure communication and data exchange between blockchains driven by a user’s context and determined by tradeoffs around trust minimization, speed, and cost to transfer. Its modular design also facilitates its operation across any blockchain ecosystem and consensus mechanism with ease of integration. You can read more about this feature under [Tailored Security](./02-Tailored-Security/01-index.md).
15+
16+
![](<../../static/assets/sygma_protocol_stack.png>)
17+
18+
Sygma uses an offchain [relayer](./03-relayers.md) network to verify events on one chain that are to be posted to a destination chain. These relayer nodes, or agents, use a variety of verification systems to determine canon across chains.
19+
20+
Currently, the Sygma protocol is compatible with [EVM](../02-sygma-protocol/04-Supported-Ecosystems/01-evm.md) and [Substrate](../02-sygma-protocol/04-Supported-Ecosystems/02-substrate.md)-based networks (i.e. Polkadot and Kusama), but is proven to be easily extended to other networks such as Bitcoin and Tendermint-based chains (i.e. Cosmos).
21+
22+
The below diagram describes a typical transfer flow within the Sygma protocol using MPC verification between two EVM-based networks:
23+
24+
![](<../../static/assets/Bridging Diagram.png>)
25+
26+
## Configuring Sygma
27+
28+
Sygma utilizes a shared configuration file to enable cross-chain communications. It allows efficient management of network-specific parameters like `sygmaID`s, `chainID`s, and `sygmaResourceID`s. The shared config is primarily used by various components within the Sygma protocol, such as relayers, widgets, and SDK examples.
29+
30+
- **`sygmaID`**: Formerly domainID, it refers to Sygma-specific identifiers ascribed to an L1 or L2 blockchain network. Most configurations in Sygma are domain-specific.
31+
32+
- **`caipId`**: Representing [caip2](https://chainagnostic.org/CAIPs/caip-2) compatible domain identifier
33+
34+
- **`ChainID`**: Represents the more conventionally understood identifiers denoting a blockchain network. It distinguishes between different networks within the same domain or across domains. It is primarily used during interactions with RPC endpoints.
35+
36+
- **`sygmaResourceID`**: Formerly resourceID, resources are Sygma-specific unique identifiers that define a token or an asset on a domain. It is crucial for asset tracking and management in cross-chain interactions. There can be different types, such as `fungible`, `nonfungible`, `semifungible`, `permissionlessgeneric`, etc.
37+
38+
- **`caip19`**: Representing [caip19](https://chainagnostic.org/CAIPs/caip-19) compatible resource identifier
39+
40+
- **`Asset`**: Refers to any token or digital resource managed on a blockchain within the Substrate framework. It can be native or bridged from another chain.
41+
42+
- **`Handler` Types**: Describes the different types of handlers (e.g., `erc20`, `permissionlessGeneric`, etc.) available to a domain, and their roles in processing specific types of transactions or interactions within the network. For more on handlers, please see [Handlers](../02-sygma-protocol/04-Supported-Ecosystems/01-evm.md#handlers).
43+
44+
- **`feeHandlers`**: Describes the fee strategies available on each domain. For more on fees, please see [Fees](../02-sygma-protocol/05-Fees/01-Fee-intro.md).
45+
46+
<!-- - **`blockConfirmations`**: Under MPC relay, the block confirmations before an accepted attestation can be configured -->
47+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
slug: /protocol/tailoredsecurity
3+
id: tailoredsecurity-introduction
4+
title: Introduction To Tailored Security
5+
description: The following details Sygma's Tailored Security protocol
6+
---
7+
8+
# What Is Tailored Security?
9+
10+
Cross-chain use cases are advancing beyond just simply bridging assets. Interoperability now services complex interactions, from cross-chain contract execution to cross-chain liquid staking solutions, requiring the consensus of multiple verification systems to facilitate these. While the vast number of bridging solutions aim to enhance the trustworthiness and efficiency of cross-chain interoperability, most employ fixed security pathways, and none over aggregated tailored security routes. A true interoperability protocol should be able to adapt its verification mechanisms based on transaction type, assets involved, protocols of both chains, security, and cost requirements. The Sygma cross-consensus interoperability protocol achieves this through its architecture and application design, allowing users to select the optimal combinations of verification mechanisms based on their needs and input parameters.
11+
12+
## Scenario
13+
14+
Consider two scenarios: a gamer transferring their character NFT and a crypto whale liquidating a large stake. These examples, while targeting the same domains (source and destination chains), have so far been restricted to bridges that operate under a uniform security model with identical fees and latency. While this one-size-fits-all approach does technically get the job done, it often leads to dissatisfaction for at least one of the users and, in the worst case, for both.
15+
16+
The above scenarios illustrate that a few key parameters must be considered when transacting cross-chain: *security* (high/low); *speed* (fast/slow); and *fees* (expensive/cheap). Additionally, considerations must be given to *asset type*, *amounts*, and even *market implications*.
17+
18+
Building up from these principles, the Sygma protocol offers an alternative approach to securing cross-consensus interoperability: **Tailored Security**. It empowers users and developers to make optimal choices based on any given context. Sygma's Tailored Security leverages a multi-layered framework that combines **proof of authority**, **optimistic execution**, and **ZK proofs** to offer choice and flexibility to users. See [Verification Systems](#verification-systems) for more.
19+
20+
Token routes between source and destination networks can be integrated with any one of these verification systems. Meanwhile, Sygma relayer nodes are equipped to handle and relay messages between chains no matter the framework selected.
21+
22+
![](<../../../static/assets/tailoredsecurity_compare.png>)
23+
24+
## Sygma's Verification Systems
25+
26+
Sygma’s verification systems can be manually selected by the user or dynamically chosen by the protocol. Manual selection of verification system offers users flexibility and choice in security based on their context. Verification systems may also be dynamically chosen by a routing gateway as either a single or combined system. This balances degrees of trust minimization to offer appropriate levels of security. Below is a list of the verification systems available in the Sygma protocol:
27+
28+
- [**Multi-party computation (MPC)**](../02-Tailored-Security/02-MPC/02-mpc.md): a distributed set of relayers leveraging MPC to attest to the validity of transactions on a source chain, which then transmits the corresponding signed attestation to the destination chain.
29+
30+
- [**Spectre**](../02-Tailored-Security/03-Spectre/01-spectre-intro.md): a trust-minimized zero knowledge (zk) light-client coprocessor that generates zk-SNARK proofs of source chain consensus and user-defined computation of the verified blockchain state that can be efficiently verified on the destination chain.
31+
32+
- [**Zipline**](../02-Tailored-Security/04-Zipline/01-zipline-intro.md): a trust-minimized, gas-efficient, optimistic, fraud-proof verification system, which assumes transaction validity and offloads dispute verification to external challengers.
33+
34+
The following documentation will dive into each verification system in detail.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
slug: /tailoredsecurity/mpc/intro
3+
id: tailoredsecurity-mpc-intro
4+
title: Multi-party Computation (MPC)
5+
description: The following details how MPC is utilized by Sygma.
6+
---
7+
8+
:::info
9+
The following details Sygma's multi-party computation verification system.
10+
:::
11+
12+
# Introduction To Sygma's Multi-party Computation (MPC)
13+
14+
Sygma's Tailored Security system begins with its base **multi-party computation (MPC)** verification. For routes (i.e. source to destination chain) integrated with MPC, users and developers can enjoy a low cost, high speed, and secure service. At a high level, the verification system is implemented via 1) a set of MPC-specific contracts (or equivalent in other ecosystems) and 2) an MPC-specific relayer network.
15+
16+
Onchain events are generated as a result of a cross-chain interaction (through a Sygma-integrated dApp). The MPC relayer network listens for and parses these cross-chain events. Multi-party computation methodologies are then used to determine whether these events are canonical; i.e. can it be verified that these events *actually* happened? The MPC relayer network will then make attestations and post these events to the destination chain, signifying the end of an MPC-verified cross-chain interaction.
17+
18+
## What Is Multi-party Computation?
19+
20+
MPC represents a powerful next step in digital asset security because it eliminates the risk of a single point of compromise.
21+
22+
Instead of relying on [Multisigs](https://en.wikipedia.org/wiki/Multisignature) or other, older ways of key management that either expose [relayer](../../03-relayers.md) identities or introduce easily exploitable single points-of-failure, relayers for Sygma run a secure MPC ceremony each time a user wishes to bridge funds or transfer arbitrary data. In this way, MPC enables multiple parties to carry out a distributed computation on their secret inputs without revealing anything but the output.&#x20;
23+
24+
MPC was introduced as a solution for the **[Two Billionaires Problem](https://en.wikipedia.org/wiki/Yao%27s_Millionaires%27_problem)** (Bob and Alice; how to decide who is richer without showing their exact funds, a specific problem which is a Boolean predicate).
25+
26+
The multi-party computation (MPC) model that Sygma employs includes a number of trusted relayer nodes operating under [a trusted federation](https://blog.chainsafe.io/bridges-in-crypto-space-12e158f5fd1e). These trusted relayer nodes are run by reputable entities in the web3 space.
27+
28+
For a detailed research piece, please see [Multi-Party Computation: The Next Generation of Crypto Security](https://blog.buildwithsygma.com/multi-party-computation/) from our blog.

docs/03-architecture/05-security/01-Security-Intro.md renamed to docs/02-sygma-protocol/02-Tailored-Security/02-MPC/03-tss.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
slug: /readme/architecture/Security/intro
3-
id: Security-introduction
4-
title: Security
2+
slug: /tailoredsecurity/mpc/tss
3+
id: mpc-tss
4+
title: Threshold Signature Scheme
55
description: The following details how Sygma addresses security concerns relating to various signature schemes.
6-
sidebar_position: 1
6+
sidebar_position: 2
77
draft: false
88
---
99

@@ -14,13 +14,13 @@ draft: false
1414

1515
## Threshold Signature Schemes (TSS)
1616

17-
**Threshold Signature Schemes (TSS)** is an area of [MPC](/docs/03-architecture/02-mpc.md) that is particularly useful for the crypto domain as it facilitates the distribution of a private key to multiple parties, introducing redundancy for assets management security.&#x20;
17+
**Threshold Signature Schemes (TSS)** is an area of [MPC](../../../02-sygma-protocol/02-Tailored-Security/02-MPC/02-mpc.md) that is particularly useful for the crypto domain as it facilitates the distribution of a private key to multiple parties, introducing redundancy for assets management security.&#x20;
1818

1919
In other words, it enables a set of parties to perform certain cryptographic operations, like signing transactions, while none of them hold a full private key. Instead, the key is split across the parties, and it can only be used when a subset of those parties — the size of which is larger than a certain threshold — combine their key shares.
2020

2121
### An Example
2222

23-
Imagine you have a secret key sk and [a special algorithm](03-keygen.md) that can divide this key into *n* pieces such that *[sk_i] = share_key(pk, n, t)*. Imagine now you want to [sign a transaction](04-signing.md) *m*, so you apply a similar algorithm to get partial signatures *[s_i] = sign(m, [sk_i])*. Now, to reconstruct a valid signature, you would simply sum all partial signatures together *s = s_0 + s_1 + … + s_i* and call it a day.
23+
Imagine you have a secret key sk and [a special algorithm](../../../02-sygma-protocol/02-Tailored-Security/02-MPC/05-keygen.md) that can divide this key into *n* pieces such that *[sk_i] = share_key(pk, n, t)*. Imagine now you want to [sign a transaction](../../../02-sygma-protocol/02-Tailored-Security/02-MPC/06-signing.md) *m*, so you apply a similar algorithm to get partial signatures *[s_i] = sign(m, [sk_i])*. Now, to reconstruct a valid signature, you would simply sum all partial signatures together *s = s_0 + s_1 + … + s_i* and call it a day.
2424

2525
You might’ve also noticed a third argument *t* when we shared our key. Although the key is shared between *n* parties, we only need a threshold number of them to actually sign something. This is akin to a multisig scheme, which interestingly is just an emulation of threshold signatures using a high-level smart contract language like Solidity.
2626

docs/03-architecture/05-security/02-peerdisc.md renamed to docs/02-sygma-protocol/02-Tailored-Security/02-MPC/04-peerdisc.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
slug: /readme/architecture/Security/peerdisc
3-
id: Security-peerdisc
2+
slug: /tailoredsecurity/mpc/peerdisc
3+
id: mpc-peerdisc
44
title: Peer Discovery
55
description: The following details the peer discovery process for all relayers.
6-
sidebar_position: 2
6+
sidebar_position: 3
77
draft: false
88
---
99

@@ -25,4 +25,4 @@ Relayer nodes are deployed with a configuration in order to serve the above requ
2525

2626
## Flow
2727

28-
![](<../../../static/assets/peerdisc_flow.png>)
28+
![](<../../../../static/assets/peerdisc_flow.png>)

docs/03-architecture/05-security/03-keygen.md renamed to docs/02-sygma-protocol/02-Tailored-Security/02-MPC/05-keygen.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
slug: /readme/architecture/Security/keygen
3-
id: Security-keygen
2+
slug: /tailoredsecurity/mpc/keygen
3+
id: mpc-keygen
44
title: Key Generation
55
description: The following details the key generation process for all relayers.
6-
sidebar_position: 3
6+
sidebar_position: 4
77
draft: false
88
---
99

@@ -24,7 +24,7 @@ Ultimately, we can look on the key generation (i.e. keygen) as the access contro
2424
1. Admin calls `StartKeygen()` of `Bridge.sol` contract
2525
2. Event `KeygenRequired` is emitted by `Bridge.sol` contract
2626
3. Relayers that listen to events initiate `Keygen` protocol
27-
![](<../../../static/assets/keygen_flow.png>)
27+
![](<../../../../static/assets/keygen_flow.png>)
2828
4. Relayers observe chain state and listen to events that signal public key submission
2929
5. If public key *y* hasn’t been submitted yet, any one relayer can transact it onchain signaling the finalization of the protocol
3030

docs/03-architecture/05-security/04-signing.md renamed to docs/02-sygma-protocol/02-Tailored-Security/02-MPC/06-signing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
slug: /readme/architecture/Security/signing
3-
id: Security-signing
2+
slug: /tailoredsecurity/mpc/signing
3+
id: mpc-signing
44
title: Proposal Signing
55
description: The following details the signing of proposals by relayers.
6-
sidebar_position: 3
6+
sidebar_position: 5
77
draft: false
88
---
99

@@ -20,7 +20,7 @@ After the key generation, each of *n* relayers has a key share *x* that will all
2020
1. User calls `deposit` method of `Bridge.sol` contract
2121
2. Event `Deposit` is emitted
2222
3. Relayers observe event `Deposit`, formulate message *M* and initiate `Keysign` protocol
23-
![](<../../../static/assets/keysign_flow.png>)
23+
![](../../../../static/assets/keysign_flow.png)
2424
4. Relayers observe chain state and listen to events of signature submission for the current proposal
2525
5. If signature *σ* hasn’t been submitted yet, any one relayer can transact it onchain signaling the finalization of the protocol
2626

docs/03-architecture/05-security/05-keyreshare.md renamed to docs/02-sygma-protocol/02-Tailored-Security/02-MPC/07-keyreshare.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
slug: /readme/architecture/Security/reshare
3-
id: Security-reshare
2+
slug: /tailoredsecurity/mpc/reshare
3+
id: mpc-reshare
44
title: Key Resharing
55
description: The following details the process for key resharing.
6-
sidebar_position: 5
6+
sidebar_position: 6
77
draft: false
88
---
99

@@ -42,4 +42,4 @@ Also note that during this procedure, the entire set of new relayers must be act
4242
4. go through Setup steps
4343
2. Admin checks whether new party is online and calls `adminAddRelayer()` of `Bridge.sol` which ends emitting `RelayerAdded` event
4444
3. All relayers including new ones initiate `Reshare` protocol
45-
![](<../../../static/assets/keyshare_flow.png>)
45+
![](<../../../../static/assets/keyshare_flow.png>)

0 commit comments

Comments
 (0)