omgnetwork / research

43 stars 2 forks source link

Improve Withdraw Process #67

Closed boolafish closed 5 years ago

boolafish commented 5 years ago

Background

Our current design requires two step withdraw to protect venue/exchange on generating proof.

Description

As a user, I want the process to be simpler, so that I don't need to click the button twice to withdraw my money from exchange.

As a venue, I want to make sure user won't take move away the money while I am generating proof So that I do not need to take the risk and cost of re-generating proof unexpectedly.

Successful Criteria

Notes

A sub story of #53.

boolafish commented 5 years ago

[note] Some ideas:

  1. Two path of withdrawal:
    • happy path trader get venue's signature, and the withdraw happens directly without waiting.
    • Still support two phase withdrawal in case venue is framing
  2. One edge case: A trader notifies and wait N blocks. However, before he submits the withdrawal execution tx, venue submits the trade tx. Talked with Pepesza, probably better to consider this same as order cancelation. Just let it pass anyway.
boolafish commented 5 years ago

Analysis: (Trader, Venue, Operator) -> result (o, o, o) --> : ) (x, o, o) --> Need two phase withdrawal or need venue's signature and would not work (o, x, o) --> Trader do two phase withdrawal on plasma chain. (PS. one edge case is described in previous comment.) (o, o, x) --> Venue IFE the last settlement (x, o, x) --> Operator let invalid withdraw (not waiting enough period) pass through, venue waste the cost of generating last trade proof. However, the withdrawal exit could be challenged so trader gets nothing. A lose-lose situation.

boolafish commented 5 years ago

Having two paths for withdrawal might be the best we have, closing this.