Ethereum Sidechain (ES) is an Echo extension that implements the gateway between the Echo and Ethereum blockchains. The extension allows to use Ethereum currency and its ERC20 tokens within the Echo blockchain, as well as to withdraw them out of the Echo network back to the Ethereum network.
The functionality is implemented by freezing the assets on the corresponding contract of the Ethereum side and by activating the corresponding amount of funds on the Echo side (for depositing Echo assets) and the reverse process for withdrawing the funds back to the Ethereum network.
The members of the Echo network committee are the intermediaries that implement the connection of the two blockchains. The main gateway element is the Solidity contract in the Ethereum network, that is responsible for generating wallet addresses and for the processing of incoming and outgoing payments.
For any action on funds depositing or withdrawing the user must create an account and request a wallet address first:
the gateway supports only the ERC20 tokens whose addresses have been submitted for the support. The mechanism is described below
approveERC20 method of the token, specifying the amount to be withdrawn. Then call the
withdrawmethod of the service contract, indicating the token, the amount and the address in the Ethereum network to which the tokens should be withdrawn. This step implies the presence of two operations that can be running on the background of the application, which allows the user to perform them by specifying only the amount of funds and the output address
Main Sections of the Protocol
The address creation includes 3 steps:
sidechain_create_address operation, the user notifies the
network about the intention to receive an Ethereum wallet address
eth_receive_address. This operation is a sidechain type operation (an
Ethereum sidechain in this case).
To provide an opportunity to use Sidechain without having a balance in the Echo network creation of a
sidechain_create_addressoperation is commission-free, however the user can call the operation for an account only once
Committee members are subscribed to the
of operations. When requesting an address, a committee member selected
with VRF sends a request to the Ethereum network (calls the Ethereum
contract) to create a wallet address linked to the account in the Echo
Calling the contract creates an event on the Ethereum side with information about the new address. Each member of the committee catches this event in the Ethereum network and creates a corresponding operation on the Echo network.
eth_receive_address will already be created after the very
first message from one of the committee members and can be used then for
the balance replenishment. However, the users are advised not to use the
address until it receives confirmation from
3/2 n + 1 of the committee members,
where 'n' is the number of active members of the committee. This
restriction is only a recommendation and does not limit the use of the
address at the protocol level in any way.
As a result of the Ethereum assets transfer to
the contract creates an event in the Ethereum network. This event is
processed by all members of the committee, and each of them also creates
an operation with information about the deposit of funds in the Echo
3/2 n + 1 of the committee members send a message about
funds admission, the funds will be credited to the corresponding Echo
The result of depositing Ethereum into the Echo network is the availability of the eETH balance on the account in the Echo network.
ERC20 is a Solidity contract standard that involves methods for obtaining an account balance and assets transfer. In the Echo network, it is represented by a similar type of contract.
The transfer of ERC20 tokens to the Echo network is implemented in the following way:
eth_receive_addressin the Ethereum network
First of all, the potential owner of a token contract on the Ethereum
side should activate the ability to use its tokens on the Echo side. To
do this, call the
sidechain_create_token operation. In the operation,
specify the ERC20 contract address in the Ethereum network. The
operation has a non-zero commission.
As a result of this operation, the committee members make a request for
a contract with the specified address in the Ethereum network, verify it
for compliance with the ERC20 interface (the contract must contain all
methods and events included in the ERC20 standard). Each of the
participants sends feed with information about the contract to the Echo
network and upon receiving the feed from
3/2 n + 1 of the committee
members the Echo network generates a mintable ERC20 token. Only the
committee account has the right to issue this type of tokens.
The contract address in the Ethereum network gets tied to the contract ID in the Echo network.
sidechain_create_token operations with the identical
contract address are not processed by the committee members.
For reimbursement of the ERC20 tokens withdrawal costs, the token contract on the Echo side must have a non-zero fee pool balance. Any account can replenish this balance. The withdrawal of ERC20 tokens to the Ethereum network will be possible only if there is a sufficient balance on the fee pool to cover the costs of the withdrawal transaction.
When the contract bundle is added, as it is described above, the
committee members start monitoring all the
Transfer events of the
contract in the Ethereum network. When a new
Transfer event arrives
all the committee members start feeding information about the event to
the Echo network. The recipient of such an event is one of the
eth_receive_address of the Echo network. On receiving feed from
\+ 1 of the committee members (n behalf of the committee account) a
previously linked ERC20 contract s called with a request to mint the
required number of tokens for the account tied to
The result of depositing an ERC20 token into the Echo network is s the availability of the corresponding ERC20 token on the account in the Echo network.
Transfer of eETH with the specified recipient of the following format
0x00000000000000000000000000000000000000 will be perceived by the
network as a withdrawal of ETH to the Ethereum network.
On receiving a block with an eETH withdrawal operation each member of the committee forms a signature that includes a withdrawal ID, the amount of funds, the recipient address, and the sender's ID. The signature is sent to the Echo network by the corresponding 'sidechain_propose_signature' operation.
On receiving the required number of signatures
(3/2 n + 1) the
committee member, selected through the VRF, calls the
in the Echo contract on the Ethereum side.
Calling a contract on the Ethereum side calls an event. Each committee member proxy this event into an operation of the Echo network. Upon receiving the required number of operations (3/2 n + 1) the withdrawal is considered closed. The amount of eETH that equals to the withdrawn amount gets burned.
To withdraw tokens, the user must allow the system account to transfer the required amount of funds to the user address. This is implemented by calling the 'approve' method, specifying the required funds for withdrawal and the system contract address as the recipient.
The user must call the
withdrow method of the system contract,
specifying the token address, the withdrawal amount and the address to
which the token should be withdrawn. The contract, using the
'transferFrom' method, transfers the funds to its address, and, using
the 'burn' method, burns the received tokens. Afterwards, the contract
sends an event to the network, which informs the committee members about
the need to withdraw the token.
On receiving a block with the event about the need to withdraw a token
each member of the committee forms a signature that includes the
withdrawal ID, the amount of funds, the recipient's address, the
sender's ID and the token address. The signature is sent to the Echo
network by the corresponding
When receiving the required number of signatures
(3/2 n + 1) a
committee member selected through the VRF calls the
withdraw method in
the Echo contract on the Ethereum side.
Calling a contract on the Ethereum side calls an event. Each committee
member proxy this event into an operation of the Echo network. Upon
receiving the required number of operations
(3/2 n + 1) the withdrawal
is considered closed.
Performing transactions with the creation of a new wallet address and withdrawal of funds require some ETH expenses on the side of the Ethereum network. Initially, the commission is paid by a committee member who calls the transaction in the Ethereum network.
The reimbursement occurs at the time of money withdrawal by the user. In case the user has not yet settled the debt for the creation of a new wallet address, the final withdrawal amount of Ethereum to the final address will be decreased by the cost of creating a new wallet address and the cost of the withdrawal transaction. Thus, the committee members receive the spent amount of ETH in the Ethereum network.
Considering that not all the transactions on address creation will be reimbursed, the reimbursement of expenses will be refunded partly by the percentage of the commission for the operations in the Echo network.
The commission for token withdrawal transactions is reimbursed in eETH on the Echo side by writing it off from the fee pool balance to the committee member’s balance.
To exclude situations where the address in the Ethereum network and the name of the account on the Echo side overlap, it is prohibited to create account names equal to the cryptocurrency address formats.
In order to prevent a situation in which the user transfers an asset other than eETH to an Ethereum address, this type of address allows to transfer eETH only.
Since the Ethereum side implies the possibility of forks, all events from the network must be transmitted to the Echo network with a lag of N blocks, where 'N' is a parameterized value.
Since a committee member can send an operation about a new wallet
address specifying it wrong, the network must select and save the
address that has more confirmations. A confirmed address is the one that
3/2 n + 1 votes of the committee members.
The protocol provides a predefined time slot tied to the number of blocks for which a committee member must send a transaction to the Ethereum network, while all the others receive an event about the transaction. In case when for the prespecified time interval the committee members do not receive the event, a new participant is selected to send the transaction to the network.
When a slot is skipped, a committee member finds an increment of the skipped slot. Anyone can see the information, which can become the reason for voting for another committee member.
The number of blocks of a slot is a parameterizable value.
eETH is a full-fledged asset in the Echo network, which provides the possibility to pay commission fees for operations. The fee pool of the asset is not replenished, while the commission fee paid in eETH is distributed according to the accepted protocol, similar to the distribution of the commission fees in ECHO.
The amount of the commission depends on the eETH -> ECHO exchange rate, which is set by the committee members using the feed functionality.
In order to change committee members on Echo, you need to change the public keys of the contract on Ethereum. To do this, each of the current members of the committee sends an operation on the network with their signature approving the change of members.
After 3 / 2n + 1 votes of the current participants have been added to the network, the last added committee member sends a transaction to the Ethereum network, calling the contract's ‘changeCommittee’ method.
Calling the contract creates an event on the Ethereum side with information about a new list of committee members. Each member of the committee catches this event in the Ethereum network and creates a corresponding operation on the Echo network.
The new committee member becomes active only in case the network has received 3/2 n + 1 messages about the event on the Ethereum network.
Information on how to become a member of the committee can be found in the corresponding section - Become the committee member