Skip to content

[BUG] Uniswap can not work with 256bit unsigned int tokens #7825

@JABirchall

Description

@JABirchall

Ive been playing around with some tokens and tried making a token where the total supply is 1 with 76 decimal places. (The maxium amount that can be stored in a 256 uint)
10000000000000000000000000000000000000000000000000000000000000000000000000000

Upon attempting to create a pool on uniswap for this, it would not work, kept giving invalid price errors, price out of range or just unknown error.

I did some further investigating and found 38 decimal places worked find, this convineantly is the maximum amount in a 128 bit uint.
100000000000000000000000000000000000000

As smart contracts and the ERC20 token standard uses the 256uint, uniswap should fully support 256bit uints. But it looks like you guys decided to only support 128bit uints.

I checked V2 and V3 both cant handle a full 256bit uint token.

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