EIP865
オリジナル
ここでもまとめている。
問題点
Etherを持っていない人はgasを払えないためにEthereum上でトランザクションを起こすことができない。
解決策
Delegateを使う。
A: Sender of the payment
B: Recipient of the payment
D: Delegate, doing the transaction for A, and paying for the gas.
X: Amount of Token T sent from A to B
Y: Fee paid in Token T, from A to D for the transaction
T: Token to send
N: Nonce
①The user A gets a quote from the delegate D for the value of the fee Y for 1 transaction (depending on gas price + value of token in ETH).
②With their private key, the user generates {V,R,S} for the sha3 of the payload P {N,A,B,D,X,Y,T}.
③The user sends {V,R,S} and P (unhashed, unsigned) to the delegate.
④The delegate verifies that Y and D have not been altered.
⑤The delegate proceeds to submit the transaction from his account D:
T.delegatedTransfer(N,A,B,X,Y,V,R,S)
⑥The delegatedTransfer method reconstructs the sha3 H of the payload P (where T is the address of the current contract and D is the msg.sender).
⑦We can then call ecrecover(H, V, R, S), make sure that the result matches A, and if that’s the case, safely move X tokens from A to B and Y tokens from A to D.
⑧The challenge mainly resides in imitating the Non-standard Packed Mode on the client side, and obtaining the exact same sha3 as the one generated on-chain.