The development team at zkSync has found a solution to unlock 921 ETH (USD 1.7 million) trapped in a smart contract used by Gemholic on its Era network.
The funds became stuck due to an issue with using the .transfer() function, which resulted in a hard dependency on gas costs. To mitigate these gas issues, zkSync gives a warning about the .transfer() function directly into the compiler, but the Gemholic team likely ignored it.
The funds worth USD 1.7 million locked in a smart contract on Era network has a solution as claimed by zkSync development team. Matter Labs’ ZK-Rollup Layer 2 scaling solution can support Ethereum smart contracts, and the team has been able to devise an elegant method to unlock the frozen contract without putting the funds at risk.
The team has identified a minor protocol-level change that can resolve the issue and solve a broader class of gas-related problems. The gas metering of the protocol will require minimal changes, and this will enable full recovery of the funds. Gemholic, the team responsible for the frozen contract, thanked zkSync publicly for their efforts, and expressed regret for their actions. They ignored the warning issued by zkSync about the .transfer() function and did not test on the testnet or a local node before deploying contracts on the Era mainnet.
The issue with the .transfer() function resulted in a hard dependency on gas costs, which locked the funds. The zkSync team is set to release details on how it plans to recover the funds shortly.
This development highlights the importance of thoroughly testing contracts on the testnet or a local node before deploying them on the mainnet to avoid costly mistakes. The zkSync team’s efforts to recover the funds demonstrate their commitment to resolving issues quickly and efficiently to support the broader Ethereum ecosystem.