Skip to content

Bonding curve formula precision limits #484

Open
@abarmat

Description

@abarmat

The bonding curve formula is implemented using an approximation that imposes a limit on the precision we can use for shares. In certain cases when selling from the curve a user will need to not fully use the 18 decimals of a share and deal with less precision.

Example:

- User signals:   31.224989991991991029
- User unsignals: 31.224989991991991020 (fails) - just a tiny bit less than the total
- User unsignals: 31.224989991900000000 (works)
- User unsignals: 31.224989991991991029 (works) - total amount of signal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions