Deep dive into the technical architecture of Sui Bridge.

CN
PANews
Follow
9 months ago

Sui Bridge is the native bridge of Sui, providing a minimal trust path for cross-chain transfer of Sui assets.

In the past few months, significant progress has been made in the development of Sui's native bridge, Sui Bridge, within the Sui ecosystem. This initiative not only increases Sui's accessibility to a wider community but also improves interoperability with other blockchains.

As a key component of the Sui ecosystem, Sui Bridge facilitates the secure and efficient transfer of assets and data between Sui and other blockchain networks. This functionality not only expands the reach of applications built on Sui but also provides a deeper integration into a broader blockchain environment. Interoperability increases Sui's growth and adoption, allowing assets from other networks (such as Ethereum) to be securely and easily migrated to Sui.

? Sui Bridge:

https://bridge.testnet.sui.io

Background of Sui Bridge

In the blockchain ecosystem, a cross-chain bridge is a protocol that allows independent blockchain networks to interact and communicate. Cross-chain bridges facilitate the transfer of cross-chain data, allowing users to move their assets from one chain to another, and even perform more complex operations such as cross-chain message passing.

Among the many cross-chain bridge design choices, Sui Bridge adopts a locking and minting mechanism, which is one of the most widely used solutions. As a locking and minting design, Sui Bridge holds Ethereum native assets in Ethereum smart contracts, while Sui assets are minted or destroyed in the bridging interaction direction.

As the native bridge of Sui, Sui Bridge does not require additional trust. Sui Bridge is secured by nodes of the Sui network, and its code has been embedded into the Sui framework.

In its current state, Sui Bridge is available on the testnet, supporting the bridging of tokens such as ETH, WETH, WBTC, and USDT between Ethereum Sepolia and the Sui testnet. After the launch of the mainnet, Sui Bridge will prioritize support for more assets. Future versions of Sui Bridge will add new features, such as custom cross-chain message passing and integration with other blockchains.

Advanced Architecture

Sui Bridge has four key components: the Sui Bridge committee or node network, the Sui Bridge smart contract, full nodes running on Ethereum and Sui, and the bridging client.

The client is the interface between users and the Sui Bridge infrastructure. It coordinates users' bridging operations by submitting correctly formatted transactions and collecting signatures from Sui Bridge nodes. The client uses full nodes to submit transactions on both sides of the bridge. Sui Bridge nodes also run Ethereum and Sui full nodes to monitor bridging operations and respond to these operations through subsequent transactions. While the bridging client is permissionless and can be executed by anyone, many bridging nodes will activate bridging clients to ensure the network's activity.

In-depth exploration of Sui Bridge technical architecture

Sui Bridge utilizes infrastructure running on Ethereum and Sui, as well as the Sui Bridge node network

When bridging from Ethereum to Sui, users deposit assets into the Sui Bridge smart contract on Ethereum. The client then observes this transaction and coordinates the bridging process. The Sui Bridge committee operates Ethereum full nodes, monitoring such bridging operations to validate the legitimacy of client requests.

Upon validation, the Sui Bridge on Sui mints bridged assets for the user, completing the bridging operation. Due to the low bridging cost, Sui validation nodes currently subsidize gas fees associated with bridging transactions on Sui, allowing the client to execute transactions automatically, creating a seamless bridging experience.

When bridging from Sui to Ethereum, the process is similar, except that users must manually submit a claim transaction on Ethereum. This transaction includes signature data from Sui Bridge nodes, allowing Ethereum accounts to redeem specified assets locked in the bridging contract.

Additionally, all bridging records and approvals are stored in on-chain bridging objects. This is feasible on Sui, as its storage and gas fees are relatively low. The Sui Bridge contract also handles governance operations, which are controlled by the Sui Bridge committee.

Bridging Messages

To ensure low gas fees, bridging messages built by Sui Bridge are lightweight and easy to decode on the chain. A universal message format is adopted to ensure efficient decoding, message verification, and signature on each chain.

Move encoding example:

public struct BridgeMessage has copy, drop, store { message_type: u8, message_version: u8, seq_num: u64, source_chain: u8, payload: vector }

Solidity encoding example:

struct Message { uint8 messageType; uint8 version; uint64 nonce; uint8 chainID; bytes payload; }

These bridging messages are designed to be simple and efficient, with a minimal structure that includes basic fields such as message type, version, sequence number, source chain identifier, and payload. This simplified design reduces complexity and computational overhead, ensuring low gas fees while promoting fast and reliable cross-chain communication.

Bridging Security

Establishing the trust model of the bridge is one of the most important design decisions when developing a cross-chain bridge to support a thriving ecosystem and large-scale mobility. Cross-chain bridges should be both secure and decentralized, and in some bridge designs, these attributes may be mutually exclusive. Developing a native bridge provides an opportunity to leverage Sui's security to protect Sui Bridge.

Similar to the node operators running validation nodes to secure Sui, they also manage and maintain the infrastructure on which Sui Bridge operates. Sui Bridge inherits a decentralized network of node operators who are highly capable of running and protecting Sui infrastructure.

As mentioned, most Sui Bridge operations occur on Sui and treat Sui as the control panel of the bridge. This benefits from the security inherited from the software developed in Move.

Bridge Committee

Sui Bridge is protected by the same set of validation nodes that secure Sui. During the testnet phase, the committee consists of a subset of testnet validation nodes. After the mainnet launch, the majority (if not all) active Sui validation nodes will become part of the bridging committee. Dynamic committee management will be implemented after the mainnet launch to allow new validation nodes to join. Only Sui validation nodes are allowed to be part of the Sui Bridge committee, ensuring the inheritance of its security assumptions, properties, and social consensus.

To maintain high security and compatibility with other blockchain networks, Sui Bridge uses the Elliptic Curve Digital Signature Algorithm (ECDSA) for committee signatures. By leveraging ECDSA, Sui Bridge ensures seamless interoperability and secure transaction verification, strengthening the integrity and trustworthiness of the system.

Signature Verification

Sui Bridge uses recoverable ECDSA signatures, allowing the public key to be recovered directly from the signature. This feature simplifies the verification process, enabling us to retrieve the public key and confirm the authenticity and integrity of the signature without prior knowledge of the public key.

Messages are considered valid only when the total weight of the signatures reaches or exceeds a predetermined threshold. This threshold mechanism ensures that a sufficient number of authenticated signatures are required to verify messages, enhancing the security and reliability of the system. By implementing this approach, we can prevent fraudulent activities and ensure that only legitimate transactions are processed.

Move encoding example:

…let mut message_bytes = SUI_MESSAGE_PREFIX;message_bytes.append(message.serialize_message());

let mut threshold = 0; while (i < signaturecounts) { let pubkey = ecdsak1::secp256k1ecrecover(&signatures[i], &messagebytes, 0);

// check duplicate and make sure pub key is part of the committee
assert!(!seen_pub_key.contains(&pubkey), EDuplicatedSignature);
assert!(self.members.contains(&pubkey), EInvalidSignature);

// get committee signature weight and check pubkey is part of the committee
let member = &self.members[&pubkey];
if (!member.blocklisted) {
    threshold = threshold + member.voting_power;
}
seen_pub_key.insert(pubkey);
i = i + 1;

};

Solidity encoding example:

solidity function verifySignatures(bytes[] memory signatures, BridgeUtils.Message memory message) external view override { uint32 requiredStake = BridgeUtils.requiredStake(message); uint16 approvalStake; address signer; uint256 bitmap;

// Check validity of each signature and aggregate the approval stake
for (uint16 i; i < signatures.length; i++) {
    bytes memory signature = signatures[i];
    // recover the signer from the signature
    (bytes32 r, bytes32 s, uint8 v) = splitSignature(signature);
    (signer,,) = ECDSA.tryRecover(BridgeUtils.computeHash(message), v, r, s);

    require(!blocklist[signer], "BridgeCommittee: Signer is blocklisted");
    require(committeeStake[signer] > 0, "BridgeCommittee: Signer has no stake");

    uint8 index = committeeIndex[signer];
    uint256 mask = 1 << index;
    require(bitmap & mask == 0, "BridgeCommittee: Duplicate signature provided");
    bitmap |= mask;

    approvalStake += committeeStake[signer];
}

require(approvalStake >= requiredStake, "BridgeCommittee: Insufficient stake amount");

} ```

Building Interoperability

The native bridge of Sui not only provides a secure and efficient means of transferring assets between blockchain networks but also lays the foundation for more advanced cross-chain interactions. By leveraging its robust trust model, integrating ECDSA for secure and verifiable transactions, and adopting a committee-based signature verification process, Sui Bridge ensures high security and reliability while maintaining flexibility.

The scalability and flexibility of the Sui Bridge architecture allow for future expansion and integration with other blockchain networks. As the ecosystem develops, the bridge will support a wider range of assets and functionalities, such as custom cross-chain message passing, allowing for unique cross-chain interactions.

Sui Bridge represents a significant advancement in the field of Sui interoperability, providing a seamless and highly secure solution for cross-chain asset transfers. With the launch of Sui Bridge on the mainnet, users can expect a more powerful and versatile cross-chain bridge that meets current needs while anticipating future demands.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Bitget:注册返10%, 送$100
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink