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

Consider making offers expire #175

Open
MonsieurNicolas opened this issue Sep 24, 2018 · 0 comments
Open

Consider making offers expire #175

MonsieurNicolas opened this issue Sep 24, 2018 · 0 comments
Labels
CAP Represents an issue that requires a CAP. help wanted Open especially for those who want to write a CAP/SEP! needs draft This an issue that has no corresponding draft, and as such has not entered the CAP/SEP process.

Comments

@MonsieurNicolas
Copy link
Contributor

One of the things we learned with the protocol 10 rollout with changes like CAP0-0003 is that it's becoming increasingly hard to not break certain client business logic that rely on undocumented (something we can improve on for sure) or undefined behavior.

One aspect in particular is on how the order book functions: while the order book can "at any time" cancel or modify outstanding order, the issue is that those events happen so rarely that people may not realize that this is the case.

A simple way to turn the "improbable" into "certainty" (therefore hardening client code), would be to simply move semantics that are closer to how other markets work: force long lasting orders to be recreated at a regular time.

A couple possible approaches to start the discussion.

The purge

There could be a recurrent "purge" of the order book that deletes X% of the orders every T ledgers (both of these would be network parameters).
This approach seems to be close to what we want: non deterministic (due to the random nature) deletion of orders, which forces clients to not rely on any particular behavior of how the order book state is managed.

By having many ledgers between purge events, the "pseudo randomness" that comes with simple things like "ledger hash" is quite strong.

Deterministic expiration

We could also add an expiration time as a network parameter, we would pick something like a week or two as a starting point and offers would just automatically get deleted when they reach their expected life time.

The issue with that approach is that it only partially solves the problem: what if we want in a future upgrade or a future version of the protocol to delete certain offers? If client code relies on certain timing, it won't work.

A nice thing about this solution is that it's basically how standard order books work (be it "good for day" or "good until cancelled" that really means 30 or 60 days for most brokerage firms).

@MonsieurNicolas MonsieurNicolas added the CAP Represents an issue that requires a CAP. label Sep 24, 2018
@theaeolianmachine theaeolianmachine added help wanted Open especially for those who want to write a CAP/SEP! needs draft This an issue that has no corresponding draft, and as such has not entered the CAP/SEP process. labels Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CAP Represents an issue that requires a CAP. help wanted Open especially for those who want to write a CAP/SEP! needs draft This an issue that has no corresponding draft, and as such has not entered the CAP/SEP process.
Projects
None yet
Development

No branches or pull requests

2 participants