Skip to content

Check usage of floating point calculations and u64 casting #2

@hobofan

Description

@hobofan

Currently, in the payout calculation, there are a lot of places where U256 is cast to u64 and/or f64. This can cause both panics (for the u64 casting) and inaccuracies in the payout calculation (for the f64 casting).

One potential solution could be to use a decimal floating point library like https://github.com/alkis/decimal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions