November 21, 2024

DEX accidentally hits ‘kill-switch’ on mainnet, locking 660,000 USDC inside

The deployment of a program upgrade went terribly wrong as a fateful “Solana program close” command stopped OptiFi’s platform indefinitely.

A decentralized cryptocurrency (DEX) options exchange cut its own life short after unwittingly executing a command that closed its mainnet program and made it irrecoverable.

OptiFi informed users that its platform had come to an unceremonious end after its development team tried to update its code on Aug. 29. According to the portfolio margining derivative DEX, the program incident also locked up some 660,000 USD Coin (USDC) on-chain.

OptiFi has pledged to compensate user funds lost by the error, while a large bulk of the locked-up USDC was reportedly vested by one of its team members. The company has also urged other developers working on the Solana blockchain to be wary of the ramifications of the ‘Solana program close’ command.

The platform unpacked the series of events that led to the sudden closure of its mainnet in a Medium post, which began with an attempt to deploy an update to its Solana program code on the mainnet.

Due to what the team described as bad network status, the deployment took longer than usual, and the command was canceled. However, a buffer address was created that received Solana (SOL) tokens that the team wanted to recover.

Related: Aave community proposes to temporarily suspend ETH lending before the Merge

In the past, the team had managed to recover SOL tokens from buffer accounts without using memory phrases by closing the program. The approach initially looked to have worked after executing the command as the team recovered the SOL, allowing an attempt to deploy the program a second time.

An error message was returned indicating that the program had been closed and could not be re-deployed unless a new program id was used. Discussions with a Solana core developer confirmed the team’s fears that it would not be able to redeploy the program with its previous id.

“Here it turned out that we didn’t really understand the impact and risk of this closing program command line. ‘solana program close’ is actually for closing the program permanently and sending the SOL tokens in the buffer account used by the program back to the recipient wallet.”

The OptiFi team has called for the Solana development community to explore two-step confirmation when running the ‘Solana program close’ function and caution users of the results of using the command.

Please enter CoinGecko Free Api Key to get this plugin works.