E

Executable Signed Messages refunded by the contract (EIP-1077 implementation)

To bring blockchain closer to consumers, by improving the user experience, developers can design the application in such a way that user can pay the gas charges in any ERC20 tokens or not pay at all.


The problem Executable Signed Messages refunded by the contract (EIP-1077 implementation) solves

[A] User pain points -

  1. Users don’t want to think about ether.
  2. Users don’t want to think about backing up private keys or seed phrases.
  3. Users want to be able to pay for transactions using what they already have on the system, be apple pay, xbox points or even a credit card.
  4. Users don’t want to sign a new transaction at every move.
  5. Users don’t want to download apps/extensions (at least on the desktop) to connect to their apps.

[B] App developer pain points -

  1. Many apps use their own token and would prefer to use those as the main accounting.
  2. Apps want to be able to have apps in multiple platforms without having to share private keys between devices or have to spend transaction costs moving funds between them.
  3. Token developers want to be able for their users to be able to move funds and pay fees in the token.
  4. While the system provides fees and incentives for miners, there are no inherent business model for wallet developers (or other apps that initiate many transactions).

Complete discussion is here -
https://eips.ethereum.org/EIPS/eip-1077

Challenges we ran into

  1. Stack too deep issues -
    In some of the functions we have 11 input paramters, 3 local variables and 2 mapping access. So any addition of local variable we were running in to this issue. To handle this we introduced a struct and passed its reference to other internal function.

  2. Gas calculation for refund -
    This is a tricky problem, we used gasleft() to find the gas used in the function, but there are some operations like transfer for refund gas and other mathematical operations that are performed after the calculations. This contributes to the gas consumption.

  3. Signature verification -
    ECRecover returned incorrect address. Debuging in solidity is hard, so we spent most of the time here to identify all the parameters that are causing this issue.

  4. Time -
    We ran out of time :)

Technologies used

Discussion