molly / web3-is-going-great

A timeline of some of the greatest hits in cryptocurrencies, NFTs, and other web3 projects since the beginning of 2021
http://web3isgoinggreat.com/
MIT License
783 stars 61 forks source link

[NEW]: OptiFi accidentally shuts itself down, locking up $661,000 forever #578

Closed jcgiuffrida closed 2 years ago

jcgiuffrida commented 2 years ago

Date

2022-08-29

Description

One of the main selling points of Web3 is that the code underlying it is irreversible, since all changes are recorded on an immutable blockchain. This supposedly allows applications to run forever, without any maintenance, as long as the blockchain lives. However, the lack of an "Undo" button also makes it easy to destroy a lot of money, as the Solana decentralized exchange OptiFi learned.

OptiFi, which bills itself as "A Portfolio Margining Derivative DEX with Delta-Neutral Option AMM Vaults", provides highly advanced trading tools for the bold crypto investor. While trying to push an update to their smart contract (known as a "program" on the Solana chain), they accidentally used the command solana close program in a way that caused it to permanently self-destruct. This locked $661,000 in currency in the now-dead smart contract, with no way to retrieve it. Any programmer who has ever made a consequential mistake can commiserate - although such mistakes usually don't cost more than a house.

The team behind OptiFi promised to refund all users' deposits and posted the following lesson learned: "Don't Rush!" They also asked Solana's officials to make it slightly harder to irreversibly destroy a smart contract with money in it.

Links

Tweet thread by OptiFi OptiFi OptiFi logo link: https://www.optifi.app/static/media/optifi-logo-text.450b713c.svg

Agreement

Attribution name

No response

Personal link

No response

molly commented 2 years ago

https://web3isgoinggreat.com/?id=optifi-developer-accidentally-closes-the-project-contract-irretrievably-locking-661000