regen-ledger icon indicating copy to clipboard operation
regen-ledger copied to clipboard

Implement filtered buy orders

Open ryanchristo opened this issue 3 years ago • 2 comments

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

ryanchristo avatar Nov 05 '21 04:11 ryanchristo

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.

ryanchristo avatar Nov 15 '21 18:11 ryanchristo

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 ?

clevinson avatar Nov 18 '21 16:11 clevinson