This project is a bridge between Syscoin UTXO and Syscoin NEVM. It allows Syscoin assets to be moved to Syscoin NEVM and back.
Trustless transfer of SYS back and forth between the Syscoin UTXO and Syscoin NEVM blockchains without middlemen !
- User burns SYS to create SYS on the Syscoin UTXO chain by via
syscoinBurnToAssetAllocation
RPC call. - User burns SYSX to create SYS on the Syscoin NEVM chain by via
assetAllocationBurn
RPC call and specifying the NEVM address which receives the SYS on NEVM chain. - Once both transactions are mined, the user can now use the transaction data to build a SPV proof
fetchBackendSPVProof
. This proof is then send to a Smart Contract on Syscoin NEVM chain. - The Smart Contract verifies the SPV proof and if valid, mints SYS on the Syscoin NEVM chain to the address indicated on the SPV proof.
- User freezes and Burn their SYS by calling on the
SyscoinERC20Manager
contractfreezeBurnERC20
function. - Once the transaction is mined, the user can now use the transaction data to mint SYSX asset on UTXO chain by calling
assetAllocationMint
RPC call. - Once SYSX is minted, this again can be burned using
assetAllocationBurn
to get native SYS on UTXO.
The bridge UI is a ReactJS application that allows users to interact with the bridge. It is a NextJS application that uses Firebase for authentication and storage. This allows users to interact with the bridge without having to install any software.
Each step taken on the Bridge is stored in Firebase Firestore. This allows the user to resume the process at any time.
- NodeJS 16+ (recommneded to use
nvm
to install NodeJS) - Firebase Emulator (recommended to use
npm install -g firebase-tools
to install Firebase Emulator) - Yarn (recommended to use
npm install -g yarn
to install Yarn)
yarn install
Runs Firebase Emulator on port 4000
yarn firebase:dev
Runs NextJS Dev Server on port 3000
yarn dev
yarn build
docker build -t syscoin/bridge .
Name | Description | Default |
---|---|---|
FIREBASE_API_KEY |
Firebase API Key | "" |
FIREBASE_AUTH_DOMAIN |
Firebase Auth Domain | "" |
FIREBASE_PROJECT_ID |
Firebase Project ID | "" |
FIREBASE_STORAGE_BUCKET |
Firebase Storage Bucket | "" |
FIREBASE_MESSAGING_SENDER_ID |
Firebase Messaging Sender ID | "" |
FIREBASE_APP_ID |
Firebase App ID | "" |
FIREBASE_MEASUREMENT_ID |
Firebase Measurement ID | "" |
FIREBASE_AUTH_EMAIL |
Firebase Auth Email | "" |
FIREBASE_AUTH_PASSWORD |
Firebase Auth Password | "" |
FIREBASE_AUTH_UID |
Firebase Auth UID | "" |