zkSyncannounced that it has developed a solution to solve $1.7 million stuck in a smart contract.
zkSyncHe said that Gemholic has found a solution to release the 921 Ethereum (approximately $1.7 million) locked in its smart contract on the Ethereum Layer-2 network.
zkSync Announces Solution for $1.7M Ethereum Remaining in Smart Contract
The development team at zkSync announced that they have found a solution to get 921 ETH stuck in a smart contract on the Era network out of the jam.
in a statement zkSync explained in a Tweet that the funds are safe and that he has discovered an elegant method to open the frozen contract. The team also wrote that the issue is related to the “transfer()” command.
TLDR:
1) Funds are safe. We found an elegant solution how to unfreeze the contract.
2) Era is not EVM equivalent. This is a deliberate design choice with specific upsides and trade-offs.
3) Following best practices would've prevented the issue:https://t.co/93M5ruljUP
— zkSync ∎ (@zksync) April 7, 2023
The fallback() function is triggered when the .transfer() function is used to send Ethereum to a smart contract. If the fallback() function requires more than 2300 gas allocated, the transaction may fail and funds may be stuck. The problem encountered here is exactly because of this problem.
To mitigate this gas issue, zkSync issues a warning directly to the compiler about the .transfer() function. There was a problem here, probably because this warning was ignored by the Gemholic team. The ZkSync team also noted that Gemholic deployed contracts on the Era mainnet without testing it on a testnet or a local node.