A decentralized cryptocurrency 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 Monday. According to the decentralized exchange, the program incident also locked up some 660,000 USD Coin (USDC) on-chain.
OptiFi's program has been closed by mistakes we made.— OptiFi (@OptifiLabs) August 29, 2022
1. We accidentally closed the OptiFi mainnet program and it's not recoverable
2. 661k USDC is locked in the PDAs, luckily 95% of the fund is from our team member
3. We will compensate for all users’ funds
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.
In a Medium post, the platform unpacked the series of events that led to the sudden closure of its mainnet. It began with an attempt to deploy an update to its Solana program code.
The deployment took longer than usual due to what the team described as bad network status, and the command was canceled. However, a buffer address was created that received SOL the team wanted to recover.
In the past, the team managed to recover SOL 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 them to attempt to deploy the program a second time.
An error message was returned indicating that the program had been closed and could not be redeployed 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.