Skip to content

Bitcoin-Wildlife-Sanctuary/pontis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pontis

OP_CAT enabled Bitcoin <> Starknet Bridge POC

dashboard

Intro

These POC builds of previous Bridge Covenant POC. It explores "easy" parts of the potentatial bridge implementation, ignoring more difficult parts of the design like dual finality, reorgs etc.

Limitations

  • only happy path is tested/implemented, problems with sending transactions are ignored
  • there is a bridge instance constraint missing in the deposit covenant, right now there is no way to specify which bridge instance deposit is meant to be added to after aggregation
  • deposit/withdrawal amount is limited to int32.max, this applies also to a deposit/withdrawal batch total
  • there might be only 16 'open' deposit batches
  • deposit batch size should be a power of 2
  • withdrawal amount should be bigger than what l1 considers dust (330)

Architecture

architecture

Covenants

architecture

How To Run Locally

Operator

  1. Go to operator dir:
    cd operator

  2. Copy config file and set private keys:
    cp .env-example .env

  3. Install deps:
    yarn install

  4. Run devnet:
    yarn run devnet

  5. Deploy L2 contracts:
    yarn run command deploy

  6. Start operator (in another terminal):
    yarn run poc

Dashboard

  1. Go to dashboard dir:
    cd dashboard

  2. Install deps:
    yarn install

  3. Run dashboard server:
    yarn dev

Test Deposit Flow

  1. Make sure Alice account is well funded

  2. Initiate several deposits:
    yarn command deposit 1000
    yarn command deposit 1000
    yarn command deposit 1000
    yarn command deposit 1000

Test Withdrawal Flow

  1. Execute Deposit flow first

  2. Initiate several withdrawals:
    yarn command withdraw 500
    yarn command withdraw 500
    yarn command withdraw 500
    yarn command withdraw 500

  3. Optinally close the batch:
    yarn run command closeBatch

About

OP_CAT-Enabled Bitcoin <> Starknet Bridge POC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •