Correct Use For Openbook-V2 Accounts / Structure - {X} META Bounty
canny opened this issue · comments
For each order we're creating a new account, whereas we have the capacity for up to 32 orders under the account. I also believe we can recycle orders where you really should only need to close the account at the end of the proposal period.
This should handle up to 32 orders then spin up another order account and handle the creation, settlement, edit and cancel of each order.
This is closely related to {Use Funds In Openbook-V2 Market Account For Placing Orders}.
This issue has been linked to a Canny post: Correct Use For Openbook-V2 Accounts / Structure - {X} META Bounty 🎉
These things are hardcoded to the first account included in the current UI:
meta-dao-frontend/lib/openbook.ts
Line 253 in a8c7f14
Wherever we call to process these things I've hardcoded the 0th element as the remaining 23 have no value / aren't used, this would have to be expanded to accept up to the full 24 vs where we're just grabbing the one here (there's a few more places and likely some more tendrils where settling / closing and checking for partial fills is required to be changed).