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

the buyer hasn't any incentive to pay the seller #27

Closed
n1c01a5 opened this issue Mar 19, 2018 · 10 comments
Closed

the buyer hasn't any incentive to pay the seller #27

n1c01a5 opened this issue Mar 19, 2018 · 10 comments

Comments

@n1c01a5
Copy link
Contributor

n1c01a5 commented Mar 19, 2018

for the arbitrable payment https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/ArbitrableTransaction.sol the buyer hasen't any incentive to pay the seller (except maybe to keep good relationship with him) in contrary because it costs gas. So the seller must do always raise a dispute and do a timeout request, 2 txs.
I propose to solve it the buyer makes a deposit and if he doesn't pay the seller in this case, he looses it.
An another one would be to make payment automatic if no challenge within a defined period of time with action callback (alarm clock).

@clesaege
Copy link
Member

We can make a smart contract implementing that with a 1 contract- multiple transactions in order not to redeploy every times.

@n1c01a5
Copy link
Contributor Author

n1c01a5 commented Mar 19, 2018

@epiqueras proposes to add a timeoutTrade with a withdraw() function and a deposit to pay the gas to solve this issue
The withdraw() method can be called by the seller when the timeoutTrade is out and he gets the deposit gas from the buyer

@epiqueras
Copy link
Contributor

epiqueras commented Mar 19, 2018

I think we can get rid of pay() since the buyer will never have an incentive to pay before the timeout unless we penalize him. But, why penalize and make the code more complex if we can just have the seller withdraw, and have him take the gas he will spend on withdrawing into account when setting the price of the transaction.

This means we only need to remove pay(), add withdraw() onlySeller ifPastTimeout ifNotDisputed, and change the contract so it supports multiple transactions (no redeploy), and make the seller initialize transactions instead of the buyer, because he is the one who should decide the timeout.

struct Transaction {
  address seller;
  address buyer;
  uint256 amount;
  uint256 timeout;
  bool disputed;
}

Transaction[] transactions;

What do you think? @clesaege

@clesaege
Copy link
Member

@epiqueras @n1c01a5 Being nice is sometimes an incentive, also for repeated business.
I don't think the buyer should deposit gas, that increases complexity.

For the other comments yeah, it's not really a change, it's a whole new contract :)

@epiqueras
Copy link
Contributor

@clesaege So you are ok with the seller being able to withdraw the money after the timeout?

@clesaege
Copy link
Member

clesaege commented Mar 20, 2018

@epiqueras If not disputed yeah.

eburgos added a commit to eburgos/kleros-interaction that referenced this issue Apr 9, 2018
…trableTransaction.

Implement withdraw function, remove pay function according to kleros#27
@eburgos
Copy link
Contributor

eburgos commented Apr 9, 2018

Hi, regarding this issue. Please review #32 . I'm curious about if I solved it or I messed it up 🤣

Regards,

clesaege added a commit that referenced this issue Jun 29, 2018
Added MultipleArbitrableTransaction.sol and fixed issue #27
@clesaege
Copy link
Member

Yeah, here there is a timeout so if the payer does not do anything, the transaction is processed.

@clesaege
Copy link
Member

In the multiple it works due to timeouts.

@epiqueras
Copy link
Contributor

epiqueras commented Jul 27, 2018 via email

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

No branches or pull requests

4 participants