regen-ledger
regen-ledger copied to clipboard
Implement filtered buy orders
Summary
Currently MsgBuy
implements a buy order selection
with the option to create a direct buy order using sell_order_id
. Once we have filters defined for baskets, we can enable filtered buy orders and implement buy order processing.
// Selection defines a buy order selection.
message Selection {
// sum defines the type of selection.
oneof sum {
// sell_order_id is the sell order ID against which the buyer is trying to buy.
// When sell_order_id is set, this is known as a direct buy order because it
// is placed directly against a specific sell order.
uint64 sell_order_id = 1;
// TODO: once we have filters defined for baskets, we can enable filtered
// buy orders which will involve full double-sided batch order matching
//
// filter selects credits to buy based upon the specified filter criteria.
// Filter filter = 2;
}
}
For Admin Use
- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned
We will need to take second look at the message fields for the BuyOrderCreated
event. See https://github.com/regen-network/regen-ledger/pull/613#discussion_r748663005.
Should this be included in the next upgrade? It seems like the feature is well enough specified where we could get support for non-direct buy orders in this same release.
Thoughts @aaronc @dtkong ?