Skip to content
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

handle payments with no gas cost for the sender ( or refilling sender ) #21

Open
gaboesquivel opened this issue Dec 29, 2017 · 3 comments
Assignees

Comments

@gaboesquivel
Copy link
Contributor

gaboesquivel commented Dec 29, 2017

Ethereum gas is always charged to the sender and is always payed in ether.

  1. We need to find a way to relay that tx so that gas is payed by us or refill the sender address with enough gas.

    Option txRelay
    References
    - https://github.com/Decentralized-Blockchain/uport-identity/blob/develop/docs/txRelay.md
    - https://0xproject.com/ - https://github.com/0xProject/contracts/tree/master/contracts

    Option Refill
    When a user wallet address doesn't have enough ether to execute a payment in Knowledge we
    need to find a way to refill that address with just enough ether for that transaction.

  2. We need to transfer that cost to the seller or the user in form a Knowledge fee. This is also challenging, how can we get a exchange rate ? Perhaps in the form of pull oracle that always return the same exchange rate for all node for a given tx. eg. GET knowledgeapi.io/v1/exchange-rate?orderId=KNW872892LU8 . This involves risks and complexities that need to be properly assessed.

We need to SUPER careful not to open up a potential vulnerability.

@gaboesquivel gaboesquivel changed the title automatically refill ether on dry sender wallet to execute payments in KWN automatically refill ether on dry sender wallet to execute payments in KNW Dec 29, 2017
@gaboesquivel gaboesquivel changed the title automatically refill ether on dry sender wallet to execute payments in KNW handle payments with no gas cost for the sender ( or refilling sender ) Dec 29, 2017
@diestrin
Copy link
Contributor

About point 2, this is most probably going to be a back-end task, to pull the exchange rates and do all the conversions, not something the contract should care.

@diestrin
Copy link
Contributor

I also think refilling the accounts will have the worst UX, since we need to wait for the refill to be processed before doing the Knowledge tx

@gaboesquivel
Copy link
Contributor Author

Your are right, duh. Payment contract doesn't need to know the exchange rate. it simply receives the total amount. And yeah, txRelay seems the way to go so far. Refill is funky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants