EThis is a scalability technology of the "rollups" type, which encapsulates a large number of Ethereum operations and synthesizes them into a single operation that is then stored in the blockchain. In this way, the Optimism protocol can take hundreds of operations and reduce them to just one, increasing the scalability of the network while maintaining security.
Optimism was presented in June 2019 and by October of the same year they would have already launched their testnet. Still, it wasn't until January 2021 that a mainnet alpha and finally in December 2021 when Optimism was released globally with full support for Ethereum and its EVM.
Do you want to start enjoying the world of cryptocurrencies, ? Then it's time to open your Bit2Me user account. It's very easy to do following this link to get started with your first purchase on Bit2Me.
What are Optimistic Rollups and how do they work?
Optimistic Rollups (ORs) are a very special type of blockchain operation. This allows the use of advanced cryptography to group tens or hundreds of operations into one. In this way, we can increase the processing capacity of the blockchain, and at the same time, maintain the verification capacity of the operations carried out by only verifying the synthesizing operation.
ORs not only allow this type of action on simple transactions, but can also be applied to more complex operations that include smart contracts. Hence, Optimmistic Rollups is considered one of the largest and most promising scalability technologies of Ethereum.
To achieve this, Optismism has created a network of special nodes on which it runs the Optimism Virtual Machine (OVM), a derivative of the Ethereum virtual machine (EVM). The set of networks of OVM nodes allows to establish a decentralized network of nodes that can interact as Layer2 of Ethereum. There, developers can replicate Ethereum DApps and release them onto the Optimism network for use. Since Optimism and Ethereum are compatible at the code and crypto level, such a migration is almost transparent, which eases the work of developers and at the same time makes it easier for users to access. In fact, you can use Optimism with Ethereum wallets like Dappradar, all with a couple of clicks to achieve it.
Optimistic Rollups, the technological key of Optimism
Now, the name of Optimistic Rollups has its origin in two points:
First of all, “Rollups” are used, which are nothing more than sets of grouped transactions that are synthesized in a single operation and are stored in the main chain. When Optimism users perform operations, these operations are handled by the Optimism network nodes.
This network works based on a Proof of Stake (PoS) scheme, with its own consensus rules and speed of operation. All these operations are taken by the Optimism nodes and when validating a set of them, they generate a unique cryptographic proof that allows them to establish a direct relationship between the operations of the Optimism network and the operation that is sent to the Ethereum network, where it can be verified and be computed like any other Ethereum transaction.
Second, it is called “Optimistic” due to the fact that the solution always seeks the optimal balance between security and speed. This is possible because Optimism nodes only publish the minimum necessary information without proof, assuming that they work without committing fraud and only providing proof in case of fraud.
On the other hand, like most Ethereum Layer2 solutions, funds transacted on Optimism are stored in a smart contract on Ethereum, where users deposit funds, Optimism nodes enroll, and fraud proofs are compromised. The usual process with which you can interact with this type of solution is as follows:
- A user sends an off-chain smart contract deployment transaction to an Optimism node.
- The node locally deploys the transaction that creates the new smart contract.
- The new state root (also known as the merkle root) is computed.
- The Optimism node creates an Ethereum transaction containing the new state root, which is taken as completed.
Advantages and disadvantages of Optimism
The main advantages of this technology are that:
- It offers enormous flexibility in generalized computing (Turing-complete / EVM-compliant).
- It allows to dramatically increase scalability without the need for hard forks on Ethereum. (Optimism can theoretically process about 2000 transactions per second.)
- All data is available on-chain (no need to trust off-chain data providers).
- Optimism is resistant to reorgs and the attacks that can cause them. For example, a reorganization of Ethereum would have to be greater than 50 blocks for the network to begin to be affected and must be reorganized. This ensures that the Optimism network will maintain Ethereum-like security levels at all times.
While among its main disadvantages we can mention:
- Limited performance compared to some other Layer2 solutions (Plasma, ZK Rollups, etc).
- Some additional security issues are raised (discussed below).
- Within the Optimism network it is quite easy to apply some type of censorship, which, although it is detectable, is still a point against the implementation.
Passing tokens between Ethereum and Optimism
Optimism is designed so that users can send arbitrary messages between Optimism and Ethereum smart contracts. This makes it possible to transfer assets, including tokens ERC-20, ERC-721 and ERC-1155, between the two networks, without complications. The exact mechanism by which this communication occurs differs depending on the direction in which the messages are sent.
Optimism uses this functionality in the standard bridge to allow users to deposit assets from Ethereum to Optimism and also allow withdrawals from Optimism back to Ethereum. See the developer documentation and examples for details on the inner workings of the standard bridge.
To send messages from Ethereum to Optimism, users simply need to activate the contract in Ethereum to create a new block in Optimism. User-created blocks may include transactions that appear to originate from the address that generated the block. For their part, it is not possible for contracts in Optimism to easily generate transactions in Ethereum in the same way that Ethereum contracts can generate transactions in Optimism.
As a result, the process of sending data from Optimism to Ethereum is somewhat more complicated. Instead of automatically generating authenticated transactions, we need to be able to make provable statements about the state of Optimism to contracts sitting on Ethereum.
Making provable statements about the state of the network requires a cryptographic compromise. The Optimism state is updated after each block, so this commitment will also change after each block. Commitments are posted regularly (twice an hour) to a smart contract within the Ethereum network.
Users can use these commits to generate Merkle tree tests on the state of Optimism. These proofs can be verified by smart contracts on Ethereum. Optimism maintains a convenient cross-chain communication contract that allows these tests to be verified on behalf of other contracts. In this way communication between both networks is maintained.
Optimism, an open field for DeFi
Optimism's ability to run any smart contract designed in Ethereum on its own network allows it to be a development space for Web3 y DeFi without equal In fact, Optimism has one of the largest deployed DeFi ecosystems.
From DeFi applications such as Synthetix, Lyra, Perpetual, Uniswap, 1inch, AAVE, Curve Finance, DeFi Saver, Instadapp, Matcha, Tornado Cash, through NFT ecosystems and cross-chain bridges. The reason for this expansion is its speed of operation, the very low cost of operations and the simplicity of implementing DApps on this network.
Do you want to start enjoying the world of cryptocurrencies? Then it's time to open your Bit2Me user account. It's very easy to do following this link to get started with your first purchase on Bit2Me.
Using Optimism is quite simple. If you already have a wallet like MetaMask installed, adding support for using Optimism is fairly easy. Just add these parameters to the wallet:
- Network Name: Optimism
- Network URL: https://mainnet.optimism.io
- String Identifier: 10
- Currency symbol: ETH
- Block explorer URL: https://optimistic.etherscan.io
And if you want to make it easier, you can use Chainlist to add the network to your MetaMask in a couple of clicks:
In any of the cases, once the network is added, you only have to go to any DApp that uses Optimism and you will be able to use it without major problems. For example, in the following screenshot you can see how we use Uniswap within the Optimism network.
In any case, remember that to use Optimism you must add a balance in your favor within the Optimism network, something you can do from your bridge. The process is quite simple, you just have to have a balance in your wallet (using the Ethereum network) and add the token balance you want so you can use it on the network.