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

Match BUY/SELL polarity to map to BID/ASK #56

Closed
alnoki opened this issue Dec 20, 2022 · 1 comment
Closed

Match BUY/SELL polarity to map to BID/ASK #56

alnoki opened this issue Dec 20, 2022 · 1 comment
Labels

Comments

@alnoki
Copy link
Member

alnoki commented Dec 20, 2022

Presently, market.move defines the following constants:

Constant Value
ASK true
BID false
BUY true
SELL false

ASK and BID are intended for maker activity, e.g. place_limit_order(), while BUY and SELL are intended for taker activity, e.g. place_market_order(). Hence per this schema ASK = BUY and BID = SELL, conveying that taker buys match against maker asks, and taker sells match against the maker bids.

However, also per this schema, if a user passes ASK during a taker function call, denoting that they want to sell, they will actually trigger a buy. Similarly, if a user passes BID during a taker function call, denoting that they want to buy, they will actually trigger a sell.

Hence it is proposed that BUY and SELL be modified to assume the following:

Constant Value
BUY false
SELL true

Note that incentives.move shall also be updated to reflect the constant modifications.

@mkurnikov

@BriungRi
Copy link
Contributor

I did originally find BID != BUY to be confusing at first. Aligning BID == BUY should help future developers who are reading through Econia code.

BriungRi added a commit to econia-labs/econia-wrappers that referenced this issue Dec 21, 2022
BriungRi added a commit to econia-labs/econia-reference-front-end that referenced this issue Dec 21, 2022
alnoki added a commit that referenced this issue Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants