Minswap is the leading DEX on Cardano. While many other DExes have been using Plutus V2 for a longer time, Minswap was still running on V1. This was disadvantageous for the ecosystem, especially when there was a high demand for the use of Cardano. Applications using V1 are more resource-intensive. This contributed to faster network congestion. That has changed. Minswap migrated to Plutus V2. Now, it is up to 10 times more efficient. It is worth noting that the team used Aiken to develop the new version. Many interesting improvements come with the transition to the new V2 contract.
What Minswap V2 brings
In addition to a more friendly user interface, Minswap V2 brings higher throughput and many functional improvements.
The Minswap team managed to improve the speed, composability, decentralization, and versatility of DEX. Minswap V2 is more efficient than the previous version, which is reflected in cheaper fees. The fee structure has changed.
Minswap V2 offers a higher flexibility for defining a fee strategy. The team has done extensive research. Inspired by TradFi, it introduced dynamic fees. The Minswap team was contacted by several teams with a request to introduce a feature to share fees. This is now possible.
Minswap V2 uses a Smart Order Routing Algorithm to find the best prices across multiple pools when you swap tokens. It ensures efficient trade execution by taking the most optimal route based on liquidity. Users can choose their preferred execution path, with the cheapest option recommended. Think of it as an aggregator built right into Minswap.
Furthermore, the team added new advanced order types. Let’s look at some of them.
Limit Orders are different from market orders (also called Swaps). Market orders execute at the current market price, considering slippage. In contrast, Limit Orders allow traders to set a specific price for execution, which can be below the current market price. Traders choose between Fully Fill or Partial Fill.
A Stop Order allows traders to limit potential losses by setting a maximum amount they’re willing to lose. For instance, if you own coin XYZ and set a Stop Loss order at 10%, you won’t experience more than a 10% loss if the market moves against your prediction.
The Zap-In feature allows users to easily provide liquidity to a pool with just one token instead of having to provide both tokens. Newly, Zap-Out allows traders to withdraw liquidity from a pair by converting it into a single asset of their choice. The other asset in the pair is automatically exchanged for the chosen asset.
And that’s not all. Users can use advanced order features. For example, Fill-or-Kill. This order can be refunded automatically by the batcher if the price is out of the slippage range. Thus, users do not need to cancel it manually.
From the perspective of the Cardano network, throughput improvements are important.
With the V1 contract, the maximum throughput for swap orders per batch was hypothetically 8. The batcher must process orders in a fair first-in-first-out manner. Thus, the average maximum throughput was only 3 swap orders per batch. With the V2, the team made significant advances.
V2 achieves a maximum throughput of 36 swap orders per batch—a remarkable 10 times or more improvement over V1. This ensures that Minswap V2 can clear order backlogs 10 times faster during congestion while maintaining fair execution. These enhancements maintain FIFO order matching without exposing users to front running during high-traffic periods.
V2 contract will enhance composability across the Cardano ecosystem with pluggable features for order contracts. Each order can be a part of a larger chain of a composed action that can pass their state and tokens down the chain through each transaction.
V2 contract passed security audit by Certik and Anastasia Labs.
It is very positive that the Minswap team decided to open-source the V2 contract and share these techniques with the Cardano developer community.
Conclusion
From a broader perspective, the enhancement of the Minswap DEX is an important step for the entire ecosystem. In a competitive environment, it is not enough to just deliver a product but to constantly improve it. The Cardano ecosystem has many interesting DEXes. Minswap has a chance to maintain its dominant position in the ecosystem.