Klever Bridge

Overview

Klever Bridge is a decentralized cross-chain solution that connects different blockchain networks, enabling seamless token transfers between otherwise isolated ecosystems.

Built on the Klever Virtual Machine (KVM), the bridge uses an architecture where nodes, called relayers, work with smart contracts to facilitate cross-chain transactions. Relayers don't handle or transfer tokens directly - they only validate transactions and request transfers to be executed by the smart contracts that hold the assets. These operations are governed by a multisig contract requiring consensus among relayers before executing transfers.

This decentralized approach ensures that no single entity controls the bridge, providing enhanced security and reliability for all cross-chain operations.

Bridge Architecture

The bridge operates through a relayer network that follows specific state machines for each transfer direction. Relayers coordinate through consensus mechanisms to ensure secure and reliable cross-chain operations.

For detailed information about the relayer state machines, see the Relayers documentation. For comprehensive state machine details, see the Bridge Transfer Flow documentation.

Contracts

Klever Blockchain Contracts

  • KDA-Safe: This contract handles tokens used by the bridge. It can mint/burn tokens if needed, or lock/release tokens. It's also responsible for whitelisting tokens that can be used with the bridge.

  • Multisig: A controller-like contract that calls other contracts to execute bridge processes such as whitelisting tokens and executing transfers. It operates based on a quorum system, where only authorized relayer addresses have permission to interact with it.

  • Bridged-Token-Wrapper: A contract used to wrap or unwrap tokens needed in certain transfer types. It can also serve as an entry point for users to request a bridge transfer.

  • Multi-Transfer-KDA: Helper contract which handles the transfer of multiple KDA tokens and interacts with the bridged-token-wrapper when token wrapping is needed.

Ethereum Blockchain Contracts

  • Safe Contract: The counterpart to the KDA-Safe contract on the Ethereum side. It handles locking/releasing of tokens, minting/burning wrapped tokens, and manages the whitelist of supported tokens.

  • Bridge Contract: Used by bridge relayers to retrieve information and execute batches of cross-chain transactions. It serves as the main interface for the Ethereum side of the bridge operations.

Source Code

The Klever Bridge implementation consists of three main components, all available as open source:

Smart Contract (Klever Blockchain)

The smart contract that handles bridge operations on the Klever Blockchain side.

  • Repository: klv-bridge-eth-sc-rs
  • Language: Rust
  • Purpose: Manages token deposits, withdrawals, and bridge state on Klever Blockchain

Smart Contract (Ethereum)

The smart contract that handles bridge operations on the Ethereum blockchain side.

  • Repository: klv-bridge-eth-sc-sol
  • Language: Solidity
  • Purpose: Manages token locking/releasing, minting/burning, and bridge operations on Ethereum

Bridge Relayer

The relayer service that monitors both chains and facilitates cross-chain transfers.

  • Repository: klv-bridge-eth-go
  • Language: Go
  • Purpose: Orchestrates transfers, validates transactions, and maintains consensus across the relayer network

Supported Blockchains

  • Ethereum

Was this page helpful?