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

Storing a total base_qty value in slab headers #55

Open
crocodiledundalk opened this issue May 3, 2022 · 1 comment
Open

Storing a total base_qty value in slab headers #55

crocodiledundalk opened this issue May 3, 2022 · 1 comment

Comments

@crocodiledundalk
Copy link

crocodiledundalk commented May 3, 2022

It may be useful for some use cases to store a value which tracks the total base_qty currently listed on a given slab.

While this could be tracked on the calling program side, I would suggest this is also an asset / use-case agnostic feature that might be useful for a number of cases.

An example case might be where a market order (or any order for that matter) should be capped so as not to take more than some % of the available volume. It may be generally useful to have an easily accessible metric/summary of volume available on the book.

Suggested approach would be to:

  • Increment this value by base_qty base_quantity of the new Leaf_Node posted
  • Decrement this value each time Out.base_size each time an Out is generated
@tomland123
Copy link

tomland123 commented May 4, 2022

Personally just had this convo w/ Henry a bit back. This adds a lot of overhead to the orders account and while it does have huge UX benefits there is a pretty severe cost to adding so many bytes to the slab.

I am personally in favor of this change though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants