The propose of this document is to setup a methodology to get maxcoin blockchain linked and functional to Thorchain.
It is also important to note that since our philosophy is to be as decentralized as possible, we want to satisfy this by working with as many multiple true decentralized solutions as we can, which might include crosschain, 2nd Layers, DEXs, DEFIs and others.
Overview
- 1-way State Pegs allow syncing state from external chains
- A State Machine to coordinate asset exchange logic and delegate redemptions
- Bifröst Chain Client to convert redemptions into chain-specific transactions
- A TSS protocol to enable distributed threshold key-signing1
Requirements to operate on ThorChain
- Maxcoin wallet that integrates with Kubernetes and terraform
- Create bifrost that works with Maxcoin
- Have a testnet to also test it with the thorchain testnet
- (optional) Provide Liquidity in Maxcoin(us) and Rune(us and miners)
- (optional) Updates to wallets and some security audits by ourselfs en regards updates, maybe decentralize further
Maxcoin wallet that integrates with Kubernetes and terraform
We need and easy way to create the wallet of maxcoin (Kubernetes Image)-p1r0
THORNodes service the THORChain network, of which there is intended to be initially 99. Each THORNode is comprised of several independent servers in a cluster. All THORNodes communicate and operate in cooperation to create a cross-chain swapping network.[2]
To set up a node, you have three choices:
- Set up manually (not recommended unless you are an expert)
- Set up via Kubernetes (recommended)
- Set up via Provider (coming soon)
THORNode Stack
Each THORNode is comprised of 5 major components.2
- thornode - this is a daemon that runs the THORChain chain itself and a HTTP server, that gives a RESTful API to the chain.
- bifrost - this daemon creates connections to remote chains (like Bitcoin, Ethereum, Binance, etc) to both observe activity on those chains (incoming/outgoing transactions), and also sign/broadcast outgoing transactions (moving funds on remote chains).
- gateway : THORNode gateway proxy to get a single IP address for multiple deployments
- midgard - this daemon is a layer 2 REST API that provides front-end consumers with semi real-time rolled up data and analytics of the THORChain network. Most requests to the network will come through Midgard. This daemon is here to keep the chain itself from fielding large quantities of requests. You can think of it as a “read-only slave” to the chain. This keeps the resources of the network focused on processing transactions.
- Full nodes - for every chain that is supported by the network, each THORNode operator will run their own full node of each chain (Bitcoin, Ethereum, Binance, etc).
Terraform
Terraform is an open-source infrastructure as code software tool that provides a consistent CLI workflow to manage hundreds of cloud services. Terraform codifies cloud APIs into declarative configuration files. Follow up the instalation
Create bifrost that works with Maxcoin
We need to create our own bitfrost for maxcoin -p1r0
How THORChain works The Bifröst Protocol: 1-way State Pegs Each node has a “Bifröst” service that deals with the nuances of connecting to each chain. Once nodes are synced, they watch vault addresses. If they ever see an inbound transaction, they read it and convert it into a THORChain witness transaction. The witness transaction has the following parameters that are essentially the same for each chain, no matter the type:
1
2
3
4
5
6
7
8
9
type Tx struct {
ID TxID `json:"id"`2
Chain Chain `json:"chain"`3
FromAddress Address `json:"from_address"`4
ToAddress Address `json:"to_address"`5
Coins Coins `json:"coins"`6
Gas Gas `json:"gas"`7
Memo string `json:"memo"`8
}
THORChain processes each observed transaction and collects signers - essentially the keys of each node that reports a transaction that is 100% identical. Once a super-majority of nodes agree on a particular transaction, it moves from a pending state to a finalised state.1
1
2
3
4
5
6
7
8
type ObservedTx struct {1
Tx common.Tx `json:"tx"`2
Status status `json:"status"`3
OutHashes common.TxIDs `json:"out_hashes"` 4
BlockHeight int64 `json:"block_height"`5
Signers []sdk.AccAddress `json:"signers"` 6
ObservedPubKey common.PubKey `json:"observed_pub_key"`7
}
Have a testnet to also test it with the thorchain testnet
We might require a testnet to use also with the torchain testnet -p1r0
THORChain Connecting to THORChain How to connect to Midgard, THORNode and the base Tendermint layer. The active node IP addresses can be queried from this endpoint: https://testnet.seed.thorchain.info 3
The Network Information comes from three sources:
- MIDGARD: Consumer information relating to swaps, pools, volume. DeFi dashboards, Wallets, Exchanges will primarily interact with Midgard.
- THORNODE: Raw blockchain data relating to the THORChain state machine. THORChain block explorers will query THORChain-specific information here.
- TENDERMINT: Tendermint standard data, used by all block explorers to query for base information.
Provide Liquidity in Maxcoin(us) and Rune(us and miners) (optional)
Based on roles the offical page says the following
There are four key roles in the system4 :
- Liquidity providers who add liquidity to pools and earn fees and rewards
- Swappers who use the liquidity to swap assets ad-hoc, paying fees
- Traders who monitor pools and rebalance continually, paying fees but with the intent to earn a profit.
- Node Operators who provide a bond and are paid to secure the system
Even if the liquidity providers are set as people that might want to earn fees and rewards, we might require to set an initial liquidity provided to setup at least a base price to start. Roles -p1r0
Updates to wallets and some security audits by ourselfs en regards updates, maybe decentralize further (optional)
We might need to do updates to wallets and some security audits by ourselfs en regards updates, maybe decentralize further
We might consider rebuild another genesis block and update this lines at the code, plus adding also the dnsseed and/or some nodes -p1r0
Contact.
Developers