PancakeSwap, a decentralized exchange, has unveiled the codebase and white paper for its fourth version on March 15. The latest release aims to enhance user experience and address liquidity providers’ concerns. It introduces custom liquidity pools and flash accounting, which are intended to reduce gas costs for users and prevent impermanent loss for liquidity providers. To support further development of the PancakeSwap protocol, the team plans to establish a development fund.
PancakeSwap is currently the third-largest decentralized crypto exchange, with over $2.3 billion worth of assets locked in its contracts across nine different networks, according to DefiLlama. The team has announced that version four will be launched on the Ethereum and BNB networks in the third quarter of 2024.
The introduction of “hooks” in v4 allows independent developers to create customizable add-ons for specific liquidity pools. These hooks enable pools to offer dynamic fees, custom oracles, and active liquidity management modules. Additionally, the new version supports liquidity book pools, which use a different formula from traditional pools, resulting in no impermanent loss for liquidity providers and no price impact for traders within a bin.
Gas costs have also been minimized in v4 through various changes. The consolidation of all pools into a single contract using a “singleton” model reduces the cost of multi-hop trades that require multiple swaps. Furthermore, the implementation of flash accounting optimizes the accounting process by computing net balances for a batch of transactions, further reducing gas costs.
The team has released the new code under an open-source license, allowing developers to fork the code and apply to become affiliates, receiving official recognition from the team. To incentivize developers, PancakeSwap has launched a $500,000 developer program to fund the creation of hooks for v4.
As the crypto user base continues to grow, decentralized exchanges are competing to introduce new features and capture market share. Uniswap, for example, recently announced the release of a web extension wallet with its exchange integrated. In November 2023, Uniswap introduced a voting feature called “gauges” that allows PancakeSwap’s tokenholders to vote on which pools would receive additional rewards.