Skip to content

Make Orders able to be cancelled #102

@fredo

Description

@fredo

Orders cannot be cancelled by the user. A way needs to be defined when a particular offer corresponded to an order is able to be cancelled or not. Then the user should automatically be able to cancel an order. Offers get cancelled or stay open.

Race condition is as followed:

An offer is committed to a CS and published. When is the offer officially cancelled? In the meanwhile any taker could try to take the offer. This is currently decided by the CS approving a commitment to a specific taker. Therefore it should be up to the commitment service to "approve" a cancellation. This exposes the risk of front running to the CS or even worse the power of leave the offer open until it times out.

Simple Scheme for now would be:

  • User cancels the order
  • Every offer with the state "initiated", "unproved", "proved" or "published" (this means no taker was approved) can be cancelled by the user
  • Raidex sends Cancellation message to CS
  • CS answers with a cancellation proof and the refund of the commitment
  • Upon receiving the offer can be seen as cancelled

Tasklist

  • Make the button cancel active again in the web ui
  • introduce a new message type cancellation and cancellation proof
  • raidex node must handle cancelation state change
  • CS can handle cancellation message

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureraidex node architecturecscommitment servicewebui

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions