v3-sdk icon indicating copy to clipboard operation
v3-sdk copied to clipboard

What is the significance of "POOL_INIT_CODE_HASH" ?

Open debo24 opened this issue 2 years ago • 1 comments

In the file "v3-sdk/src/constants.ts" and line number 5, what is the importance of "POOL_INIT_CODE_HASH"?

debo24 avatar Aug 17 '22 11:08 debo24

Hi @debo24

Uniswap uses CREATE2 to determine the address of a pool. The advantage is that the address of a pool with two specific tokens and a specific fee tier is deterministic and computable wether the pool is deployed or not. The SDK uses it in computePoolAddress.

Florian-S-A-W avatar Apr 28 '23 15:04 Florian-S-A-W