Ethereum Layer 2 scaling solution zkSync claims to have found a way to unfreeze the funds locked in Gemholic’s GemstoneIDO smart contract.
In an April 6 update on Twitter, zkSync said it had found an “elegant solution” to 921 ETH, worth around $1.7 million, locked in one of its contracts after the project’s token sale.
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 issue arose from the .transfer() function in GemstoneIDO’s smart contract, which the zkSync team claims could have been avoided if the project had deployed the contract on a testnet.
“Unfortunately, the contracts were deployed on Era mainnet without having been tried on the testnet or local node, which would have immediately caught the problem,” said the zkSync team.
The Gemholic team, however, claims to have tested out the function on the zkSync testnet before the mainnet.
The function was part of zkSync Era, the zero-knowledge rollup scaling solution released by Matter Labs last month. However, zkSync Era is not Ethereum Virtual Machine (EVM) equivalent, a “deliberate design choice” made by the team.
Era’s dynamic gas metering means that any ETH transfers will cost more than 2300 gas, and any .transfer() function entered without an explicit gas stipend would fail. The team said it had anticipated such a scenario and added a warning about the function directly to its compiler.
Before everyone gets their pitchforks out for @zksync and the 921 ETH locked in that contract from today, their compiler does actually give a warning if you use the transfer function.
It doesn't completely error out in case you're using the non-native transfer function. pic.twitter.com/F9wTHubFmc
— cygaar (@0xCygaar) April 6, 2023
To solve the issue of GemstoneIDO’s locked funds, zkSync said it would make minimal changes to the gas metering of the protocol to allow for a full recovery of funds.
Despite a quick resolution, some critics alleged that the issues stemmed from zkSync Era’s lack of complete EVM equivalence, despite its claims to the contrary.
7/n
All the while, Era went down just a few days ago and now this issue with the transfer function. Some notable people mentioned how the lang isn't isomorphic which equates to zero EVM equivalence compatibility.
— Naz (@CryptoNasss) April 6, 2023