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

Mutual resolution - store proposed split on chain #704

Open
zajck opened this issue Jul 4, 2023 · 0 comments
Open

Mutual resolution - store proposed split on chain #704

zajck opened this issue Jul 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@zajck
Copy link
Member

zajck commented Jul 4, 2023

If an exchange goes into the mutual resolution phase, currently:

  • one part proposes a split, signs it and sends it to the other party
  • if the other party agrees, they call resolveDispute, pass in the split and the other's party signature. Protocol verifies the signature and if it matches, finalizes the dispute
  • if they don't agree, they can send counter-proposals, until they agree or escalate the dispute

The main drawbacks of this approach are:

  • if one party makes a mistake in their proposal (or they simply change their mind), they cannot cancel the already signed and sent proposal
  • if the communication channel between parties becomes unavailable, they need to recreate the proposals

Recommendation

Instead of sending a proposal directly to another party, publish it directly in the protocol. This way, the proposal will stay available regardless of the communication channel. And by submitting another proposal, one can easily overwrite the old one and correct mistakes.

The dispute is resolved once both parties submit non-conflicting proposals, i.e. buyer's minimal buyer split percentage is less than or equal to the seller's maximal buyer split percentage. The last proposal that is submitted becomes an effective one. Some examples:

  • Example 1: the buyer proposes 15% to the buyer and the seller afterwards proposes 15% to the buyer. The proposals match exactly, the buyer gets 15%.
  • Example 2: the buyer proposes 30% to the buyer, but the seller afterwards proposes 40% to the buyer. The buyer gets 40%.
  • Example 3: the seller proposes 60% to the buyer, but the buyer afterwards proposes 50% to the buyer. The buyer gets 50%.
  • Example 4: the seller proposes 60% to the buyer, but the buyer afterwards proposes 70% to the buyer. The dispute is not resolved since the proposals are in conflict.

Note: old resolveDispute mechanism (using signed messages) can stay in place. Some might want to use that since it's slightly more gas efficient and gives more privacy (only the agreed proposal becomes public).

@zajck zajck added the enhancement New feature or request label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant