Cryptocurrencies, blockchain, NFT and new trends

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

Crypto Ecosystems • April 7, 2023, 3:40AM EDT

Quick Take

  • zkSync has 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.

Stay updated on Pro Crypto Ecosystems news by locking ACS tokens with The Block.

Connect/Create Wallet You can unlock at any time.*
No wallet? No problem. You can set one up for free. We recommend Torus for first-time users.
*a 2% locking fee will be added at the time of locking. Learn more about Access Protocol

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 confirmed “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.