Security Statement & Contract Address
Last updated
Last updated
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 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 has only modified the chain information and some token addresses to make it compatible with the zkLink Nova network:
Uniswap V3 zkSync Era contracts changes
. 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. 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
. 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.
. 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.
. The function was changed from the calculation of EVM address derivation to the zkEVM address derivation.
Some import paths in were changed due to the transition from Foundry to Hardhat. It will not affect the bytecode.
Uniswap V3 zkSync Era deploy script changes
All the contracts repositories were forked, the build process was changed for zkSync Era, and some contracts were changed due to different address derivation.
zkSync Era doesn’t support runtime library linkage yet, so the script was migrated to the
hardhat
. To theDEPLOY_NFT_POSITION_DESCRIPTOR_V1_3_0
step was added compilation to linkNFTDescriptor
library.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.
index.ts
file logic was wrapped in the function, because nowhardhat
is the entry point and it calls this function.Types from the
ethers
were replaced with the types from thezksync-web3
.
UniswapV3Factory
Multicall2
ProxyAdmin
TickLens
NFTDescriptor
NonfungibleTokenPositionDescriptor
TransparentUpgradeableProxy
NonfungiblePositionManager
V3Migrator
QuoterV2
SwapRouter02
Permit2
UniversalRouter