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

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 the contracts were deployed on its Era mainnet without being tested on the testnet or 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 Crypto, Inc. 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.

Source: https://www.theblock.co/post/225364/zksync-unfreeze-millions-stuck?utm_source=rss&utm_medium=rss