🧨 Drifty — a Different Kind of DEX

Hello, everyone. I’m Sasha from the MSQ team. You might know us from the MSQ wallet or BURN.

Today, we’re introducing our new project, Drifty.

In short, Drifty is a DEX designed to solve the long-standing problem of Impermanent Loss (IL). It allows you to fearlessly provide liquidity for your favorite projects and actually profit from it.

Our Socials

The Problem Every Token Holder Faces

We’ve all been there. You believe in a project, you hold its token, and you want to support its growth. Providing liquidity seems like a great way to help. More liquidity means lower slippage, which attracts more traders, generating more volume and more fees for liquidity providers (LPs). It’s a beautiful, positive feedback loop.

But there’s a catch. Most of us are afraid to provide that liquidity. I’ve even written about this conflict of interest before.

The fear is Impermanent Loss.

You, me, the vast majority of token holders — we aren’t professional market makers. We have jobs, families, and lives to lead. We can’t spend our days glued to a screen, managing positions, and calculating returns.

So what happens? You provide liquidity, hoping for the best. But if you don’t watch your position like a hawk, you’ll eventually find that a big price swing has occurred. You check back and discover your position is no longer making you money. It has been converted almost entirely into the other token in the pair, and you’ve often lost value compared to if you had simply held your original tokens.

Even the “hands-free” pools on older DEXs aren’t a great solution. The APR is often so low you’d be better off in a traditional bank, which at least insures your funds.

This creates a fundamental conflict:

  • As a token holder, you want the price to go to the moon.
  • As a liquidity provider, you need the price to stay as stable as possible to maximize your fee income.

Automation is the Answer

At Drifty, we believe Impermanent Loss is just a symptom of a lack of automation.

The solution isn’t to make you, the LP, work harder or learn complex new mechanics. The solution is to build a system that understands IL and actively works to fix it for you, without you having to lift a finger.

Think about the difference between a professional market maker (MM) on a centralized exchange and a typical LP on a DEX.

When a pro MM’s orders are filled, they accumulate an “inventory” of the other asset in the pair. They have a strategy and sophisticated software to manage this inventory, selling it off to cover any potential losses and secure a profit. For them, this imbalance is just part of a calculated process.

Most LPs, on the other hand, don’t have a strategy. We see “Fees Earned” on the dashboard and think that’s our final profit. The UI of almost every DEX encourages this misunderstanding! But a professional knows that’s not the real profit until the “inventory” — the impermanent loss — is dealt with. Most of us don’t even know what IL is until we see our position has earned $100 in fees, but we’re down $200 overall. Plus, the math behind liquidity pools is notoriously difficult.

Drifty acts as your personal, automated guardian market maker.

It doesn’t just hand you the fees. Instead, it tracks the exact IL for every LP and uses those collected fees to first get rid of that IL. It systematically sells off your unwanted “inventory” to bring you back to a position of profit, in the token you originally deposited.

More Than Just a Fix — A Better Engine

Automating away your IL is just the start. Because Drifty is its own DEX with zero-latency access to all the liquidity, it can do things that add-ons to other DEXes (like rebalancers) simply can’t.

Drifty actively manages your liquidity for you.

  • It automatically concentrates your position around the current price to maximize fee generation.
  • It relaxes your position during high volatility to protect you.
  • It even dynamically adjusts a pool’s trading fees based on market greed, earning you more (recovering the IL faster) when traders are active and attracting volume when things are quiet.

Your liquidity is always working for you, always optimized, and you don’t have to do anything. We aren’t just automating your work; we are optimizing the market itself to extract more value for you.

Key Drifty Features

  • Impermanent Loss Recovery: The system is designed to recover your initial deposit, even as the token price changes.
  • Automatic Liquidity Management: No more manually adjusting price ranges. Your liquidity is always active and earning.
  • Dynamic Fees: Earn higher fees during peak volatility.
  • Single-Sided Liquidity: Provide just one token to a trading pair, lowering the barrier to entry.
  • Limit Orders: Place buy and sell orders at specific target prices.
  • Infinite Scalability: Built to handle billions in liquidity and countless positions and orders simultaneously.
  • Resilience: Designed to be reliable during market manipulation and flash crashes.
  • Revenue Sharing: Stake $BURN and provide liquidity in designated pools to earn 100% of Drifty’s fee revenue from nearly all other pools on the platform.

What This Means for the ICP Ecosystem

We believe this will unlock a massive wave of liquidity from everyday token holders who are no longer afraid of IL.

Imagine the impact:

  • Deep Liquidity for Every Token: With so many LPs confidently providing liquidity, slippage will plummet. Traders can execute large orders, which attracts even more volume, generating more fees, creating a powerful, self-sustaining cycle. Every token becomes a separate strong market, not just some top-tier tokens, like it usually happens.
  • Instant Utility for New Projects: A new project can launch its token and immediately have a powerful use case. Just encourage your community to provide liquidity on Drifty. Your holders can start earning right away, simply by supporting you. And since there is liquidity, the traders will come as well to profit from the price fluctuations.
  • A New Home for ICP: With the recent proposal to cut ICP inflation, a significant amount of liquidity may be unlocked from neurons. Drifty offers a perfect new home for that capital, allowing holders to stake their ICP and continue earning a passive, optimized APR.

Because Drifty is completely “set-and-forget”, it also opens the door for other amazing DeFi applications to be built on top of it — launchpads, lending platforms, derivatives, and more.

We truly see Drifty as one of the most important DeFi primitives for ICP’s future.

Where to Learn More

This is just an overview. To really understand what’s under the hood, we are publishing a series of articles called Drifty By Example. If this post resonated with you, I highly encourage you to dive deeper there.

Join the Conversation

More information is coming soon, and I’ll keep this topic updated. Please, ask me anything — I’m happy to explain every detail.

Thank you

15 Likes

Sounds like a very commmendable project but due to ICP’s ~2sec finality I’m not sure Drifty could currently scale to thousands of users and provide fair balancing to all at the same time

1 Like

Thank you!

Ofc it can! You just scale horizontally, across subnets, not vertically. Yes, a single pair of tokens (e.g. ICP/USDC) would still live in a single subnet, so it can’t scale further, but we’re nowhere near this kind of activity on ICP to make that a problem.

And when we do get to those amounts of tps, we can still create alternative versions of the same pool in different subnets, scaling it further. See it just like the same pair being traded on different platforms - the immediate price might differ, but it is synchronized with arbitrage every now and then.

3 Likes

Looking forward seeing how this project progresses, if it truly solves the dilemma of impermanent loss it will be a huge deal indeed

1 Like

Thank you!

I urge you to read the series, because it describes this in detail. But essentially, Drifty gives you the following guarantee: As long as you’re providing liquidity to an active pool (where trades happen regularly), given enough time, ANY impermanent loss, no matter how bad it was, will eventually be recovered. And you don’t have to do anything for this to happen.

So it truly does solve the IL :slight_smile:

1 Like

Hello everyone!

Drifty’s development goes super-good. Everything comes together exactly the way we were hoping for!

We’ve prepared a live demo for you at our website:

It is 100% open source and uses 100% real algorithms under the hood. If you have any questions, please, don’t hesitate to ask here or in our telegram group.

Have a great day!

9 Likes

I’m a simple man. I like web development and design, therefore I like websites and dapps that are original, and your demo is. So thumb up :+1: and keep up the great work! :flexed_biceps:

2 Likes

sending waves of millennial analog VHS gratitude vibes

Thank you!

2 Likes

These are some very bold claims.

Truly exciting stuff.

Will definitly follow your progress.

1 Like

Thank you!

Which of those claims seem like bold ones to you? I’d be happy to explain everything in detail.

1 Like

I have not gone through all the explanation in your Git hub yet.

My current understanding of IL, is that given enough time, if prices return to a similar ratio to your pool entry point, it goes away. This is why it is impermanent by definition.

The claim drifty is making, is that through automated repositioning, drifty will always recover your position, given enough time. The question is “what is enough time?” and how is that different than waiting for prices to stabilize to entry point ratio in classic LP?

1 Like

Great question!

Short answer: with drifty, even if you won’t wait at all, you end up in a better situation IL-wise, because the AMM will be able to recover at least some of your inventory.


The problem with classic IL understanding is that there is an assumption that:

  1. The price will eventually go back to the start, naturally recovering all of your IL ticks. OR
  2. Your position will always be in range, so even if the price doesn’t go back, you always earn fees and compensate yourself for the IL.

In reality the price might never go back. And your position might never again be in range, if you use concentrated liquidity DEXes (Uniswap v3-v4, ICPSwap, etc.). So in reality there are situations when you impermanent loss becomes permanent.

You can use non-concentrated DEXes (Uniswap v1-v2, KongSwap, etc.) - they guarantee you that eventually you will be compensated for any IL by simply earning fees. But they only offer ~5% APR - you better off with a regular bank deposit (same yield, less risk).

Drifty gives you the guarantee that your IL will be recovered, and offers you a much higher APR. You have the same passive experience as in KongSwap - no positions, no manual rebalancing. But your APR is similar to what would you have in ICPSwap, if you were a professional market maker managing your positions 24/7.

Other DEXes don’t recover your IL, they just give you fees which “compensate” you for the IL. If you want your original token back, you have to sell your IL, losing additional money on slippage and fees. Drifty recovers the IL for you automatically - restoring not just the original $ value of your position, but the original balance in tokens. If you originally deposited 100 ICP, given some time, you will withdraw back 100+ ICP, and not 50 ICP + some other token.

And the recovery protocol works constantly, with each swap (unfortunately, if the pool has no swaps, nothing happens). Which means that even if you wait a little bit, it would still be able to recover SOME impermanent loss, if not all. Which is better than nothing - less IL for you to sell yourself, losing value on slippage.

1 Like

Thanks for your work @senior.joinu! I still don’t feel like I understand the part about recovering IL. Can you walk us through an example? Let’s say I deposit 1000 ICP and 5000 ckUSDT, and the price of ICP falls from 5 ckUSDT to 1 ckUSDT. What happens in that case?

1 Like

Sorry that hit a little too close to home. :rofl:

2 Likes

Let’s have even a little bit simpler example, to understand that.
Let’s say we have hypethetical tokens AAA and BBB in the AAA/BBB pool.

Initial price was 1.00, meaning 1 AAA for 1 BBB.
You are the only LP in the pool and you provide 1000 BBB to the pool. It is so happens that the algorithm decides to spread your liquidity evenly in price range 1.00 → 3.00. (3.00 means 3 AAA for 1 BBB).

Let’s say that this price range in our example is divided in 20 ticks (in reality such a range would contain around 11k ticks). So each tick has exactly 50 BBB.

In this initial state you have 0 IL. If you withdraw right now, you get back exactly the original amount.

Let’s say a swap happens: someone swaps their AAA for your BBB. It is so happens that after that swap the price is exactly 2.00 - meaning ~half the ticks of your BBB are replaced with AAA.

Now you have 500 BBB and some amount of AAA with can be calculated using the GP sum formula. These green dotted ticks is your inventory. To calculate the IL you just compare how much BBB you actually spent on those AAA, vs how much BBB you would get if you sold those AAA right now.

We don’t actually care about the exact numbers here. The important thing to understand is that each green tick contains a different amount of AAA, because each of them was sold with a different price. The most under-the-water IL tick (furthest from the current price) contains around half AAA of the closest from the current price.


Now to the main part. We need to get rid of that IL. How do we do that?
If we just sell it we’ll be at a (impermanent) loss, right?

Let’s say we’ve earned some fees, the price didn’t change much. And now let’s say a new big swap arrives - it wants to swap BBB for AAA.
If we have enough fees we could use those to kill two birds with one stone:

  1. Sell some portion (maybe all) of the most under-the-water IL tick, recovering our reserve.
  2. Lower the slippage for this incoming swap.

To sell the last IL tick right now we need to add some AAA to it, so being sold at the current price it would give us the original amount of BBB that was spent on acquiring that AAA back then.

We add that AAA on top of that tick using our collected fees. Now this tick can be freely MOVED to the current price and sold.

And if we have more fees, we can stack more and more ticks this way, selling all of them at the current price. Deepening the liquidity extremely well. When those ticks are sold, they are added to the reserve evenly, so the reserve is always an even layer.


You can see all of that in the live demo.
Notice how sometimes there are these “waves” of dotted ticks.

They appear on one side and then slowly “melt” on the other side. This is exactly the IL recovery in action, selling most under-the-water ticks with fees.

Sorry to post ChatGPT, but it will help at least Me to understand better. Might help others too.

1. Is the mechanism internally coherent?

Yes. Nothing in your example breaks conservation of value.

What you are doing is not “removing IL for free”. You are:

  • Using external value (fees paid by traders)
  • To top up under-water inventory
  • So it can be sold at the current price without realizing a loss

This is economically equivalent to:

“Fees subsidize the difference between historical acquisition price and current market price.”

That is valid.

You are not:

  • Printing value
  • Repricing past trades
  • Undoing market movement

You are spending earned surplus to rebalance inventory.


2. Why the tick logic makes sense

Your tick intuition is correct.

Each green tick:

  • Represents AAA acquired at a different price
  • Further ticks = worse effective entry price
  • Therefore deeper ticks have larger unrealized IL

Key insight (correct):

You should heal the worst ticks first, not the closest ones.

By:

  • Adding AAA (from fees) to the deepest tick
  • You raise its effective cost basis
  • So selling it at the current price returns the original BBB spent

That is equivalent to closing a losing position using profit earned elsewhere.

This is exactly how professional market makers manage inventory.


3. Why this reduces slippage and heals IL simultaneously

This is the strongest part of your model.

When a BBB→AAA swap arrives:

  • You want more depth at the current price
  • You also want to unload toxic inventory

By stacking healed ticks at the current price:

  • You deepen liquidity
  • You reduce price impact for the trader
  • You monetize fees more efficiently

This is positive feedback, not circular logic.

The trader gets:

  • Better execution

The LP gets:

  • Inventory normalization

This is economically sound.


4. Where the value comes from (critical point)

The value comes from fees paid by traders.

That means:

  • IL recovery is not free
  • It is funded by:
    • Volume
    • Volatility
    • Willingness of traders to pay spread

As long as:

Fees ≥ IL accumulation rate

the system can converge.

This is why your “waves” appear and melt:

  • Fees accumulate
  • Bad ticks are healed
  • Inventory smooths out

5. Necessary conditions for this to actually work in production

This only works if all of the following are true:

1. Sufficient and continuous volume

No swaps = no fees = no healing.

Dead pools will not recover.


2. Fees must be large enough

If:

  • Volatility is high
  • Fees are low

Then:

  • IL grows faster than recovery

This becomes indistinguishable from a normal AMM.


3. Trends must not be perfectly one-way

In a monotonic trend:

  • New underwater ticks are created faster than old ones can be healed

Recovery still happens — but it may never catch up.


4. Traders must accept your execution quality

If your effective spread becomes worse than alternatives:

  • Flow leaves
  • Recovery stops

This is a competitive equilibrium problem, not a math problem.


6. What this does not guarantee (important)

Your mechanism does not guarantee:

  • Instant IL recovery
  • Recovery during zero-volume periods
  • Immunity to black swan price moves
  • Better results than an elite human MM in all regimes

What it does guarantee is:

Any fees earned are applied in the most IL-efficient way possible, instead of being paid out while inventory remains broken.

That is a real improvement over v2/v3.


7. Does this violate AMM fundamentals?

No.

This is conceptually similar to:

  • Dynamic fee reinvestment
  • Inventory-aware AMMs
  • “Loss-absorbing” liquidity buffers

The novelty is:

  • Granular tick-level healing
  • Always prioritizing worst inventory
  • Automatic execution

That’s engineering, not alchemy.


8. Final verdict

Can it work?
:white_check_mark: Yes — economically and mechanically.

Is it guaranteed to win?
:cross_mark: No — it depends on volume, fees, and market structure.

Is it strictly better than “fees compensate IL”?
:white_check_mark: Yes — because it restores inventory, not just PnL.

Your example is sound, and the “melting wave” intuition is actually a very good mental model.

1 Like

k i’m not going to lie this is a bit much for me to wrap my head around.

But my understanding is this:

Drifty’s automated LP adjustment strategy mitigates potential downside by self correcting the position. (by leveraging fees from swaps, putting them to work immediately)

But this does not gaurantee the ability to recover the position under all conditions.

Is that a true statement?

1 Like

Here’s something else I was thinking about.

In the theoretical perfect scenario, where I exit my position at the perfect ratio - the same one I entered.

Does this self correction that drifty did mitigate my upside as well?

I.e. I understand in the worst case scenario I am clearly better off with drifty. But in the best case scenario, is Drifty’s automated strategy capping upside?

1 Like

Thank you @Henn91! This is quite a good summary/analysis actually.


Yes, this is pretty much the short version of what @Henn91 posted.

The guarantee is as follows:

As long as the pool you provide liquidity to is active (swaps happen regularly), your IL eventually will be resolved.

So the model falls apart if the pool becomes inactive. Trades might stop because of various reasons, such as:

  1. Not enough interest in the traded asset. If you provide liquidity to some POOPMEMECOIN/ICP pair and then the founder of that project went missing - you’re in trouble, doesn’t matter if you use drifty or something else.
  2. Too shallow liquidity. If there is only 10 ICP deposited to your pool, the slippage (and the fees) are gonna be extremely high no matter what you do algorithmically. There won’t be a lot of trades in that pool, until more capital is deposited. The good thing is that since drifty manages liquidity automatically, it is easier to talk people into LP-ing, because they don’t have to manage anything.
  3. In some scenarios, fees might get pretty high, if both AMMs are in huge IL. Big fees is the same as big slippage (big spread) - it might not be profitable to trade in those conditions. We will certainly be putting some timer-based circuit breakers for those situations. So if the fees are higher than usual and for quite some time there are no trades, fees will be lowered gradually, until trades happen again.
  4. Etc.

The only thing I’m not quite agree with is this passage:

Even if fees are low, given time this will still be better than a regular DEX, because at least SOME IL will recover over time. Even if it is only a single percent of the total inventory, it is a percent less stress on the system, when LPs are gonna sell that IL later on.


Thank you guys! I’m having a real blast talking to you right now!

Short answer: no - the upside is the same (or better) as in other systems.

If you did catch some IL and then recovered it - it only could happen if the price of YOUR deposited asset has grown. Let’s say it was X and became 2X. Before you recover any IL, you’re at a loss. But after you recover the IL you get yourself 100%+ of your original token, which now costs twice the original price. So you have twice the original values in terms of the other token from the pair.

UPD:

When there is no IL the fees are sold directly to be added to your position. So your position just grows over time.

1 Like