ZkSync develops 'solution' to unfreeze $1.7 million stuck in smart contract

Quick Take

  • zkSync said it found a solution to release the 921 ETH ($1.7 million) locked in Gemholic’s smart contract on the Ethereum Layer 2 network.
  • The funds in the smart contract deployed were locked due to an issue with the use of a problematic .transfer() function.

The development team at zkSync said it had devised a solution to unlock the 921 ETH ($1.7 million) stuck in a smart contract used by a team called Gemholic on its Era network. zkSync is a ZK-Rollup Layer 2 scaling solution developed by Matter Labs that can support Ethereum smart contracts.

In a statement, zkSync claimed "funds are safe" and that it has "discovered an elegant method to unlock the frozen contract."

On Thursday, Eden Au, director of research at The Block, was the first to note that the project raised 921 ETH ($1.7 million) through a token sale on zkSync's Era mainnet, but the funds had become trapped in the smart contract. The funds in the contract got locked due to an issue with using the .transfer() function, which resulted in a hard dependency on gas costs.

When the .transfer() function is used to send Ether to a smart contract, the fallback() function is triggered. If the fallback() function requires more than the allocated 2300 gas, the transaction may fail, and the funds get stuck.

To mitigate these gas issues, zkSync gives a warning about the .transfer() function directly into the compiler, which was likely ignored by the Gemholic team. The zkSync team further stated that Gemholic deployed contracts on the Era mainnet without testing on the testnet or a local node.

THE SCOOP

Keep up with the latest news, trends, charts and views on crypto and DeFi with a new biweekly newsletter from The Block's Frank Chaparro

By signing-up you agree to our Terms of Service and Privacy Policy
By signing-up you agree to our Terms of Service and Privacy Policy

zkSync has been working to resolve the issue with a minor protocol-level change to recover the funds fully, and it plans to provide details shortly.

"We 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 zkSync team said.

In response to zkSync's efforts, Gemholic publicly thanked the project, adding they "sincerely apologize" for their actions.


© 2023 The Block. All Rights Reserved. This article is provided for informational purposes only. It is not offered or intended to be used as legal, tax, investment, financial, or other advice.

About Author

Vishal Chawla is The Block’s crypto ecosystems editor and has spent over six years covering tech protocols, cybersecurity, artificial intelligence and cloud computing. Vishal likes to delve deep into blockchain intricacies to ensure readers are well-informed about the continuously evolving crypto landscape. He is also a staunch advocate for rigorous security practices in the space. Before joining The Block, Vishal held positions at IDG ComputerWorld, CIO, and Crypto Briefing. He can be reached on Twitter at @vishal4c and via email at [email protected]

Editor

To contact the editor of this story:
Adam James at
[email protected]