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.

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.