Kukuza / sargo-smart-contracts

Smart Contracts for P2P On- and Off-Ramp on Celo
Apache License 2.0
1 stars 0 forks source link

how do we revert Wakala Escrow payments? #26

Closed steffenkrogmann closed 2 years ago

steffenkrogmann commented 2 years ago

Let#s say an agent accepts a request, money is sent to escrow.

If something breaks, or the user never confirms, how and when do we send the money back?

Allen-Muhani commented 2 years ago

We have the breakdown of the transacted cash/USD within the transaction object.

On the smart contract side what can happen is basically send all the money back to the client if it's a withdrawal transaction. Send all the USD cash to the agent if it's a deposit.

This should only be done if the transaction has not been confirmed by any of the two. Once it`s confirmed by any of the two we have a game theory problem. We do not know who is telling the truth to cancel. This brings us to the questions.

  1. Who is allowed to cancel??
  2. Should we ask them why they are canceling? And should we store this information on chain??
  3. When is it too late to cancel the transaction?
  4. How do we handle fraud?? i.e An agent can cancel a withdrawal transaction once the client has sent him/her fiat outside Wakala. @steffenkrogmann, @ClaireLagat , @Chegemartinx