Use case: Private Automated Market Makers (AMMs)
Eliminate MEV manipulation in AMMs with accelerated Fully Homomorphic Encryption
What are AMMs?
An Automated Market Maker (AMM) is a type of decentralised exchange (DEX) protocol that uses algorithms and liquidity pools to price assets, rather than a traditional order book of buyers and sellers
How do AMMs work?
AMMs are the cornerstone of facilitating trades and creating liquidity in a DEX. They are a set of autonomous protocols powered by smart contracts used to:
- Facilitate trading of digital assets using liquidity pools.
- Determine pricing through mathematical algorithms (e.g. constant product formula)
- Enable market access 24/7 without centralized order books
- Allow permissionless liquidity provision and earn transaction fees
- Operate trustlessly via smart contracts, reducing reliance on intermediaries
- Power composable DeFi systems by integrating with lending, yield, and derivatives
- Provide governance features via DAOs for protocol upgrades and decisions
- Enable risk mitigation tools for impermanent loss and slippage
- Explore cross-chain liquidity through bridges and interoperability mechanisms
Privacy issues in AMMs
AMM’s inherently exposes users to MEV sandwich attacks, as transaction data such as price is transparent and publicly visible on the blockchain, making it easy for malicious actors to “front run” trades. This often happens where bots see incoming trades on the public blockchain and place their own orders first to inflate price and profit from the price change, resulting in a worse price for the original trader.
How FHE can help
Fully Homomorphic Encryption enables:
- Encrypted mempools
- By keeping transaction data hidden until block inclusion, FHE removes the visibility that MEV bots rely on to reorder or manipulate trades
- Encrypted transaction data
- Traders submit their swap intentions in an encrypted format, meaning the details – what they are buying, selling and for how much – are shielded from public view. The AMM smart contract processes these encrypted trades without ever decrypting them, preventing bots from seeing and exploiting the orders
- Encrypted computation
- This means no observable state changes for malicious bots to analyse in real time – even between blocks. Only the final output amounts are returned to the user (often via threshold decryption mechanisms involving multiple parties), preventing any intermediary from gaining an advantage by observing the transaction’s content. This fundamentally alters the economics of MEV by removing the information asymmetry that attackers exploit.
How we can help you bring this use case to life
For a confidential AMM to be viable, it must process encrypted trades with very high throughput to prevent market inefficiencies and provide a seamless user experience.
LightLocker Node acts as the high-performance, quantum-secure engine for these protocols.
By executing the complex homomorphic operations of a swap in milliseconds rather than seconds, and supporting a throughput of >100 transactions per second (TPS) it ensures that the AMM is responsive, fair, and protected from the predatory MEV tactics that thrive on information delay
Commercial benefits

Increased user trust and retention
By cryptographically preventing predatory MEV tactics like front-running and sandwich attacks, a confidential AMM offers users a fairer trading environment.
This builds significant trust, leading to higher user retention and greater trading volumes.

Attract institutional capital and new markets
Institutions and professional traders are highly sensitive to information leakage and MEV.
An FHE-powered AMM is post-quantum resilient and provides the confidentiality and security they require, making it a premium venue for attracting their substantial liquidity, which in turn increases fee revenue.

Strong competitive differentiation
In a crowded market of decentralised exchanges, offering a verifiably private and fair trading experience is a powerful unique selling proposition (USP).
It allows your platform to capture market share from competitors that cannot offer the same level of security and user protection
How does it work?
Tech-friendly description
Standard AMMs operate on plaintext state, making their mempools a transparent environment ripe for MEV extraction via front-running and sandwich attacks.
FHE offers a robust, quantum-secure cryptographic solution by enabling computation on encrypted inputs within the AMM’s smart contract logic.
In an FHE-powered AMM, a user’s swap—including the asset pair, input amount, and slippage tolerance—is encrypted client-side before being submitted as a transaction. The smart contract, executed by network validators or L2 sequencers, then performs the necessary operations homomorphically.
For example, it can use FHE circuits to:
– Verify balances: Check if the encrypted user account holds a sufficient encrypted balance of the input token
– Calculate swap amounts: Apply the x*y=k formula or more complex bonding curve logic directly on the encrypted input amounts
– Check slippage: Homomorphically compare the resulting output amount against the user’s encrypted slippage parameter
Schemes like TFHE are particularly well-suited for this, as they can efficiently handle the boolean logic and comparisons required for operations like slippage checks via programmable bootstrapping.
The state of the AMM’s liquidity pools is also updated using encrypted values.
Only the final output amounts are returned to the user (often via threshold decryption mechanisms involving multiple parties), preventing any intermediary from gaining an advantage by observing the transaction’s content.
This fundamentally alters the economics of MEV by removing the information asymmetry that attackers exploit.
Exec-friendly description
Within DeFi markets, users are losing billions through predatory MEV tactics like front-running and sandwich attacks.
This largely happens through front-running, where predatory bots see incoming trades on the public blockchain and place their own orders first to profit from the price change, resulting in a worse price for the original trader.
This erodes trust and makes institutional participation in DeFi markets risky. Confidential AMMs, enabled by Fully Homomorphic Encryption (FHE), solve this problem.
Traders submit their swap intentions in an encrypted format, meaning the details – what they are buying, selling, and for how much – are shielded from public view. They function like a secure black box on the blockchain.
The AMM smart contract processes these encrypted trades without ever decrypting them, preventing bots from seeing and exploiting the orders.
For financial institutions and professional traders, this creates a fairer, more predictable, and secure trading environment. It protects valuable trading strategies from being copied and significantly reduces the hidden costs of MEV, delivering the trust and privacy needed for mainstream adoption of DeFi.