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

feat: update validation on market and position decimals #2226

Merged
merged 14 commits into from
Mar 27, 2024

Conversation

Jiajia-Cui
Copy link
Contributor

@Jiajia-Cui Jiajia-Cui commented Mar 26, 2024

close #2225

Copy link
Contributor

@davidsiska-vega davidsiska-vega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For spot this should be formulated in terms of market decimals, quote asset decimals and base asset decimals.

@davidsiska-vega
Copy link
Contributor

For spot this should be formulated in terms of market decimals, quote asset decimals and base asset decimals.

In fact for spot there is no issue to prevent as there are no mark-to-market cash-flows

@davidsiska-vega
Copy link
Contributor

davidsiska-vega commented Mar 26, 2024

For spot this should be formulated in terms of market decimals, quote asset decimals and base asset decimals.

In fact for spot there is no issue to prevent as there are no mark-to-market cash-flows

No mark to market cash-flows but maybe we want to be able to represent the smallest trade at the smallest price in quote asset decimals. So we want

  1. mdps + pdps <= quote asset dps
  2. pdp <= based asset decimals

Copy link
Contributor

@davidsiska-vega davidsiska-vega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we formulate it in terms of number of decimal places, because that's what goes into the proposals? Not "precision" please, unless the comparison operator for "precision" is defined carefully.

@gordsport gordsport linked an issue Mar 27, 2024 that may be closed by this pull request
Copy link
Contributor

@davidsiska-vega davidsiska-vega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we still move from "precision" to talking about dps in the ACs please?

protocol/0070-MKTD-market-decimal-places.md Outdated Show resolved Hide resolved
protocol/0070-MKTD-market-decimal-places.md Outdated Show resolved Hide resolved
Co-authored-by: David Siska <[email protected]>
@Jiajia-Cui Jiajia-Cui merged commit 765c780 into colosseo Mar 27, 2024
4 checks passed
@Jiajia-Cui Jiajia-Cui deleted the Validation-on-decimals branch March 27, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validation on market and position decimals in market proposals
3 participants