swarms/ideas/150-gas-abstraction.md

93 lines
4.0 KiB
Markdown
Raw Normal View History

2018-04-07 05:24:34 +00:00
# Gas Abstraction
2018-04-07 02:13:16 +00:00
## Preamble
2018-04-07 06:22:00 +00:00
Idea: 150-gas-abstraction
2018-04-07 02:13:16 +00:00
Title: Gas Abstraction
Status: In Progress
Created: 2018-02-01
2018-04-07 05:24:34 +00:00
Requires: 145-identity
2018-04-07 06:22:00 +00:00
Replaces: 073-snt-as-gas
2018-04-07 02:13:16 +00:00
## Summary
Enable Status users to pay gas fee with any token that is valueable to society.
2018-04-07 07:11:44 +00:00
Users would sign a message request to contracts which will use user's Identity balance of selected token to refund proportional used gas to a incentivezed ETH owner to include that message in a transction.
2018-04-07 02:13:16 +00:00
## Swarm Participants
2018-04-07 06:57:28 +00:00
- Lead Contributor: Ricardo Guilherme Schmidt
- Contributor: Richard Ramos
- Contributor: Iuri Matias
- UX (Mist): Alexandre Van de Sande
2018-04-07 02:31:37 +00:00
- UX (Status):
2018-04-07 06:57:28 +00:00
2018-04-07 02:31:37 +00:00
2018-04-07 02:13:16 +00:00
## Product Overview
A barrier for user adoption to blockchain through Status would be the need of holding two tokens for paying fees, ether gas for moving the [SNT](https://etherscan.io/address/0x744d70fdbe2ba4cf95131626614a1763df805b9e#readContract) fee from user balance to decentralized service provider.
The product solve this by emulating a gas abstraction by adding "Gas Relayer Actor" in top of smart contracts as: [Identity](https://github.com/status-im/contracts/blob/73-economic-abstraction/contracts/identity/Identity.sol)[GasRelay](https://github.com/status-im/contracts/blob/73-economic-abstraction/contracts/identity/IdentityGasRelay.sol), MultiSigWallet, [SNTController](https://github.com/status-im/contracts/blob/73-economic-abstraction/contracts/status/SNTController.sol#L82) (updated from SNTPlaceHolder).
- Allows SNT holder to broadcast ethereum signed messages to anyone with ETH to validate them in the GasRelay smart contracts, and offering a refund of gas used in a gas price set in SNT.
- Whoever have ether could verify if the gas price worth the SNT gas price offered.
- This becomes a micro trade of ETH->SNT.
- Allow user to use any token they want (even ETH, or ETH stored in Identity).
### Product Description
Gas Relay node: Status Destkop extension or an independent node can include messages by making automatic transactions calls to smart contracts to earn tokens being offered as gas price refund.
Fundamental pivot.
Identity Gas Relay adaptor: include terms for accepting ethereum signed messages representing authorization to call by/for Identity owner offering a gas price refund.
Important for gas abstraction.
SNT Controller Gas Relay adaptor: include terms for accepting ethereum signed messages to IdentityGasRelay facotory and for moving the tokens from there using SNT.
Important for accounts that never held ether, just SNT.
2018-04-07 02:31:37 +00:00
Identity UX should allow user to choose what token it wants to use as gas price.
2018-04-07 02:13:16 +00:00
### Requirements & Dependancies
2018-04-07 05:24:34 +00:00
Idea [145-identity](https://github.com/status-im/ideas/pull/145) is important to seamless and safe integration of gas abstraction for any type of call.
2018-04-07 02:13:16 +00:00
Implemention of [EIP#191](https://github.com/ethereum/EIPs/issues/191) is somewhat important, specially for making signature verification slightly gas cheaper.
### Minimum Viable Product
2018-04-07 02:31:37 +00:00
Goal Date: 2018-05-15
2018-04-07 02:13:16 +00:00
Description:
2018-04-07 02:31:37 +00:00
- Users can use Identity paying gasPrice in any token.
- Users can create Identity using SNTController and paying with SNT.
- Users can earn tokens running a node that include other's messages
2018-04-07 02:13:16 +00:00
#### Identity Gas Relay
2018-04-07 02:31:37 +00:00
Goal Date: 2018-04-20
2018-04-07 02:13:16 +00:00
Description:
- Gas Relay Node that recieve whisper messages from Identity owners,
- Identity User Interface with Gas Relayed option of calls
#### SNT Gas Relayer
2018-04-07 02:31:37 +00:00
Goal Date: 2018-04-27
2018-04-07 02:13:16 +00:00
Description:
- Gas Relay Node implements watching messages for SNTController
- User interface for creating Identity+ENS register (pay gas in SNT)
- Moving SNT to other address from SNTController terms (paying gas in SNT)
2018-04-07 02:31:37 +00:00
#### UX Integration
2018-04-07 05:24:34 +00:00
2018-04-07 02:31:37 +00:00
Goal Date: 2018-05-15
Description:
- User can create Identity paying in SNT.
- User can select differnt tokens in gasPrice when using Identity.
2018-04-07 02:13:16 +00:00
## Success Metrics
Users are able to use Ethereum Virtual Machine and Status Network with only ever holding SNT.
## Supporting Role Communication
## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).