Skip to content

Commit 613470c

Browse files
committed
update readme
1 parent 5477ca9 commit 613470c

File tree

1 file changed

+14
-158
lines changed

1 file changed

+14
-158
lines changed

README.md

+14-158
Original file line numberDiff line numberDiff line change
@@ -22,82 +22,30 @@
2222
<!-- TOC -->
2323

2424
- [1. Introduction](#1-introduction)
25-
- [2. Overview](#2-overview)
26-
- [2.1. aUSD and the Honzon stablecoin protocol](#21-ausd-and-the-honzon-stablecoin-protocol)
27-
- [2.2. Acala Network Economic Model](#22-acala-network-economic-model)
28-
- [3. Building](#3-building)
25+
- [2. Building](#2-building)
2926
- [NOTE](#note)
30-
- [4. Run](#4-run)
31-
- [5. Development](#5-development)
32-
- [6. Bug Bounty :bug:](#6-bug-bounty-bug)
33-
- [7. Bench Bot](#7-bench-bot)
27+
- [3. Run](#3-run)
28+
- [4. Development](#4-development)
29+
- [5. Bug Bounty :bug:](#5-bug-bounty-bug)
30+
- [6. Bench Bot](#6-bench-bot)
3431
- [Generate module weights](#generate-module-weights)
3532
- [Generate runtime weights](#generate-runtime-weights)
3633
- [Bench Acala EVM+](#bench-acala-evm)
37-
- [8. Migration testing runtime](#8-migration-testing-runtime)
34+
- [7. Migration testing runtime](#7-migration-testing-runtime)
3835
- [Try testing runtime](#try-testing-runtime)
39-
- [9. Run local testnet with parachain-launch](#9-run-local-testnet-with-parachain-launch)
40-
- [10. Build For Release](#10-build-for-release)
41-
- [11. Setup Local EVM+ Test Environment](#11-setup-local-evm-test-environment)
42-
- [Setting up local node](#setting-up-local-node)
43-
- [Compile the node from source code:](#compile-the-node-from-source-code)
44-
- [Run node using docker:](#run-node-using-docker)
45-
- [Setting up eth-rpc-adapter](#setting-up-eth-rpc-adapter)
4636

4737
<!-- /TOC -->
4838

4939
# 1. Introduction
5040
This project is initiated and facilitated by the Acala Foundation. Acala Foundation nurtures applications in the fields of decentralized finance protocols, particularly those that serve as open finance infrastructures such as stable currency and staking liquidity. The Acala Foundation is founded by [Laminar](https://laminar.one/) and [Polkawallet](https://polkawallet.io/), participants and contributors to the Polkadot ecosystem. The Acala Foundation welcomes more industry participants as it progresses.
5141

52-
# 2. Overview
53-
The significance of cross-chain communication to the blockchain is like that of the internet to the intranet. Polkadot empowers a network of public, consortium and private blockchains, and enables true interoperability, economic and transactional scalability. A cross-chain stablecoin system will:
54-
1. Create a sound, stable currency for low cost, borderless value transfer for all chains in the network
55-
2. Enable commercial lending with predictable risk
56-
3. Serve as a building block for more open finance services
57-
58-
The Acala Dollar stablecoin (ticker: aUSD) is a multi-collateral-backed cryptocurrency, with value stable against US Dollar (aka. 1:1 aUSD to USD soft peg). It is completely decentralized, that it can be created using assets from blockchains connected to the Polkadot network including Ethereum and Bitcoin as collaterals, and can be used by any chains (or digital jurisdictions) within the Polkadot network and applications on those chains.
59-
60-
By this nature, it is essential that the Acala Network eventually become community-owned with an economic model that can sustain its development and participation in the Polkadot network, as well as ensure its stability and security. The following section will provide a high-level overview of the following topics:
61-
- aUSD and the Honzon stablecoin protocol
62-
- the economic model and initial parachain offering
63-
64-
## 2.1. aUSD and the Honzon stablecoin protocol
65-
Every aUSD is backed in excess by a crypto asset, the mechanism of which is known as an over-collateralized debt position (or CDP). Together with a set of incentives, supply & demand balancing, and risk management mechanisms, as the core components of the Honzon stablecoin protocol on the Acala Network, the stability of the aUSD is ensured. The CDP mechanism design is inspired by the first decentralized stablecoin project MakerDAO, which has become the DeFi building block in the Ethereum ecosystem. Besides, the Honzon protocol enables many unique features - native multi-asset support, cross-chain stablecoin capability, automatic liquidation to increase responsiveness to risk, and pluggable oracle and auction house to improve modularity, just to name a few.
66-
67-
The Honzon protocol contains the following components
68-
- Multi Collateral Type
69-
- Collateral Adapter
70-
- Oracle and Prices
71-
- Auction and Auction Manager
72-
- CDP and CDP Engine
73-
- Emergency shutdown
74-
- Governance
75-
- Honzon as an interface to other components
76-
77-
Note: This section is still work in progress, we will update more information as we progress. Refer to the [Github Wiki](https://github.com/AcalaNetwork/Acala/wiki) for more details.
78-
79-
## 2.2. Acala Network Economic Model
80-
The Acala Network Token (ACA) features the following utilities, and the value of ACA token will accrue with the increased usage of the network and revenue from stability fees and liquidation penalties
81-
1. As Network Utility Token: to pay for network fees and stability fees
82-
2. As Governance Token: to vote for/against risk parameters and network change proposals
83-
3. As Economic Capital: in case of liquidation without sufficient collaterals
84-
85-
To enable cross-chain functionality, the Acala Network will connect to the Polkadot in one of the three ways:
86-
1. as parathread - pay-as-you-go connection to Polkadot
87-
2. as parachain - permanent connection for a given period
88-
3. as an independent chain with a bridge back to Polkadot
89-
90-
Becoming a parachain would be an ideal option to bootstrap the Acala Network, and maximize its benefits and reach to other chains and applications on the Polkadot network. To secure a parachain slot, the Acala Network will require supportive DOT holders to lock their DOTs to bid for a slot collectively - a process known as the Initial Parachain Offering (IPO). ACA tokens will be offered as a reward for those who participated in the IPO, as compensation for their opportunity cost of staking the DOTs.
91-
92-
Note: This section is still work in progress, we will update more information as we progress. Refer to the [token economy working paper](https://github.com/AcalaNetwork/Acala-white-paper) for more details.
93-
94-
# 3. Building
42+
# 2. Building
9543

9644
## NOTE
9745

98-
To connect on the "Mandala TC6" network, you will want the version `~0.7.10` code which is in this repo.
46+
The Acala client node is moved to [acala-node](https://github.com/AcalaNetwork/acala-node). This repo only contains the runtime code. This allow us to decouple the runtime release and client node release.
9947

100-
- **Mandala TC6** is in [Acala repo master branch](https://github.com/AcalaNetwork/Acala/tree/master/).
48+
If you would like to build the client node, please refer to [acala-node](https://github.com/AcalaNetwork/acala-node).
10149

10250
Install Rust:
10351

@@ -123,21 +71,15 @@ Install required tools and install git hooks:
12371
make init
12472
```
12573

126-
Build Mandala TC native code:
127-
128-
```bash
129-
make build-full
130-
```
131-
132-
# 4. Run
74+
# 3. Run
13375

13476
You can start a development chain with:
13577

13678
```bash
13779
make run
13880
```
13981

140-
# 5. Development
82+
# 4. Development
14183

14284
To type check:
14385

@@ -163,14 +105,12 @@ Update ORML
163105
make update
164106
```
165107

166-
__Note:__ All build command from Makefile are designed for local development purposes and hence have `SKIP_WASM_BUILD` enabled to speed up build time and use `--execution native` to only run use native execution mode.
167-
168-
# 6. Bug Bounty :bug:
108+
# 5. Bug Bounty :bug:
169109

170110
The Bug Bounty Program includes only on-chain vulnerabilities that can lead to significant economic loss or instability of the network. You check details of the Bug Bounty or Submit a vulnerability here:
171111
https://immunefi.com/bounty/acala/
172112

173-
# 7. Bench Bot
113+
# 6. Bench Bot
174114
Bench bot can take care of syncing branch with `master` and generating WeightInfos for module or runtime.
175115

176116
## Generate module weights
@@ -191,8 +131,7 @@ Bench bot will do the benchmarking, generate weights file and push changes into
191131

192132
Comment on a PR `/bench evm` to benchmark Acala EVM+ and bench bot will generate precompile weights and GasToWeight ratio.
193133

194-
195-
# 8. Migration testing runtime
134+
# 7. Migration testing runtime
196135
If modifying the storage, you should test the data migration before upgrading the runtime.
197136

198137
## Try testing runtime
@@ -226,86 +165,3 @@ cargo run --features with-acala-runtime --features try-runtime -- try-runtime --
226165
# Use a state snapshot to run the migration test.
227166
./target/release/acala try-runtime --runtime ./target/release/wbuild/acala-runtime/acala_runtime.compact.compressed.wasm --chain=acala-dev on-runtime-upgrade snap -s acala-latest.snap
228167
```
229-
230-
# 9. Run local testnet with [parachain-launch](https://github.com/open-web3-stack/parachain-launch)
231-
Build RelayChain and Parachain local testnet to develop.
232-
233-
```bash
234-
cd launch
235-
236-
# install dependencies
237-
yarn
238-
239-
# generate docker-compose.yml and genesis
240-
# NOTE: If the docker image is not the latest, need to download it manually.
241-
# e.g.: docker pull acala/karura-node:latest
242-
# karura testnet:
243-
yarn start generate
244-
# karura-bifrost testnet:
245-
yarn start generate --config=karura-bifrost.yml
246-
247-
# start relaychain and parachain
248-
cd output
249-
# NOTE: If regenerate the output directory, need to rebuild the images.
250-
docker-compose up -d --build
251-
252-
# list all of the containers.
253-
docker ps -a
254-
255-
# track container logs
256-
docker logs -f [container_id/container_name]
257-
258-
# stop all of the containers.
259-
docker-compose stop
260-
261-
# remove all of the containers.
262-
docker-compose rm
263-
264-
# NOTE: If you want to clear the data and restart, you need to clear the volumes.
265-
# remove volume
266-
docker volume ls
267-
docker volume rm [volume_name]
268-
# prune all volumes
269-
docker volume prune
270-
```
271-
272-
# 10. Build For Release
273-
274-
For release artifacts, a more optimized build config is used.
275-
This config takes around 2x to 3x longer to build, but produces a more optimized binary to run.
276-
277-
```bash
278-
make build-release
279-
```
280-
281-
# 11. Setup Local EVM+ Test Environment
282-
283-
To set up a basic local network you need two things running locally, a node and the eth-rpc-adapter. Setup each service in their respective terminals and then you are free to use your favorite EVM tools locally! (ex: hardhat)
284-
285-
## Setting up local node
286-
287-
#### Compile the node from source code:
288-
289-
```bash
290-
make run
291-
```
292-
293-
Note: You may need normal block production for certain workflow, use command below to run node without instant-sealing flag
294-
295-
```bash
296-
cargo run --features with-mandala-runtime -- --dev -lruntime=debug
297-
```
298-
299-
#### Run node using docker:
300-
301-
```bash
302-
docker run -it --rm -p 9944:9944 -p 9933:9933 ghcr.io/acalanetwork/mandala-node:master --dev --ws-external --rpc-port=9933 --rpc-external --rpc-cors=all --rpc-methods=unsafe --tmp -levm=debug --instant-sealing
303-
```
304-
305-
## Setting up eth-rpc-adapter
306-
307-
```bash
308-
npx @acala-network/eth-rpc-adapter -l 1
309-
```
310-
311-
Note: If your use case needs `eth_getLogs` rpc call, then you need to have a subquery instance to index the local chain. For this case, follow the tutorial found here: [Local Network Tutorial](https://evmdocs.acala.network/network/network-setup/local-development-network)

0 commit comments

Comments
 (0)