Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Validate compatible divisibilities between nodes before allowing an order to proceed #1587

Open
@placer14

Description

@placer14

Given that we are representing CurrencyValues as whole units with associated divisibilities, we have multiple possible representations of the same value. For example:

An amount of 0.123 BTC may be represented as a whole value of 123 and a divisibility of 3 (which we will shorten to 123 divisibility 3 for brevity). But it would be equivalent to also say 12300 divisibility 5 or even 1230000 divisibility 7. It would NOT be equivalent to say 12 divisibility 2 due to the fact that the resulting amounts are not the same: 0.12 BTC != 0.123 BTC

Given the fact that divisibility may change over time, we need to understand the rules around when nodes can be incompatible and how to protect those scenarios from occurring. This is a placeholder issue to track that scope discussion.

For example:

  • A buyer may support higher divisibility than a vendor and still be able to send the appropriate amount of money.
  • A vendor may support higher divisibility than a buyer, however, the buyer could not send the exact amount. This may be okay as purchases allow a 1% leeway to allow for rate fluctuations...

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionfeatureFeature or enhancement to openbazaar-go

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions