GemholicECO’s Smart Contract Issue On zkSync Era Resolved

GemholicECO, a multi-product platform that recently deployed its token contract and performed a pre-sale launch on zkSync Era, encountered an issue with its contract due to the usage of the .transfer() function. However, the team at zkSync Era reached out to provide support, and they were able to find an elegant solution to unfreeze the contract. They have now provided an update to the community on the issue.

Non-EVM Upsides and Trade-offs

In a statement released by zkSync Era, they explained that the contracts were deployed on Era mainnet without having been tried on the testnet or local node, which would have immediately caught the problem. Any smart contract that uses transfer() or send() is taking a hard dependency on gas costs, which is not guaranteed to work on Ethereum. Fallback() function can consume more than 2300 gas, and opcode gas pricing can change in the future version of Ethereum, causing the contract to break. Developers have been warned about this for three years now.

Furthermore, zkSync Era is not EVM equivalent. It is a deliberate design choice with specific upsides and trade-offs. Era has a diverging, dynamic gas metering, which allows some transaction types to be 10x to 1000x cheaper than on any other EVM rollup, such as oracle updates. At the current gas pricing levels of Era mainnet, ETH transfers will cost more than 2300 gas, which is why any .transfer() call without explicit gas stipend will currently fail.

 

Gas Cost Dependency

The zkSync Era team took the issue seriously and provided an elegant solution that can solve a broader class of gas-related problems. They identified that it will require minimal changes in the gas metering of the protocol, but will allow for full recovery of the funds. They promised to publish more details on it tomorrow.

The team at zkSync Era stated that they had added a warning about .transfer() directly to the compiler and checked the source code of dozens of popular crypto projects. They didn’t find a single one not following the three-year-old warning of not using .transfer(). They concluded that the dev community had since long closed this issue. However, the GemholicECO situation has demonstrated that this is not the case.

zkSync Era Alpha

zkEVMs are complex systems that are in the process of maturing. Even though zkSync Era is still in Alpha, they have already got a thriving ecosystem. They have seen a tremendous spike in activity, the most any scaling solution has ever undergone in such a short period of time. It’s been two weeks since their launch, and they have risen to the 4th highest TVL and 3rd highest usage of all L2s.

With this comes great responsibility, and inevitably the occasional friction, and today was one of these instances. The team promised to be on alert and be relentless in resolving issues when there are problems. They will always do their best to provide support and guidance to developers and communities building on zkSync Era.