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

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

Open
JABirchall opened this issue Jan 23, 2025 · 2 comments
Open

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

JABirchall opened this issue Jan 23, 2025 · 2 comments

Comments

@JABirchall
Copy link

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.

@JABirchall
Copy link
Author

JABirchall commented Jan 23, 2025

Update:

Manually creating the pool and depositing works however doing so completelty breaks the interface and renders uniswap unusable.

Error

s@https://app.uniswap.org/static/js/8211.d609fc21.js:2:1137984 t@https://app.uniswap.org/static/js/8211.d609fc21.js:2:1158675 97404/t.fromFractionalAmount@https://app.uniswap.org/static/js/8211.d609fc21.js:2:1158869 97404/n.quote@https://app.uniswap.org/static/js/8211.d609fc21.js:2:1161842 _@https://app.uniswap.org/static/js/main.d3bf6694.js:4261:12334 16584/I/<@https://app.uniswap.org/static/js/main.d3bf6694.js:4261:5692 iu@https://app.uniswap.org/static/js/8211.d609fc21.js:2:2051538 Ac@https://app.uniswap.org/static/js/8211.d609fc21.js:2:2071662 6333/Ec/<@https://app.uniswap.org/static/js/8211.d609fc21.js:2:2070402 Ec@https://app.uniswap.org/static/js/8211.d609fc21.js:2:2070467 cc@https://app.uniswap.org/static/js/8211.d609fc21.js:2:2064223 qi@https://app.uniswap.org/static/js/8211.d609fc21.js:2:2004949 6333/ic/<@https://app.uniswap.org/static/js/8211.d609fc21.js:2:2061628 

@JABirchall JABirchall changed the title [BUG] Uniswap can not deal with 256bit unsigned int [BUG] Uniswap can not deal with 256bit unsigned int tokens Jan 23, 2025
@JABirchall JABirchall changed the title [BUG] Uniswap can not deal with 256bit unsigned int tokens [BUG] Uniswap can not work with 256bit unsigned int tokens Jan 23, 2025
@JABirchall
Copy link
Author

Closing the pools restores functionality.

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

No branches or pull requests

1 participant