Skip to content

Official repository for Bobanetwork's light bridge for instant bridging between a variety of networks.

Notifications You must be signed in to change notification settings

eddiedenna/light-bridge

 
 

Repository files navigation

Light Bridge

This service monitors the on-chain events and release funds when a new deposit is found.

Configuration

All configuration is done via environment variables. See all variables at .env.example; copy into a .env file before running.

Description Default
RPC_URL The endpoint of Layer 2
LIGHTBRIDGE_DISBURSER_KEY The pk of disburser
LIGHTBRIDGE_POLLING_INTERVAL The polling interval of fetching events 60s
LIGHTBRIDGE_BLOCK_RANGE_PER_POLLING The blcock range of each polling 1000
LIGHTBRIDGE_POSTGRES_PASSWORD The database password abcdef
LIGHTBRIDGE_POSTGRES_DB_HOST The database host LIGHTBRIDGE_db
LIGHTBRIDGE_POSTGRES_DB The database name postgres
LIGHTBRIDGE_POSTGRES_PORT The database port 5432
LIGHTBRIDGE_POSTGRES_USER The database user postgres

Building & Running

  1. Make sure dependencies are installed - run yarn in the base directory
  2. Build yarn build
  3. Run yarn start

Postgresql

Connect to Postgres on CLI: psql --username postgres -d postgres --password

Deployments

Audits outstanding.


Testnet deployments

Goerli (L1)

  • Teleportation deployed to: 0xB93d9748808A5cC7dC6b61b31F15b87F50BfcAd0
  • Proxy__Teleportation deployed to: 0x84b22166366a6f7E0cD0c3ce9998f2913Bf17A13

BNB Testnet (L1)

  • Teleportation deployed to: 0xD151c8F0dc69618e6180a2dC74B05cCE3E08e0aC
  • Proxy__Teleportation deployed to: 0x7f6a32bCaA70c65E08F2f221737612F6fC18347A

Boba Goerli

  • Teleportation deployed to: 0x95ec63aE2573bD5e70C223E075D9483573968699
  • Proxy__Teleportation deployed to: 0xB43EE846Aa266228FeABaD1191D6cB2eD9808894

Boba BNB Testnet

  • Teleportation deployed to: 0x46FA6144C61d2bb9aCDc3Ca90C8673dd9B6caEB2
  • Proxy__Teleportation deployed to: 0xf4d179d3a083Fa3Eede935FaF4C679D32d514186

Arbitrum Goerli

  • Teleportation deployed to: 0x81F27a114A25ac1c6186fC36888B1b120a46a650
  • Proxy__Teleportation deployed to: 0x7063f59e1Db3e505D844d11A71C78F92D39E5963

Optimism Goerli

  • Teleportation deployed to: 0x885bfeC3D89755d2bCc1e73b6EeEEae94D54eBE4
  • Proxy__Teleportation deployed to: 0xC226F132A686A08018431C913d87693396246024

User flow / Dev flow:

TeleportationFlow


Contract params

This section describes how whitelisted routes between networks can be configured. By default no asset can be bridged, not even the native asset - all need to be explicitly whitelisted.

Asset support is configured on-chain on the Teleportation contract via function addSupportedToken(address _token, uint32 _toChainId, uint256 _minDepositAmount, uint256 _maxDepositAmount, uint256 _maxTransferAmountPerDay).

Indicate support

Support for an asset can be shut down and re-activated at any time (yes|no value).

Minimum Deposit Amount

The minimum amount that needs to be deposited in order to be bridged. The value refers to the asset to be bridged (e.g. ETH or BOBA tokens) and will revert for transactions that do not exceed this threshold (>=).

Maximum Deposit Amount

The maximum amount that can be deposited within one single bridge operation. The value refers to the asset that is being bridged and will revert for transactions that exceed this value.

Maximum Amount Per Day

The maximum amount per day limits how many units of the asset to be bridged can be moved to the corresponding network per day.

About

Official repository for Bobanetwork's light bridge for instant bridging between a variety of networks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 88.5%
  • Solidity 11.5%