📄Security Statement & Contract Address

NovaSwap shares the same security features as Uniswap V3. By incorporating Uniswap V3's robust and thoroughly tested secure core code at the smart contract layer, NovaSwap ensures the mitigation of smart contract vulnerabilities and the protection of user funds.

As zkLink Nova utilizes the zkEVM of ZK Stack, we have adopted the successful Uniswap DAO proposal into deploying Uniswap V3. This contract has been audited by ABDK and has been successfully adapted into the zkEVM without affecting the core code and security.

NovaSwap's changes on the basis of the proposal:

NovaSwap has only modified the chain information and some token addresses to make it compatible with the zkLink Nova network:

zkSync Era's changes on the basis of UniSwap V3:

Uniswap V3 zkSync Era contracts changes

  1. v3-periphery/contracts/libraries/PoolAddress.sol:POOL_INIT_CODE_HASH 32. Hardcoded constant POOL_INIT_CODE_HASH was changed due to the different bytecode of compiled contracts on zkSync Era. It was also adapted for the 1.1.1 and 1.3.0 versions

  2. v3-periphery/contracts/libraries/PoolAddress.sol:computeAddress 13. The function was changed from the calculation of EVM address derivation to the zkEVM address derivation. It was also adapted for the 1.1.1 and 1.3.0 versions

  3. swap-router-contracts/contracts/libraries/UniswapV2Library.sol:pairFor 5. The function was changed from the calculation of EVM address derivation to the zkEVM address derivation. It should not affect anything, as V2 is unsupported on zksync.

  4. universal-router/contracts/modules/uniswap/v2/UniswapV2Library.sol:pairForPreSorted 6. The function was changed from the calculation of EVM address derivation to the zkEVM address derivation. It should not affect anything, as V2 is unsupported on zksync.

  5. universal-router/contracts/modules/uniswap/v3/V3SwapRouter.sol:computePoolAddress 9. The function was changed from the calculation of EVM address derivation to the zkEVM address derivation.

  6. Some import paths in permit2 contracts 10 were changed due to the transition from Foundry to Hardhat. It will not affect the bytecode.

Uniswap V3 zkSync Era deploy script changes

  1. All the contracts repositories were forked, the build process was changed for zkSync Era, and some contracts were changed due to different address derivation.

  2. zkSync Era doesn’t support runtime library linkage yet, so the script was migrated to the hardhat. To the DEPLOY_NFT_POSITION_DESCRIPTOR_V1_3_0 step was added compilation to link NFTDescriptor library.

  3. Added factory dependencies to the deployment process. The script checks that for contracts any factory dependencies were not missed, for libraries, factory dependencies should always be empty.

  4. index.ts file logic was wrapped in the function, because now hardhat is the entry point and it calls this function.

  5. Types from the ethers were replaced with the types from the zksync-web3.

The contract address of NovaSwap

Last updated