Ad
News
zkSync helps project recover stuck $1.7M from smart contract zkSync helps project recover stuck $1.7M from smart contract

zkSync helps project recover stuck $1.7M from smart contract

zkSync pointed out that the issues could have been prevented if Gemholic first deployed its contract on a testnet.

zkSync helps project recover stuck $1.7M from smart contract

Cover art/illustration via CryptoSlate. Image includes combined content which may include AI-generated content.

Ethereum (ETH) layer2 (L2) network zkSync said it found “an elegant solution” to unfreeze ย 921 ETH โ€” worth $1.7 million โ€” belonging to Gemholic that was stuck in a smart contract.

Gemholic had had issues transferring the funds out of zkSync’s Era mainnet and later requested help from the layer2 network.

zkSync identifies the problem

According to zkSync, Gemholic encountered issues with its smart contract deployment on the Era mainnet because of its “usage of the .transfer() function.”

zkSync noted that this function uses a hardcoded fixed gas amount of 2300, which is not guaranteed to work on Ethereum because the gas consumption could be more or changed in the future.

The L2 solution said it had warned of this issue as far back as 2019.

zkSync further explained that its Era mainnet is not an equivalent of Ethereum Virtual Machine (EVM). It noted that:

“This is a deliberate design choice. Era has a diverging, dynamic gas metering, which allows some transaction types to be 10x to 1000x cheaper than on any other EVM rollup!”

The solution

zkSync said it identified “an elegant solution which can solve a broader class of gas-related problems. It will require minimal changes in the gas metering of the protocol but will allow for full recovery of the funds.”

The L2 network said it checked the source code of several popular crypto projects and found that they complied with its previous warning.

Meanwhile, the scaling solution pointed out that these issues could have been prevented if Gemholic first deployed the contract on a testnet. zkSync said:

“Unfortunately, the contracts were deployed on Era mainnet without having been tried on the testnet or local node, which would have immediately caught the problem.”

zkSync has enjoyed rapid adoption since its launch in March. The total value of assets locked on the network has risen to fourth among other L2 networks, according to L2beats data. The project said its growth is “the most any scaling solution has ever undergone in such a short period.”