-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⭐️ StarGateway #720
Comments
GoalThe goal of the StarGateway is a gateway where message transfer is cheaper than with the current EIP20 gateway -- without a reduction in security. Why a new gatewayThe options were to
Updating the current gateway would lead to a situation where there are different versions of the The downside of option 1 is so big, that we decided to go with option 2. The main challenge of this option is to keep the number of different gateway implementations minimal so they remain maintainable. We believe there is a bigger natural mental hurdle to creating new contracts as to updating existing contracts with interface-breaking changes. DesignDesign decisions for a simpler, cheaper gateway based on a security analysis. SecuritySecurity assumptions based on the current state of 💠Mosaic:
Reasoning of the EIP20 gateway: There are two ways of transferring messages with an EIP20 gateway:
The reason for the 4-step process was originally to be able to revert the decision to stake or unstake. In order to revert, auxiliary must still be alive so that the "revert intent" can be confirmed on auxiliary. Otherwise, a revert can not be carried out. The hashlock option was introduced to make message transfer cheaper, as it requires much fewer MerklePatricia proofs. In case auxiliary halts, it can halt at any stage of the process:
SimplicityGranted the hash lock procedure's use-case is making the 4-step process cheaper, we claim that if we solve for an easier general process, we do not need a hash lock procedure at all. Therefore, we will not discuss the hash lock procedure from here on out and instead assume it doesn't exist. It won't be required as shown below. Instead, we will focus on the improvement of the general staking (and unstaking) process. The StarGateway would work as follows:
After 1., the value is immediately locked on origin like it would after step 3 of the original process. After 2., the value is immediately minted and granted on auxiliary like it would after step 4 of the original process. General security after the change: In case auxiliary halts:
Inability to revert: The ability to revert is gone. However, we do not see any benefit in having a reversion in the first place. The staker (redeemer) either wants to stake (redeem), or not. If not, then don't stake (redeem). BenefitsThis section is brief, but the mentioned benefits are very, very big in our opinion. Staking (and redeeming) is cheaper. It only requires one stake (redeem) message and 2 MerklePatricia proofs. No bounty. Any facilitator completes the process by proving the source on target. Therefore it is not required to lock-in any bounty. Less front-running. Since proof only requires public knowledge, front-running by repeating the secret reveal is not possible. It is also no longer possible to steal the bounty. Open set of facilitators. Since there is no bounty and no hash lock, any facilitator can pick up any stake or redeem message. |
This main section will be updated based on the discussion below.
The text was updated successfully, but these errors were encountered: