order matching - atticplaygroup/prex GitHub Wiki

Orders

Within Prex, items, primarily quota, are exchanged using limit order book. Each instance is claimed to implement a service by a service provider. To utilize quota, a sell order must be matched, an access token claimed, and then activated, as detailed in the quota lifecycle. The following outlines the processes of order matching and token claiming.

Place Active Orders

Note

Some parts of this section have not been implemented

Separation of service provider and seller and resales of tokens have not been implemented but is in roadmap. Currently only sellers, which are the same as providers with priviledge user are available in the DB.

There are typically two scenarios for the submission of sales requests within Prex. The first involves service providers directly placing sell orders. The second involves general users reselling quota.

Service Providers

(TODO when implemented)

Resales of Quota

(TODO when implemented)

Match Orders

Purchase requests are matched in a limit-order format. Currently, Prex only permits sellers to submit sell orders, but buyers cannot submit orders and always match. This is designed to facilitate real-time responses, given that buyers are typically users seeking services to fulfill immediate needs.

Claim Tokens from Orders

message ClaimTokenRequest {
  string name = 1;
  int64 account_id = 2;
  // TODO: audience should not be a user given variable. Should be provider given
  string audience = 3;
  string arg_json = 4;
}

Seller Regulation

Ideally, a Prex operator does not need to be concerned with unsolicited service providers, as they are required to pay for each sales order they place. In the event of excessive spam, we could implement personalized pricing strategies to offer discounts to reputable service providers.

⚠️ **GitHub.com Fallback** ⚠️