Solana-based (SOL) decentralized exchange OptiFi accidentally closed its program on August 29, permanently losing $661,000 in funds.
OptiFi’s program has been shut down due to a mistake we made.
1. I accidentally closed the OptiFi mainnet program and can’t recover
2. 661k USDC locked in PDA. Luckily, 95% of his funding comes from team members.
3. Compensate all user funds
—OptiFi (@OptifiLabs) August 29, 2022
according to publication According to DEX, the mistake occurred around 06:00 UTC when the deployer tried to upgrade the program on the Solana mainnet.
How OptiFi ended the program
The team explained that the deployer was trying to upgrade the OptiFi program using an anchor deployment. However, the process took longer than usual, probably due to network congestion.
The deployer aborted this anchor deploy upgrade before receiving a response. Meanwhile, the process created an unused buffer account with a balance of 17.2023808 SOL.
So the deployers tried to close this buffer account to restore balance before proceeding with the mainnet upgrade.
However, the deployer unknowingly closed the main program completely instead of closing the buffer account.
According to the team, they used the “Solana Close Program” without fully understanding the implications of their actions.
The team said the “overwhelming” response from Solana core developers indicated that the program could not be redeployed to the previous program ID.
Loss of $661,000
The OptiFi team has revealed that it has permanently lost access to $661,000 locked in contracts.
OptiFi said 95% of this funding came from team members.
However, “all user margin account USDC tokens, option tokens, and AMMs USDC vaults” that are bound to the program are lost.
It went on to say that the plan is to compensate all users for all their lost funds while adding more stringent measures to avoid a future recurrence.
The OptiFi team also advised Solana to add an explanation. Solana documentation It warned about the consequences of closing the program and recommended adding a two-step confirmation for running the “solana program close” command.