In an impressive feat of engineering, Sunny Aggarwal and Osmosis Labs — in collaboration with the Keplr and Skip Protocol teams — recently developed an implementation of EIP1559 for Osmosis in just six hours.
The upgrade was developed in response to network congestion and failed transactions on Osmosis following the frenzy of Celestia’s mainnet and native token launch. Ultimately, this benefited Osmosis users by making transaction fees more predictable, and managing network traffic more efficiently.
Celestia’s highly-anticipated mainnet launch occurred on on October 30th, 2023, along with an airdrop of the network’s native $TIA token, for which approximately 580,000 unique wallets were eligible to claim. Due to strict geo-blocking efforts, users in the United States and elsewhere were unable to claim their tokens, leaving a significant portion of tokens unclaimed.
Celestia’s Successful Launch Caused Mayhem in the Cosmos
Among other recent buzzy developments in the Cosmos, the Celestia launch caused a massive spike in interest and user activity across Cosmos appchains and applications like Osmosis and Keplr wallet.
Keplr experienced the largest spike in traffic in its history— 10x more than usual, while arbitrage bots flooded and congested the Osmosis chain. These bots were submitting transactions with excessively high amounts of gas, consuming block space even when transactions failed. This congestion prevented crucial transactions, including IBC transfers, from being processed efficiently on Osmosis.
According to Josh Lee, Co-Founder of Osmosis Labs, this network congestion was due to Cosmos’ “Fairly outdated model of handling transaction priority.” Lee went on to explain that, “Preventing an event like yesterday from happening is not by changing how IBC works, but by fixing how the chains handle transactions.”
What Is EIP-1559?
Ethereum Improvement Proposal 1559 (EIP-1559) went live on the Ethereum mainnet in August of 2021, as part of the ‘London’ hard fork upgrade.
At a high level, EIP-1559 introduced a number of changes:
New Fee Structure: Instead of users bidding for how much they’re willing to pay for their transaction to be processed (which was unpredictable), EIP-1559 introduced a ‘base fee’ for transactions that adjusts automatically depending on how busy the network is.
Optional Tips: Users can still add a tip to their transaction to have it processed faster, especially during periods of high traffic.
Burning Base Fees: The base fee paid for transactions is not given to miners (who process transactions) but is instead ‘burned,’ meaning it is permanently removed from circulation.
A number of benefits came with these changes:
More Predictable Fees: Users have a clearer idea of how much they need to pay for their transactions, reducing uncertainty.
Efficient Transaction Processing: The automatic adjustment of the base fee helps manage network congestion more efficiently.
Reducing Ethereum Supply: By burning the base fees, the total supply of Ethereum can decrease over time, which could potentially increase its value.
Emergency Response: Bringing EIP-1559 to Osmosis
EIP-1559 made Ethereum’s transaction fees more predictable and helped manage network traffic more efficiently, while also potentially making Ethereum more valuable by reducing its overall supply.
There are a number of reasons for introducing this type of system on Osmosis:
Aiming for a Dynamic Fee System: To tackle these challenges, Osmosis decided to implement a system based on EIP-1559. EIP-1559 introduces a dynamic fee model, where the base fee adjusts according to the network’s demand for block space. This model could potentially reduce the impact of spam by making it more expensive to flood the network with non-essential transactions.
Better Handling of Network Congestion: By adopting a model similar to EIP-1559, Osmosis aims to create a more predictable and efficient transaction environment. It would enable the blockchain to adjust fees dynamically based on actual network usage and congestion levels.
Long-term Network Stability and Efficiency: The move toward a more sophisticated fee model is seen as a key step in enhancing the network’s stability and efficiency, ensuring that it can handle large volumes of transactions without compromising crucial processes like IBC transfers.
In summary, the existing fee logic and transaction prioritization system in Osmosis was not equipped to handle such a scenario efficiently. All transactions, regardless of their nature or importance, were treated equally. This lack of prioritization meant that essential transactions (like IBC transfers) were not given precedence over spam or arbitrage transactions.
To resolve the network congestion issues on Osmosis, the Osmosis Labs team jumped into action with representatives from Keplr and Skip Protocol, and managed to develop an implementation of EIP-1559 for Osmosis in just six hours.
While the full implementation of EIP-1559 on Osmosis will require further development and consensus to be reached via community governance before going live, a more immediate off-chain patch with a mempool filter was deployed, which successfully alleviated the congestion issues.
The aftermath of the Celestia airdrop revealed significant room for improvement in Osmosis’s transaction processing and fee logic. In response, the decision to implement an EIP-1559-like system represents a strategic move to improve the blockchain’s ability to handle large volumes of transactions and prioritize them more effectively, thus enhancing the overall user experience and performance of the network.
Osmosis Labs is an incredibly passionate and skilled team of builders who jumped into action and quickly developed a technical solution to a complex and multi-faceted issue.
Keep an eye on the Osmosis Labs blog for future updates and announcements: https://forum.osmosis.zone/c/blog/13
Read the full article here