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 time-in-force orders with deposit/bounty eviction schema #95

Open
alnoki opened this issue Mar 20, 2023 · 1 comment
Open

Consider time-in-force orders with deposit/bounty eviction schema #95

alnoki opened this issue Mar 20, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@alnoki
Copy link
Member

alnoki commented Mar 20, 2023

To enable automatic cancellation or expiry of orders, a time-in-force (TIF) functionality is proposed:

  • A maker indicates the time for which their order should be valid.
  • Once the time has passed, the matching engine will not match the order.

Note that this presents a potential denial-of-service (DoS) vector: if an actor places excessive TIF orders on a book, then the book may end up with orders that all need to be vacated. This could be prevented by charing a bounty for clearing out vacated orders, which must be paid by TIF order submitters when they submit an order.

@alnoki alnoki added the enhancement New feature or request label Mar 20, 2023
@alnoki alnoki changed the title Consider time-in-force orders Consider time-in-force orders with deposit schema Oct 22, 2023
@alnoki alnoki changed the title Consider time-in-force orders with deposit schema Consider time-in-force orders with deposit/bounty schema Oct 22, 2023
@alnoki
Copy link
Member Author

alnoki commented Oct 22, 2023

To prevent the DoS vector, TIF orders could require a deposit in either APT (gas coin) or the base asset for the market.

For example the deposit could be the min size for the market in the base asset.

Here, if a TIF order goes stale, then the deposit effectively becomes an eviction bounty.

This logic could also apply to orders in the general case, with a default TIF of several weeks, for example, such that stale orders get evicted from the book.

@alnoki alnoki changed the title Consider time-in-force orders with deposit/bounty schema Consider time-in-force orders with deposit/bounty eviction schema Nov 28, 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