zkSync Era Unlocks $1.7M in ETH Stuck in Smart Contract

• zkSync Era, a zero-knowledge Ethereum Virtual Machine (zkEVM) scaling project, found an “elegant solution” to unlock 921 ETH stuck in a smart contract.
• The issue stemmed from the .transfer() function not being supported on zkSync Era.
• Gemholic should have tested their contract on the testnet before deploying it on mainnet.

Project Was Unaware of Limitations

A project called Gemholic had 921 stuck in a smart contract on zkSync Era due to the wrong usage of one specific function. The issue stemmed from the .transfer() function, which is supported by Ethereum and other EVM chains but not by zkSync Era. This meant that Gemholic couldn’t withdraw the 921 ETH, or $1.7 million, it raised in its token sale just a few days ago.

zkSync Provides Solution

zkSync said it had found an „elegant solution“ to the problem and that Gemholic can now access its funds. The team reiterated that zkSync Era is not EVM-equivalent and not all EVM functionality works on its network. They also cautioned others to first deploy their smart contracts on the zkSync Era testnet to find bugs or other technical issues before deploying them on mainnet.

Known Issue with .transfer() Function

The .transfer() function is known for causing issues when used with certain Layer 2 solutions like zkSync Era due to compatibility reasons. As such, projects should make sure they understand what functions are supported by any given platform before deploying their contracts there.

Testing Can Help Avoid Issues

It’s important for projects deploying onto Layer 2 solutions like zkSync Era to first test their contracts out on a testnet before deploying them onto mainnet so they can identify potential issues before they become major problems. Additionally, users should be aware that some functions are not supported by all Layer 2 solutions so they will know what kind of code they can use safely going forward.

Conclusion

In conclusion, this incident highlights both the importance of testing your code prior to deployment as well as understanding which functions are available on different platforms so you don’t run into any unexpected issues down the road when trying to use your app or dapp built atop those platforms..