Cryptocurrency

zkSync helps project recover stuck $1.7M from smart contract

Ethereum (ETH) Layer 2 (L2) network zkSync said it had found an “elegant solution” to unpack 921 ETH (worth $1.7 million) belonging to Gemholic that had been stuck in smart contracts.

Gemholic has had problems transferring funds beyond zkSync’s Era mainnet. asked for help From Layer 2 network.

zkSync identifies the problem

According to zkSync, Gemholic ran into issues deploying smart contracts on the Era mainnet due to “use of the .transfer() function.”

zkSync pointed out that this function uses a hardcoded fixed amount of gas of 2300. This is not guaranteed to work with Ethereum as gas consumption may increase or change in the future.

L2 Solutions said it warned about this issue in 2019.

zkSync further explained that the mainnet in that era was not equivalent to the Ethereum Virtual Machine (EVM). It pointed out:

“This is a deliberate design choice. Era has bifurcated dynamic gas metering that can make some transaction types 10x to 1000x cheaper than other EVM rollups. .”

solution

zkSync says it has identified “sophisticated solutions that can solve a broader class of gas-related problems.” Requires minimal changes to protocol gas metering, but allows full recovery of funds. “

L2 Network checked the source code of several popular crypto projects and found them to comply with previous warnings.

Scaling Solutions, on the other hand, pointed out that these issues could have been prevented had Gemholic deployed the contract to the testnet first. zkSync says:

“Unfortunately, the contract was deployed to the Era mainnet without being attempted on the testnet or local nodes, so we should have discovered the problem immediately.”

zkSync has grown rapidly in popularity since its release in March. According to L2beats, the total amount of assets locked on the network has risen 4th among other L2 networks dataThe project says its growth is “the largest scaling solution we’ve seen in such a short time.”

Post zkSync helps the project recover $1.7M stuck from the smart contract that first appeared on CryptoSlate.

Related Articles

Back to top button