therefour
![1500x500.jpeg](https://static.wixstatic.com/media/df62d1_c7fb171f2408408083e350a51413b83e~mv2.jpeg/v1/fill/w_980,h_327,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/df62d1_c7fb171f2408408083e350a51413b83e~mv2.jpeg)
Rosen bridge is an open source Ergo-centric bridge enabling users to send and receive coins and tokens between Ergo and any other chain. The other chain, say chainX, however, should support multi-signature transactions or threshold signatures.
In this bridge, there is no need to deploy and utilize smart contracts on the other chains since the consensus on any action can be done on the Ergo platform by a set of Guards, resulting in a signed transaction (txn for Ergo or chainX). These transactions can be broadcasted to the other chain by any party including the Guards.
Watcher Setup Tutorial Videos
Windows
Follow along as QX guides you through a Windows Watcher installation
Linux
mgpai walks through a Watcher instance in Linux and Cloud
MacOS
The team at ergotutorials.com provides a guide to set up a Watcher on MacOS
Watcher Setup
Recommended Hardware Requirements
CPU: 2 cores
RAM: 2 GB
Storage: 20 GB
Software Requirements
Docker Compose
Watchers are deployed utilizing Docker Compose. Docker Compose is like a recipe for running several apps together. It helps organize multiple containers and start them all with just one command, making it easier to manage complex applications.
The easiest and recommended way to get Docker Compose is to install Docker Desktop. Docker Desktop includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
Get Docker Desktop for your Operating System HERE
Watcher Deployment
To participate as a watcher in the bridge, you need to deploy a watcher app, observing one of the supported networks. Each supported network has its own set of watchers, that are responsible for reporting users' actions on that specific network.
To deploy a Watcher, instance follow instructions on GitHub HERE
Multiple Watcher Deployment
Once you have one instance running and are familiar with the process, it is possible to run multiple Watcher instances with a couple of simple steps.
-
Copy and rename the 'watcher' folder. I suggest renaming with a network identifier e.g. 'watcherada'
-
Edit the 'local.yaml' file to assign a different port number for WATCHER_PORT. The default port is '3030' and if unchanged will be utilized by the first watcher instance. I suggest 3031 and follow sequentially for following Watcher instances.
-
Follow the instructions on how setup the specific network you wish this instance to watch.
Common Questions
Updating your Watcher
Development is an ongoing process, as such, time to time you'll be required to update your Watcher. To do so, run the following in the Terminal of PowerShell in your Watcher directory.
Pull the latest latest Watcher release
-
docker compose pull
Next, shut down your watcher instance. There is no need to remove volumes as the service will continue from the latest sync block height of any network
-
docker compose down
Finally, restart your Watcher instance
-
docker compose up -d
Refresh your Watcher UI in the browser to check the health of the instance.
Lock, Unlock 500 Error
If you're receiving a 500 Error while trying to lock or unlock your ERG and/or RSN, it could possibly be from having an insufficient box value on chain. To rectify, add the following to your local.yaml in the "ergo:" section with one tab indent.
-
minBoxValue: '2000000'
Permit Health Broken
By default, the permit health warning parameter is set quite high. This is adjustable locally by adding the following into local.yaml
healthCheck:
permit:
warnCommitmentCount: 1
criticalCommitmentCount: 0
Adjust the numbers as you wish.
warnCommitmentCount will change the warning to yellow when the available Permits reduce to the number.
criticalCommitmentCount will change to red when the available Permits reduce to this number.
Using your own Ergo node
It is possible to use your Ergo node provided you have indexing enable so the Watcher can make calls. To enable indexing add extraIndex = true to the node section of your node configuration file.
Next edit the local.yaml of your Watcher instances to your local machine IP address and port e.g. http://192.168.0.xxx:9053
Clearing Volumes
You may wish to clear Docker volumes for a number of reasons, e.g. changing Initial_Height to sync. To do so run the following Docker command from the Watcher directory
-
docker compose down --volumes
Re-initiate the Watcher with
-
docker compose up -d
-
Initial Supported AssetsERG ADA SigUSD SigRSV RSN Plans to add more tokens from both Ergo and Cardano after launch.
-
Can I add a token to the BridgeProjects pay a listing fee to the Rosen Fund, with potential discounts for open-source projects. This involves minting wrapped tokens and updating the token map. Listing fees are distributed to Watchers and Guards.
-
WatchersWatchers are integral to Rosen Bridge, serving as cross-chain oracles. They observe and report deposit events on their network to Ergo, contributing to the network's security and expansion.
-
GuardsGuards are a federated group of actors managing the Rosen Core. Their role is to check Watcher reports and form a consensus around the transaction. If formed they will sign the transaction an bridge the assets.
-
FeesInitially, it's the greater of $10 or 0.5% of the transaction value, plus network fees, adjustable by the Guard set. The fee is collected in the transferred token on Ergo. Network fees vary: static for Ergo and Cardano, dynamic for EVM-based networks.
-
Who can be a WatcherAnyone can be a Watcher of any supported network provided they meet the collateral and permit requirements.
-
Role and RewardsWatchers are essential for accurate reporting and receive 70% of transaction fees as rewards for successful and accurate reporting. (while 30% goes to the guard set).
-
Collateral RequirementsEach Watcher instance requires 800 ERG and 30,000 RSN as collateral that is fully redeemable. This collateral amount is adjustable.
-
PermitsTo report, watchers must acquire permits, costing an additional 3,000 RSN. Multiple permits are necessary for reporting concurrent events. Permits are redeemable and can be seized if reports are found fraudulent. You can increase or decrease your permits at any time and redeem them when leaving.
-
Reporting ProcessWatchers report deposit events as part of a collective effort. A consensus among watchers on an event triggers a final report and guard intervention. Guards take necessary actions based on these reports. Watchers involved in successful cross-chain settlements are rewarded.
-
Is there a limit on Watcher numbersTheoretically no, anyone can run a Watcher. A a minimum of 60%+1 of Watchers are required to trigger an event.
-
Can I run multiple WatchersYes provided collateral and permit requirements are met. Each instance needs a unique Watcher folder and assigned WATCHER_PORT.
-
Out of Sync healthIt is normal for the Watcher to lose sync from time to time. This occurs because the Watcher runs a query to update roughly every 3 minutes. Depending on block minting, this may from time to time fall out of sync. It will rectify in a short amount of time.