Portal's ADMM: A new way of reimagining AMMs
Janesh Balchandani
Jan 17, 2024
Decentralized Exchanges (DEXs) have undergone a significant evolution in recent years. Portal brings a paradigm shift with its Automated Dynamic Market Maker (ADMM) Protocol. This innovative protocol challenges existing industry norms, especially in handling complex cross-chain transfers. In this article, we delve into the key aspects of the Portal ADMM, understanding its unique features, operational logic, and the intricate flow of swap transactions.
The DeFi landscape has witnessed a surge in decentralized exchanges, with innovative protocols like ADMM redefining liquidity provision strategies. Portal DEX introduces a paradigm shift, prioritizing capital efficiency and pricing accuracy for users engaging in complex cross-chain transfers.
The ADMM protocol introduces a dynamic market-making approach, aiming to optimize liquidity provider strategies. Its unique traits set it apart in the market, promising advantages in terms of capital efficiency and pricing accuracy. The acronym ADMM stands for Automated Dynamic Market Maker, underscoring its automated and adaptive nature.
Illustrating the cross-chain capabilities of ADMM, let's consider a practical example: swapping ETH/ERC-20 on Ethereum L1 with BTC on the Lightning L2. The Ethereum L1 hosts a "DEX Contract" account overseeing the initiation, execution of swaps, and compensating validators and liquidity providers (LPs). This enables seamless interoperability between different blockchain networks.
Portal DEX implements non-custodial and atomic swaps, ensuring that until the successful completion of a swap, the custody of a trader's assets is not transferred to any party. Atomic swaps guarantee that either the swap occurs, with assets exchanged between traders, or both parties retain their original assets. This enhances security and trust in the swapping process.
Traders interact with the Portal DEX, initiating swaps that are facilitated by Liquidity Pools managed by the ADMM smart contract on the Notary Chain. Validators, operating nodes on the Notary Chain, play a crucial role in validating and securing transactions. Liquidity Providers commit to being counterparties by depositing cryptocurrencies into liquidity pools, enhancing liquidity on the platform.
The operational logic of the Portal DEX is distributed across smart contracts executed on both the Notary Chain and the respective Layer 1 (L1) chains hosting the swapped assets. Smart contracts on the Notary Chain oversee Liquidity Pools, while scripts on L1s implement escrow mechanisms, primarily through Hashed TimeLock Contracts (HTLCs).
The escrow mechanisms on L1s employ Hashed TimeLock Contracts (HTLCs), utilizing a hash of a secret generated by the trader. To obtain the counterparty's asset, the trader must disclose the secret within a predefined timelock duration. If either party fails to reclaim the counterparty's asset within the timelock, both parties gain the ability to retrieve their original assets, ensuring fairness and security in the swapping process.
The Automated Dynamic Market Maker (ADMM) governs all trades on the Portal Network, providing a decentralized protocol for overseeing cross-chain transactions. Some key features of ADMM include:
ADMM adopts an implementation akin to Uniswap V3, offering comprehensive support for market orders, range orders, and limit orders. This flexibility caters to the diverse needs of traders, providing a versatile trading experience.
LPs on the Portal Network enjoy a high degree of flexibility with range orders. These orders allow LPs to introduce a specified quantity of a particular asset into the corresponding liquidity pool. ADMM, acting as the decentralized overseer, verifies the financial capacity of LPs to meet commitments and updates global data structures accordingly.
ADMM introduces a novel concept of price range divisions known as ticks. The entire price range, from lower to upper bounds, is divided into these increments. Consider a range order example with 10,000 units of liquidity specified for a price range between 1 and 2. This order is then transformed into multiple limit orders, each positioned at distinct ticks within the range. With a tick spacing of 0.0001, each tick receives an allocated liquidity unit, ensuring an even spread across the entire price range.
Swap transactions on the Notary Chain through ADMM incur lower costs compared to traditional platforms like Uniswap. Leveraging liquidity positions for each trade becomes a feasible and cost-effective strategy, providing traders with a competitive advantage.
To mitigate the risk of swaps being front-run by a participant, ADMM implements a strategy of grouping swap transactions together for processing per block on the Notary Chain. This enhances security and prevents opportunistic front-running, contributing to a fair and secure trading environment.
Providing Liquidity and Multisig Creation:
LP Bob aims to earn yield by providing liquidity for PORTAL cross-chain swaps.
He creates a multisig with the validator network, time-locked until the end of the epoch.
Staking and Liquidity Commitment:
LP time-locks BTC and stakes 2% of the total liquidity with validators, enhancing the security and commitment level.
LP commits liquidity positions on the coordination chain for potential swap matches.
Slash Protection Mechanism:
In case an LP backs out of a trade after matching with a trader, a slash mechanism comes into play.
2% of the trade amount from the stake is slashed to discourage untimely withdrawal.
Withdrawal or Continuation:
LPs have the option to withdraw at the end of the epoch or continue into the next epoch.
This flexibility allows LPs to manage their liquidity positions strategically.
Swap Fee Distribution:
LPs receive a portion of the swap fee for each trade, paid in native swapping tokens.
Swap fees for clients are set at 0.3%, with 50% going to the facilitating LP and the remaining 50% distributed among validators through the DEX Contract Account.
In conclusion, Portal's ADMM protocol emerges as a trailblazer in the domain of decentralized cross-chain swaps. By amalgamating the strengths of smart contracts, atomic swaps, efficient liquidity management, and the innovative inclusion of range orders, ADMM offers a secure, cost-effective, and decentralized trading experience. As the cryptocurrency space continues to evolve, Portal's ADMM protocol stands at the forefront, paving the way for a more efficient and secure trading experience across diverse blockchain networks. The protocol not only addresses the challenges associated with cross-chain swaps but also introduces innovative features that enhance the overall liquidity provision and trading dynamics within the decentralized finance ecosystem. As users and developers engage with Portal's ADMM, it is poised to make a lasting impact on the decentralized financial landscape.
Dive into our most frequently asked curiosities and discover more!
Subscribe now and be the first to catch every thrilling update!