-
Notifications
You must be signed in to change notification settings - Fork 4
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
Transferring A-EUR without ETH #84
Comments
Few thoughts on first read: Terminology: I would call this concept "delegated transfer" (vs OnBehalf). Question: would you still want to collect the usual A€ token transfer fees? EIP86: have you considered how the economic model should work once EIP86 is implemented? Not sure about the parameters...
You may want to consider a delegated analog of the current |
good call, updating the post. If we go with specific then it's better. For generic (see later) how about delegatedTx ?
My initial thought is yes, collect transfer fees too. These are two separate costs: one is sending in the tx one is Augmint system costs. The fee could be indicated in the same transfer fee field or (TBD) have a new field or just emit events from the
Not really. First thought (without knowing too much about final EIP86 details): Economics and challenges are the same: someone else must pay the gas cost in ETH but the user only has A-EUR. Technically the service might not be required anymore, that could be taken over by an Augmint contract. The challenge of covering an ever changing ETH costs with A-EUR is still there it's just will need to be solved by the contract. It could just calculate A-EUR cost from published ETH/EUR rates and from current gasPrice. Source of ETH is still a question, i.e. each tx would give more system exposure to ETH/EUR rates.
It would be the service's discretion what gasPrice to actually use. E.g. user sends in tx but gasPrice has increased and/or ETH/A-EUR rate changed . The offered fee still covers the gas cost so it still worth send in with higher gasPrice. If it's a fixed price then the service wouldn't have this flexibility.
Same idea as for gasPrice. The service could decide to charge less than the max if gasPrice and/or ETH/EUR rate allows. Or it could be their biz model (e.g. it's a merchant service and they could offer to cover the tx fee). Actually we should consider the calling service being able to cover Augmint fees as well, will put some thinking in it :)
This is the idea is that the client app and the calling service would calculate the transaction cost in A-EUR on the fly based on actual ETH/EUR and gasPrice. It would be the client's calculation and decision how much are they willing to pay (and what gasPrice they request for that fee). Service then could decide if it worth submitting tx on client's behalf for that fee (and with the minGasPrice)
Agree. this is where it gets complicated (and that's what I meant by generic verifier and delegator). I'm going to elaborate / iterate on the proposal based on the above and on our discord discussions :) |
implemented in PR #89 |
multiple costs are annoying in the user point of view. |
The issue
By default a user must have ETH to execute an A-EUR transfer to cover the transaction gas cost. We consider this as a high friction for the general A-EUR users. Users should be able to spend A-EURs they received (eg. from other users, services or from an exchange in return for fiat) without jumping through the hoops of buying ETH.
Solution proposal
EIP86 in Ethereum will allow contracts to pay the gas costs and it’s planned in the Constantinople Metropolis hard fork but its release date is uncertain.
As an interim solution we could allow trustless services to send in signed transfer transactions from users. This service will submit the transaction to the network, pay the transfer tx gas costs and it will be compensated by the token contract.
The client would be able to set any maximum compensation she is willing to pay in tokens. The service would request max that amount or less, depending on its strategy.
Questions
Gas cost incurs in ETH and the gas price is set by the caller. Ideally we should compensate the Service in ETH as their gas costs are in ETH. But the user doesn't have ETH - that's the whole point of this change - so we could
Proposing option b) but any better solution?
The current thinking is to have specific delegated execution fx-s, e.g.
delegatedTransfer
Draft Flow
Implementation draft
new functions on AugmintToken contract:
and
NB:
Alternative generic implementation (scrapped)
A generic contract (
TxDelegator
?) would receive any destination contract and transaction in a generic format, such having arbitrary tx calldata signed and passed as an argument to any contract.E.g. Lock could be done with much less friction, without ETH. I.e. Buy A-EUR for fiat on an exchange, send lock tx immediately. After release the proceedings could be sent back to exchange without ETH again.
TxDelegator
would verify the signature, manage the nonces and forward the call to any contract we wish :The receiving contract would allow the corresponding function(s) (e.g.
delegatedTransfer
in case of AugmintToken) to be called only byTxDelegator
.In addition
TxDelegator
could be able to compensate in any ERC20 tokens by adding an ERC20 token contract address as parameter to the callQuestions:
The text was updated successfully, but these errors were encountered: