OptiFi, a DeFi options trading protocol on Solana, announced on Tuesday that it had accidentally shut down its mainnet, leaving $661,000 in user funds inaccessible.
OptiFi Loses 661,000 USDC by Accidentally Shutting Program
OptiFi notified users that its platform had come to an untimely end when its development team attempted to update its code on Monday. According to the decentralized exchange, the program mishap also locked up 661,000 USD Coin (USDC) on-chain.
OptiFi has committed to compensate users for any funds lost as a result of the error, and a significant proportion of the locked-up USDC was reportedly vested by one of its team members. The firm has also cautioned other Solana blockchain developers to be mindful of the repercussions of the “Solana program close” command.
The Steps That Led to the Error
The platform detailed the events that led to the abrupt shutdown of its mainnet in a Medium post. It all started with an effort to bring an update to its Solana program code.
Due to what the team described as ‘bad network status,’ the deployment took longer than usual, and the command was aborted. However, a buffer address was formed that received the SOL that the team was attempting to recover.
Previously, the team was able to recover SOL from buffer accounts without the use of memory phrases by just terminating the program. After executing the command, the method appeared to have worked at first, as the team recovered the SOL, enabling them to try to deploy the program a second time.
An error message was received implying that the program had been terminated and could not be redeployed until a new program ID was used. Discussions with a Solana core developer confirmed the team’s concerns that the program could not be redeployed with its former 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.
OptiFi asserts that it has learned from the incident and will implement measures to prevent a recurrence. According to the Solana DeFi protocol, future contract implementations will use a “peer-surveillance approach.” This method entails involving at least three participants in the process to evaluate the steps taken by the deployer in order to avoid future mistakes. OptiFi has also stated that it plans to reimburse all impacted users.
A Potential Solution on Solana
Richard Patel, a contributor on Jump Crypto’s Solana validator client Firedancer, presented a potential solution following the occurrence. Reportedly, this patch will make it possible to recover deleted Solana programs as well as the corresponding funds held in such contracts.
The proposal has been submitted to the Solana GitHub repository, but this is just the beginning. Before being designated as a feature (a name given to functions that the blockchain supports), Patel’s proposal must pass a technical evaluation. The feature will then need to be approved by the majority of Solana validators prior to being activated on the network.