Skip to content

Commit

Permalink
timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
glasgowm148 committed Jul 1, 2024
1 parent 7adb978 commit 81e88b8
Show file tree
Hide file tree
Showing 5 changed files with 698 additions and 177 deletions.
107 changes: 100 additions & 7 deletions docs/eco/rosen/ergo-watcher.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Ergo Rosen Bridge Watcher Setup
# Rosen Bridge Watchers

Watchers 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.

## Watcher Setup Guides

## Ergo Watcher Setup Tutorial


//// details | Tutorials
{type: info, open: true}
//// details | Video Tutorials
{type: info, open: false}
/// details | Pre-requisites
{type: danger, open: true}
See the [pre-requisites page](rosen-preq.md) for information on setting up a local node, as well as minimal hardware and software requirements. (Docker)
Expand All @@ -27,16 +27,109 @@ There is a [General Watchers app Tutorials Playlist](https://youtube.com/playlis
{type: info, open: false}
mgpai walks through a Watcher instance in [Linux and Cloud](https://www.youtube.com/watch?time_continue=1&v=1dpfLWdWMLs&embeds_referring_euri=https%3A%2F%2Fwww.therefour.org%2F&embeds_referring_origin=https%3A%2F%2Fwww.therefour.org&source_ve_path=MjM4NTE&feature=emb_title)
///
////


### Clone the Repository and Prepare the Environment
First, clone the operational repository and navigate to the appropriate directory:

```shell
git clone https://github.com/rosen-bridge/operation.git
cd operation/watcher/
```

Below you'll find some frequently asked questions as well as common issues and troubleshooting tips.
////
Create and configure the environment file from the template provided:

```shell
cp env.template .env
# Edit the .env file to set POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_DB, and POSTGRES_PORT
```

### Configure Environment Variables and Permissions
Set up necessary environment variables in the `.env` file and adjust file permissions:

```shell
# Example environment variables setting
POSTGRES_PASSWORD=your_password # a random alphanumeric password without special characters (like $%!-#)
POSTGRES_USER=your_user # a random name
POSTGRES_DB=your_db # a random name
POSTGRES_PORT=5432 # 5432 is set as default, you can change it
# Set permissions and create local.yaml
sudo chown -R 3000:3000 logs
touch config/local.yaml
```

For MacOS users, adjust the permissions for the `logs` directory:

```shell
sudo chmod -R 707 logs
```

### Configure Docker for ARM Devices (if applicable)

/// details | Raspberry Pi ARM
{type: info, open: false}

If you're running on a Raspberry Pi ARM device, specify an ARM-compatible Docker image and adjust the volume mapping in the docker-compose file:

```yaml
# Example docker-compose configuration for ARM64v8
db:
image: arm64v8/postgres:16.0
env_file:
- .env
volumes:
- postgres-data:/var/lib/postgresql/data/
networks:
- rosen_network
restart: always
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB']
interval: 10s
timeout: 5s
retries: 3
```
///
### Pull Docker Images and Start the Watcher
Before starting the watcher, pull the necessary Docker images and run the service:
```shell
docker compose pull
docker compose up -d
```

#### 5. Configure the `local.yaml` File for Ergo
Set up the `local.yaml` configuration file specifically for the Ergo network:

```yaml
network: ergo
api:
apiKeyHash: 'YOUR_API_KEY_HASH'
ergo:
type: node
initialHeight: <latest height>
mnemonic: 'YOUR_WALLET_MNEMONIC'
node:
url: 127.0.0.1:9053
observation:
confirmation: 10
validThreshold: 720
```
Make sure to use the actual values and URLs as per your setup requirements.
### Start the Watcher and Monitor
After configuring all files and setting up the environment, start the watcher:
```shell
docker compose up -d
```

Access the watcher UI by visiting `http://localhost:3030` to monitor network information and health status.

#### Note
- Adjust the `apiKeyHash` and `mnemonic` in the `local.yaml` or through the `.env` file for added security.
- Ensure your Docker environment is properly configured, especially when deploying on different architectures like ARM.
- Regularly update your configuration files and Docker images to keep up with network changes and software updates.

## Watcher FAQs

Expand Down
69 changes: 44 additions & 25 deletions docs/eco/rosen/rosen-uses.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,61 @@
# Rosen Bridge: Bridging Cardano and Ergo
Here's an improved version with enhanced formatting and the inclusion of rsBTC:

The Rosen Bridge provides a mechanism to bridge Cardano and Ergo, allowing for seamless interaction between the two blockchains. It's important to understand that this bridge does not facilitate a direct swap between ADA and ERG. Instead, it allows you to convert your ADA into rsADA on the Ergo blockchain, or your ERG into rsERG on the Cardano blockchain.
# Rosen Bridge: Connecting Cardano, Ergo, and Bitcoin

This functionality opens up new possibilities for ADA token holders within the Ergo DeFi ecosystem. Although the bridge has just been launched and dApps are still in the process of integrating this feature, there are already several ways you can utilize your wrapped tokens:
The Rosen Bridge enables seamless interaction between the Cardano, Ergo, and Bitcoin blockchains. This bridge doesn't facilitate direct swaps between native tokens. Instead, it allows users to convert:

## Tokens Listed
- ADA into rsADA on the Ergo blockchain
- ERG into rsERG on the Cardano blockchain
- BTC into rsBTC on both Ergo and Cardano blockchains

This functionality opens up new possibilities for token holders across these ecosystems.

- ERG
- [SigUSD / SigRSV](sigmausd.md)
- RSN
- [COMET](https://thecomettoken.com/)
- ADA
- Hosky
## Supported Tokens

| Token | Description | Network |
|-------|-------------|---------|
| ERG | Native Ergo token | Ergo |
| ADA | Native Cardano token | Cardano |
| BTC | Native Bitcoin token | Bitcoin |
| [SigUSD / SigRSV](sigmausd.md) | Ergo stablecoin and reserve | Ergo |
| RSN | Rosen Bridge token | Ergo |
| [COMET](https://thecomettoken.com/) | Ergo ecosystem token | Ergo |
| SPF | Spectrum Finance token | Ergo |
| Hosky | Cardano meme token | Cardano |

## On Ergo
## Ergo Ecosystem Opportunities

If you simply want to get your hands on some native tokens like rsADA or rsHOSKY, you can use [ergodex](spectrum.md).
1. **Token Swaps**:
Use [Ergodex](spectrum.md) to acquire native tokens like rsADA, rsBTC, or rsHOSKY.

- [**Auction House**](ergo-auctions.md) is a decentralized marketplace for NFTs, tokens, and more now accepts rsADA. List rsADA in bulk at a set price, or make an offer for it!
- [**SigmaFi**](https://sigmafi.app/#/) is a decentralized peer-to-peer bonds market allows you to use rsADA as collateral.
- [**DuckPools**](https://www.duckpools.io/): You can lend your rsADA tokens on this platform.
- [**ErgoMixer**](ergomixer.md): This service allows you to mix your rsADA tokens for enhanced privacy.
- [**SigmaO**](sigmao.md) create American style calls and puts on any wrapped token.
2. **[Auction House](ergo-auctions.md)**:
A decentralized marketplace for NFTs and tokens that now accepts rsADA and rsBTC. List tokens in bulk or make offers.

/// details | I've bridged and now I don't have enough ERG for the transaction fee to send my tokens anywhere.
{type: info, open: true}
You can use [babel-fees](babel-fees.md) in Ergo to pay for transaction fees with native tokens if you do not have enough ERG.
///
3. **[SigmaFi](https://sigmafi.app/#/)**:
A decentralized peer-to-peer bonds market where you can use wrapped tokens as collateral.

4. **[DuckPools](https://www.duckpools.io/)**:
Lend rsADA, rsBTC, and other supported tokens.

## On Cardano
5. **[ErgoMixer](ergomixer.md)**:
Enhance privacy by mixing your wrapped tokens.

- **Cardano DEXs**: You can gain exposure to Ergo to bridged tokens on Cardano DEXs such as Spectrum, Minswap, and Sundae.
- [**Liqwid Finance**](https://app.liqwid.finance/governance/proposal/36): Proposal 36 aims to add bridged ERG (rsERG) as isolated collateral in the $ADA market with the following risk parameters: 51.4% maxLTV, 51.5% liquidationLTV, 15% Liquidation Penalty.
6. **[SigmaO](sigmao.md)**:
Create American-style call and put options on any wrapped token.

> **Tip**: Low on ERG for transaction fees? Use [babel-fees](babel-fees.md) on Ergo to pay transaction fees with native tokens when you don't have enough ERG.
In the coming months, we anticipate more integrations and offerings involving rsADA. Stay tuned for more exciting developments!
## Cardano Ecosystem Opportunities

1. **Cardano DEXs**: Gain exposure to Ergo and Bitcoin bridged tokens on popular Cardano decentralized exchanges:
- Spectrum
- Minswap
- Sundaeswap
2. **[Liqwid Finance](https://v2.liqwid.finance/market/ERG)**:
Participate in DeFi activities using bridged tokens, including rsERG and rsBTC.
3. **[Lenfi](https://app.lenfi.io/)**:
Explore lending and borrowing options with bridged assets.

## Future Developments

As the bridge continues to evolve, we anticipate more integrations and offerings involving rsADA, rsERG, rsBTC, and other bridged tokens. Stay tuned for exciting developments across all three ecosystems!
Loading

0 comments on commit 81e88b8

Please sign in to comment.