Skip to content

Commit

Permalink
Merge pull request #13 from MajorDomDePIN/main
Browse files Browse the repository at this point in the history
Update the documentation in the course of customizing the Q&A_Knowledgebase
  • Loading branch information
SanghamitraBhowmick1993 authored Nov 4, 2024
2 parents 226df91 + 961c42c commit c918a68
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 56 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode/
48 changes: 24 additions & 24 deletions docs/Moonchain-Design/Low-Scale-Certification.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Moonchain-Design/Moonchain Supernode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In our zkEVM SupernodeV2, there are two important parts to a Moonchain Supernode
- <code>mxc-client</code>

## MXC geth
The [mxc-geth](https://github.com/MXCzkEVM/mxc-geth) repository is a customized version of [taiko-geth](https://github.com/taikoxyz/taiko-geth) tailored to integrate MXprotocol specifications. Functioning as an IoT Web3 platform, it interfaces with an LPWAN cluster as described [here](/docs/Moonchain-Design/LPWAN%20Protocol) previously. Similar to Ethereum's L1/L2 execution engines, <code>mxc-geth</code> monitors and processes new IoT transactions within the network. These transactions are ececuted on the EVM, maintaining the latest state and comprehensive database of current IoT data. Subsequently, it submits proofs using Zero-Knowledge cryptography for enhanced security and privacy.
The [mxc-geth](https://github.com/MXCzkEVM/mxc-geth) repository is a customized version of [taiko-geth](https://github.com/taikoxyz/taiko-geth) tailored to integrate Moonchain's specifications. Functioning as an IoT Web3 platform, it interfaces with an LPWAN cluster as described [here](/docs/Moonchain-Design/LPWAN%20Protocol) previously. Similar to Ethereum's L1/L2 execution engines, <code>mxc-geth</code> monitors and processes new IoT transactions within the network. These transactions are ececuted on the EVM, maintaining the latest state and comprehensive database of current IoT data. Subsequently, it submits proofs using Zero-Knowledge cryptography for enhanced security and privacy.

## MXC client

Expand Down
28 changes: 14 additions & 14 deletions docs/Moonchain-Design/XSD.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ sidebar_position: 11

# Moonchain Stablecoin

MXC will be the largest Layer-3 IoT solution on Arbitrum ecosystem, bringing tremendous real-world items to NFT world and data to the blockchain. Undoubtedly each real-world item and each piece of data has its own value, and this kind of value is not from pure financial speculations, the value comes from real economy that serves our food, sports, transportation every day.
Moonchain will be the largest Layer-3 IoT solution on Arbitrum ecosystem, bringing tremendous real-world items to NFT world and data to the blockchain. Undoubtedly each real-world item and each piece of data has its own value, and this kind of value is not from pure financial speculations, the value comes from real economy that serves our food, sports, transportation every day.

MXC is going to leverage the real-world economy to build the first stable coin backed by items like Gin, Bike sensors, Nike shoes etc. Along with the tokens created on zkEVM like Ride token, Park token and MXC, BTC, the MXC stable coin has a basket ranging from NFT to tokens to back the stable coin from the real-world economy.
Moonchain is going to leverage the real-world economy to build the first stable coin backed by items like Gin, Bike sensors, Nike shoes etc. Along with the tokens created on zkEVM like Ride token, Park token and MXC. XSD - The Moonchain stable coin has a basket ranging from NFT to tokens to back the stable coin from the real-world economy.


XSD, in conjunction with MXC and ISO projects, aims to empower individuals and companies to generate and circulate XSD within their unique economic systems, supporting their specific business requirements. The objective is to transform the existing financial landscape, where the majority of stable coins and fiat currencies rely on the backing of US treasury bonds. With a staggering 30 trillion USD in US treasury bonds and only 4 trillion in gold and other reserves held by the US Treasury and Federal Reserve, this initiative seeks to establish a more decentralized and diverse foundation for global financial systems.
XSD, in conjunction with Moonchain and ISO projects, aims to empower individuals and companies to generate and circulate XSD within their unique economic systems, supporting their specific business requirements. The objective is to transform the existing financial landscape, where the majority of stable coins and fiat currencies rely on the backing of US treasury bonds. With a staggering 30 trillion USD in US treasury bonds and only 4 trillion in gold and other reserves held by the US Treasury and Federal Reserve, this initiative seeks to establish a more decentralized and diverse foundation for global financial systems.



As IoT [Swap](https://swap.mxc.com/) shows, the IoT tokens like Ride token would be the major applications that use MXC network and ISO projects to build their own data economy. These Ride and Park token can be swapped in MXC Swap conveniently, through XSD trading pair. XSD will be the first IoT stable coin that are backed by real-world assets and data values, meanwhile serving for the digital and real-world economy.
As IoT [Swap](https://swap.mxc.com/) shows, the IoT tokens like Ride token would be the major applications that use Moonchain network and ISO projects to build their own data economy. These Ride and Park token can be swapped in Moonchain Swap conveniently, through XSD trading pair. XSD will be the first IoT stable coin that are backed by real-world assets and data values, meanwhile serving for the digital and real-world economy.

MXProtocol design and its ecosystem both are aimed for validating the XSD stable coin,which is pegged to US dollars at start in 1:2 manner. Along with the NFC, LoraWAN and Satellite technologies, users are able to verify and validate the value of XSD are backed by collateral like Gin 1689 NFTs, and MXC/DG/Ride tokens.
Moonchain's design and its ecosystem both are aimed for validating the XSD stable coin,which is pegged to US dollars at start in 1:2 manner. Along with the NFC, LoraWAN and Satellite technologies, users are able to verify and validate the value of XSD are backed by collateral like Gin 1689 NFTs, and MXC/DG/Ride tokens.

IoT NFTs need to reach a minimal IoT NFT transactions, in the initial roll-out is three transactions in order to become a collateral. This is to raise the attacking cost to enter the XSD mint basket.

Expand Down Expand Up @@ -56,17 +56,17 @@ In this case, the users will try to redeem one Gin 1689 NFT to get 100USD worth


## Insurance
The goal of XSD and MXC is to enable every person/company to create XSD and circulate in their own economy to support their business logic, eventually it is to change the current situation that all the stable coins and Fiat currencies are backed by US treasury bonds, while US treasury bonds are like 30 trillion USD and US treasury and Fed Reserve only got 4 trillion gold or other reserves.
The goal of Moonchain and XSD is to enable every person/company to create XSD and circulate in their own economy to support their business logic, eventually it is to change the current situation that all the stable coins and Fiat currencies are backed by US treasury bonds, while US treasury bonds are like 30 trillion USD and US treasury and Fed Reserve only got 4 trillion gold or other reserves.

We need to peg this world better with the assets created by people and used by people. Also we need to deal with systematic risks if the de-peg happens. Central banks proposes to print more money to solve the problem. MXC DAO proposes that we should add a 10% insurance on the top of the every XSD mint to deal with the systematic risks.
We need to peg this world better with the assets created by people and used by people. Also we need to deal with systematic risks if the de-peg happens. Central banks proposes to print more money to solve the problem. Moonchain DAO proposes that we should add a 10% insurance on the top of the every XSD mint to deal with the systematic risks.

This 10% insurance can be paid every year to make sure even if the depeg happened like the collateral is gone or the overall overall collateral price is reduced due to a certain black swan event.

The insurance should be an option at the end of the minting process.

## XSD exchange rate with USD

When the XSD economy is getting bigger and bigger, the MXC DAO should see the 1:2 exchange rate will fluctuate due to the demand of XSD is higher than USD and people lose trust in USD.
When the XSD economy is getting bigger and bigger, the Moonchain DAO should see the 1:2 exchange rate will fluctuate due to the demand of XSD is higher than USD and people lose trust in USD.

This is due to the volatility of the Fed Reserve to create more balance sheet and run-off the balance sheet without any anchor, XSD holder should aim for a certain development that the unit price of the collateral like watch, shoes, wines are defined by the unit of a XSD and no longer will be a USD.

Expand All @@ -77,7 +77,7 @@ Every time the XSD is mint will need to follow the most updated conversion rate
:::

## Lending use cases
It is expected that people will borrow XSD and lend XSD to generate stable APY, there are a lot of similar lending protocols like AAVE will move to MXC zkEVM to enable XSD economy active.
It is expected that people will borrow XSD and lend XSD to generate stable APY, there are a lot of similar lending protocols like AAVE will move to Moonchain zkEVM to enable XSD economy active.

## Use case of XSD

Expand All @@ -93,9 +93,9 @@ This chapter introduces XSD minting: a peer-to-peer perpetual lending protocol t

XSD mint matches users who want to borrow against their real-world collateral with whatever lender is willing to offer the most competitive rate, using a sophisticated off-chain offer protocol.

By default, XSD mint loans have fixed rates **(0% interest rate)** and never expire. Borrowers can repay at any time, while XSD mint won't exit. Howevery, MXC DAO can trigger a referedum to exit any positions by triggering a Dutch auction to find a new lender at a new rate. If that auction fails, the borrower is liquidated and the XSD mint takes possession of the collateral.
By default, XSD mint loans have fixed rates **(0% interest rate)** and never expire. Borrowers can repay at any time, while XSD mint won't exit. Howevery, Moonchain DAO can trigger a referedum to exit any positions by triggering a Dutch auction to find a new lender at a new rate. If that auction fails, the borrower is liquidated and the XSD mint takes possession of the collateral.

XSD mint has been implemented by MXC Core Contributors. In their implementation, some protocol parameters, such as protocol fees, are controlled by MXC DAO governance.
XSD mint has been implemented by Moonchain Core Contributors. In their implementation, some protocol parameters, such as protocol fees, are controlled by Moonchain DAO governance.

## No Oracles

Expand Down Expand Up @@ -156,7 +156,7 @@ Once the auction hits some defined max rate (like 1000%) without letting XSD min

Also the insurance in this case should repay the difference amounts to the borrower if the liquidation is faield.

Except for MXC DAO referendum can trigger a liquidation event, borrower usually won't repay if the interest rate is 0% or even in some cases can be below 0%.
Except for Moonchain DAO referendum can trigger a liquidation event, borrower usually won't repay if the interest rate is 0% or even in some cases can be below 0%.


## Optimistic Auctions
Expand All @@ -178,7 +178,7 @@ This lets us drop the concept of expiration times and loan periods. By default,

A borrower can repay at any time. If a borrower wants to change the amount they have borrowed or get a better interest rate, they can atomically take out a new loan against the collateral and use the new principal to repay the old loan.

If a referendum in MXC DAO wants to get out of a certain XSD mint loan, they can trigger a refinancing auction, as discussed above. All timelines and deadlines during refinancing events can be defined relative to the time the refinancing was initiated.
If a referendum in Moonchain DAO wants to get out of a certain XSD mint loan, they can trigger a refinancing auction, as discussed above. All timelines and deadlines during refinancing events can be defined relative to the time the refinancing was initiated.

Alternatively, if the interest rate is adjusted by the XSD mint, the current lend can skip the auction by submitting the other offer to the vault to get out of their loan.

Expand All @@ -198,4 +198,4 @@ XSD mint basket: The selection of the Sensor Tokens and IoT NFTs that can use to

Minimal IoT NFT transactions: The minimal trading transactions that an IoT NFT can be used as a collateral.

In MXC's implementation of XSD, after a 180-day waiting period, these parameters can be managed by MXC governance to ensure optimal performance and adapt to changing market conditions in a decentralized way.
In MXC's implementation of XSD, after a 180-day waiting period, these parameters can be managed by Moonchain governance to ensure optimal performance and adapt to changing market conditions in a decentralized way.
1 change: 0 additions & 1 deletion docs/Testnet-Tutorials/Deploying-A-Contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ This guide will help you deploy a smart contract on Moonchain (Geneva Testnet) u
- You have the private key handy to an account that has `Test $MXC Tokens` on Moonchain Geneva (to pay the transaction fee for deploying the contract).
- [Retrieve the private key with MetaMask](https://support.metamask.io/managing-my-wallet/secret-recovery-phrase-and-private-keys/how-to-export-an-accounts-private-key/).
- [Generate wallet keys with OpenSSL](https://gist.github.com/miguelmota/3793b160992b4ea0b616497b8e5aee2f).
- [Generate wallet keys with ethereumjs-wallet](https://piyopiyo.medium.com/how-to-generate-ethereum-private-key-and-address-in-local-offline-environment-90294308593c).
- Have some Test $MXC Tokens on Moonchain Geneva:
- [Request Test $MXC Tokens](/docs/Testnet-Tutorials/Moonchain-Faucet) from the faucet.

Expand Down
32 changes: 16 additions & 16 deletions docs/Testnet-Tutorials/Run-Moonchain-Supernode.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import GrafanaDashboard from '/img/GrafanaDashboard.png';

# Running a Moonchain Supernode
# Running a Moonchain supernode

## Operating a Moonchain Supernode with simple-mxc-node
## Operating a Moonchain supernode with simple-mxc-node
This guide will walk you through the process of operating a Moonchain supernode using simple-mxc-node.
By following these steps, you will be able to:
- Run a Moonchain supernode easily from the command line on Windows, Mac, and Linux.
Expand Down Expand Up @@ -86,41 +86,41 @@ You can get an Arbitrum L1 endpoint from various providers such as:
Make sure you select the RPC as **Arbitrum Sepolia Testnet**, and not the Ethereum Mainnet.
:::

### Set Permissions and Create Folders
### Defining authorizations and creating folders
Create the necessary directories and set the permissions so that the Docker containers can access and write to them:

```sh
mkdir -p ./data/l2_execution_engine_data ./data/zkevm_chain_prover_rpcd_data ./data/prometheus_data ./data/grafana_data ./docker/prometheus ./docker/grafana/custom
sudo chmod -R 777 ./data ./docker
```

### Enable your Supernode as a Prover (optional)
### Enable your supernode as a prover (optional)

For more detailed information, please see [Enable a prover](./Enable-a-Prover).

:::important[NOTE]
Synchronizing from the genesis block may take some time. You can monitor this progress through logs or by using the local Grafana Dashboard. Additionally, you can check the latest L2 chain status in the [MXC Geneva Block Explorer](https://geneva-explorer.moonchain.com/).
Synchronizing from the genesis block may take some time. You can monitor this progress through logs or by using the local Grafana Dashboard. Additionally, you can check the latest L2 chain status in the [Moonchain Geneva Block Explorer](https://geneva-explorer.moonchain.com/).
:::

**1. Ensure Docker is Running**: Make sure that the Docker is installed an actively running on your system.
**1. Ensure Docker is running**: Make sure that the Docker is installed an actively running on your system.

**2. Run the following command to start the Supernode**:
**2. Run the following command to start the supernode**:
```sh
docker compose up
```
**3. Run the Supernode in the Background (Detached Mode)**: If you prefer to run the supernode in the background, add the `-d` flag to the command:
**3. Run the supernode in the background (Detached Mode)**: If you prefer to run the supernode in the background, add the `-d` flag to the command:

```sh
docker compose up -d
```

### Stopping a Supernode
### Stopping a supernode
To shut down the supernode while retaining all volumes (so it won't need to synchronize from the genesis block again upon restart), use the following command:
```sh
docker compose down
```

### Removing a Supernode
### Removing a supernode
To completely remove the supernode, including all volumes used by each container, execute the following commands:

**1. Stop and remove containers along with volumes**:
Expand All @@ -132,13 +132,13 @@ docker compose down -v
rm -f .env
```

### Updating a Supernode
### Updating a supernode
To update the simple-mxc-supernode Docker images, use the following command:
```sh
docker compose pull
```

### Viewing the Supernode's Logs
### Viewing the supernode's Logs
To monitor and view logs from the Docker containers, use the following commands:

**1. View all logs**:
Expand All @@ -154,7 +154,7 @@ docker compose logs -f mxc_client_prover_relayer
docker compose logs -f l2_execution_engine
```

### Viewing Live Data Streams of Your Running Containers
### View live data streams of your running containers
To see the CPU and memory usage percentage, as well as the resource consumption of your machine, use the following command:

```sh
Expand All @@ -165,7 +165,7 @@ For displaying statistics for all containers, add the prefix `-a` :
docker stats -a
```

### View the Supernode's Status Dashboard
### View the supernode's status dashboard

To view the Supernode's Status Dashboard, which utilizes Grafana with a Prometheus datasource, follow these steps:

Expand All @@ -174,11 +174,11 @@ Open your web browser and navigate to the following URL:
```
http://localhost:3000/d/L2ExecutionEngine/l2-execution-engine-overview?orgId=1&refresh=10s
```
**2. Dashboard Details**:
**2. Dashboard details**:
- This URL points directly to the Grafana dashboard designed for monitoring the L2 execution engine's real-time status.
- It uses Prometheus as the datasource, providing comprehensive insights into the performance and metrics of your supernode.

**3. Monitor in Real Time**:
**3. Monitor in real time**:

The dashboard will update automatically every 10 seconds `(refresh=10s parameter in the URL)`.
You can customize the dashboard views and metrics as needed using Grafana's features.
Expand Down

0 comments on commit c918a68

Please sign in to comment.