Reimagining the AMM with 1inch Aqua | Tanner Moore at ETHOnline 2026

ETHOnline 2026 · 9 Sept 2026 · 23:37

Tanner Moore explains how 1inch Aqua reworks automated market maker (AMM) design so that liquidity stays in the provider's own wallet instead of a pool contract, addressing the fragmentation, lock-up and repeated due diligence that liquidity providers face today. An 80-line Aqua router records wallet commitments and settles swaps atomically, while Aqua apps hold the price curve logic and strategies commit balances to them. This means the same tokens can back several trading pairs, and a later trade simply reverts if the funds have run out. He also covers SwapVM, which assembles AMMs from opcodes through a builder SDK, shows the model running a flash loan, and answers hackathon questions about deploying custom opcodes.

Speakers

Topics

From ETHOnline 2026, hosted by ETHGlobal.

Transcript

[music] My name is Tanner. I am a technical account manager at 1 in. And today we are going to be going over the presentation reimagining the AMM with 1-in Aqua. So let's jump in. So uh we're going to start with the current landscape of dexes as everybody knows them today. We will then move on to what Aqua is and how it reimagines AMM design. We will then talk about tools we have built to streamline Aqua development.

Then go on to extending this technology beyond just AMMs. We'll talk about the benefits for LPS, traders, and builders. And then we'll wrap up with talking briefly about the bounties for this hackathon. So let's start with an example. We have Bob here. He is a liquidity provider, also known as an LP, and he would like to earn some yield on his Ether and USDC. He will go look for various protocols where he can deposit this pair into. And let's just say he settles on the wrapped EtherUSDC pair in Uniswap B2.

He will put his Ether and USDC into this contract and it will sit there and he will get some sort of redemption coupon either, you know, through well, since this is V2, this would be an ERC20 if I remember correctly. and he'll be able to pull that out later and he will hopefully earn yield on that uh over time as people start to use it. So let's say Alice, a trader comes through and she eventually finds his pool and she would like to trade her ether for the USDC in that pool. She will send her Ether into this contract. She will get her USDC out and that makes her happy.

And then Bob also gets a small amount of USDC out of that transaction in the form of a fee and he's happy. So both sides get the tokens they want. One side earns yield and one side has their token swapped. But obviously there are a lot more LPS and a lot more protocols than just unis swap, right? There's curve with its own LPS. There's Sushi Swap with its own LPS. And the list goes on and on. And the original problem, if we go back to DeFi summer in 2020 and maybe a little bit before in 2019, we had this like really hard problem where Alice didn't know where she should go to swap her tokens. Um, and as many of you know, this was solved pretty early on in the form of an aggregator. One in was one of the original aggregators and still one

of the dominant aggregators in the space. And that basically solved it from Alice's perspective. She just goes to 1 in or any other aggregator and just uses the interface. The aggregator takes care of all the complexities of figuring out where the correct place is to actually do that token swapping and everything gets abstracted away and it's very nice for Alice. So to her the liquidity on chain feels extremely unified. As long as one of these indexers like 1 in has picked up that pool, it is completely visible to her in a very optimized way. But in reality, this actually accelerated the fragmentation that was happening on chain because it basically put a bandit over the biggest problem uh at the time, which was like how to actually get all

this liquidity available to everybody uh in the form of just kind of dynamically routing them to it. And as this kind of grew and grew in the background, the same implementations of custody, accounting, settlement were all being rewritten or maybe forked or maybe forked and slightly changed and it just kind of created this mess that we never really had to deal with. So I want to talk about the drawbacks from the perspective of the LP, which is a group of people that probably got quite underrepresentative over the years in DeFi.

Um, and the first is choosing where to deposit your liquidity as an LP really sucks. Like if if I'm Bob and I have USDC and Ether and I want to go earn yield on that, I have a pretty hard problem in front of me of actually choosing the protocol where I'm going to deposit that liquidity. There's also a lot of opportunity cost to doing this LP. So if Bob puts his liquidity into unis swap that makes it impossible for him to earn yield on any other competing protocol. So he very much commits to whatever protocol it is that he's going to earn this yield from.

And if he had a token pair like a USDC uh a ether instead of uh USDC ether now he also loses the ability to vote in Dow governance which is something that a lot of protocols used to do where they would just take the token balance that sits inside of your wallet and allows you to vote that way. So if you move your tokens to another wallet, you now don't get to participate in token governance either. Um, the next problem is moving funds is actually generally pretty high friction for LPS. So, if you commit to uh putting your funds into unis swap, you actually

have a lot of due diligence to do. You need to make sure that the uh website you're using is correct. You need to make sure that the contracts you're depositing to is correct. You need to check the call data that's being signed uh for its correctness. And ideally, if you're very security conscious, you'd even uh use a simulator like Tenderly or something to actually check that that transaction really does exactly what you think it does. And once you've done all of that, you now have a position in this protocol. But if you want to change protocols to earn yield on something else, you first have to pull that back out, which involves a lot of being careful and checking all of your transactions. And then whatever protocol you're going to next, you have to do the same song and dance again where you're checking the website, the contracts, the

call data, simulations, and all of that. And every time you do this swap, you have all of that overhead of actually doing it properly. Um, so you don't risk giving your funds away to some sort of scammer or DNS hijacking or anything like that. And the last is new projects just continually increased this fragmentation and in fact they materially incentivized it through token emissions from their own protocol through some for uh some form of boosted pool. So each new protocol just kind of made this problem worse and worse and worse and they kept trying to split the pie further and further into smaller slices.

So if we go and look at this kind of design we've talked about so far with this AMM in the middle that's holding the funds and doing the transactions or helping facilitate the transactions. This was where we really started focusing when we started developing Aqua and we wanted to ask this question. Is there a way to have the experience of an AMM that everybody is extremely familiar with at this point but allow the funds to go directly from the trader to the LP and have the LP's funds go directly back to the trader and that is where Aqua comes in. So that's what we're going to talk about next. So, 1-in Aqua inside of this protocol, liquidity stays in the LP's wallet at all times. You do not

deposit it into some other contract and have it sitting there. It is sitting in your own wallet until it's time to be used. Part of this also means that you are not bound to any specific trading strategy. So, you can commit to trading strategies, but that doesn't lock your tokens up anymore. You can send these to a centralized exchange if you want to. you can trade them on your own time for something else. You're just giving commitments. You're no longer actually onchain binding them to these other trading strategies. And settlement is atomic. So from traders perspectives, the people who are going to be using the this new system, it's the same experience they're always used to, they can go to their favorite block explorer, see the point where the transaction was confirmed and verify the

outcome. So let's go over the architecture next of 1in Aqua. Um it comes in three parts. There is the Aqua router, Aqua apps and strategies. With the Aqua router, it is just an 80line smart contract and it is responsible for three core functions. The first is LP registrations. So the wallets that are actually committing to the Aqua protocol, the balances being which tokens and how much of each token they want to commit to the protocol and swap settlement. So this is actually taking the tokens from the LP's wallet and moving them to the trader wallet and then the opposite direction as well. The

next is Aqua applications. These are the actual swap logic implementations. So you can think constant product, concentrated liquidity, stable swap, all of the actual price curve logic pieces. This is the focus of the Aqua apps. And the last is the strategies. These are the LP commitments to Aqua apps. So if there's a constant product Aqua app, the strategy would be an LP's commitment to wrapped ether and USDC providing one Ether and 1500 USDC. Or maybe they commit to the stable swap Aqua app and they have USDT and USDS with a thousand of each of those tokens.

So if we look at the example from earlier in this presentation that is the very basic familiar case for AMMs we can now look at this from the lens of if they did it inside of Aqua. So the pieces now instead of a single pool contract in the middle there is the Aqua router and there is the Aqua app and in this case it will be a constant product AMM. So the first thing that happens is Bob will do an approve or a permit to the Aqua router to give it access to whatever funds he wants to provide liquidity for. Next he will call aqua.ship. And aqua.ship is going to have the information about his tokens, how much tokens, which Aqua app he wants to uh commit to in the form of a

strategy. And all of this information will be saved to the state of the Aqua router. And in that transaction, there will also be an emit of that strategy data and an indexer can now grab all that information and index it so that other people can have access to it and quickly know what is available to them inside of the Aqua router. 1 in runs its own indexer, but this is a could be anybody. There could be competing indexers who want to index various different use cases inside of Aqua if it's not caught in the main indexer from 1 in. So once Bob has registered with Aqua and once the indexer has the information now a trader can come through like Alice and she can pull this information from the indexer. If she likes the information she sees she can get a quote from the Aqua app using the

information of Bob's balance and if she likes that she can now uh initiate the swap. So she will send her ether into the AMM. The AMM will then talk to the Aqua router and it'll say, "Hey, Bob said he's committing to this with this balance and we have a trader who wants to swap token A for token B." If the Aqua router confirms that all of that is valid and Bob has given permission, it will then use its permit or approval to pull uh well to push the ether first and then pull the USDC out and give it back to Alice on the other side. So in this case, the same trade happened but inside of the Aqua ecosystem with quite a few extra steps.

So, what do we get from this? The first is LPS can send and sell committed tokens whenever they want. Since the funds never leave their wallet, they now are participating as liquidity providers inside of DeFi without having to lock something up in a contract. It's still available to them whenever they want it and whatever they want to do with it. LPS can now participate in governance. So, if you're uh holding the governance token of something that does wallet balances for voting power, you now no longer lose that right. You can provide liquidity for swappers and participate in governance at the exact same time.

And most importantly, LPS can reuse the same tokens for other Aqua apps and strategies. And we are going to go into that third one right now. So, let's say that Bob has four tokens instead of two. He has Ether, USDC, A, and Tether. and he has $1,000 of each. In this case, he would have $4,000 total dollars of liquidity that he wants to participate inside the Aqua ecosystem with. So, he can take $1,000 of Ether, the full balance, and $1,000 of USDC, the full balance, and he can say, "I would like to commit these to a strategy on the Aqua router." So, he has $2,000 of liquidity so far. He can then take the entire balance of his Ether again and the entire balance of his A and provide

that as a token pair inside of an Aqua Strategy. And then he can do a third strategy which is all of his ether as well as his full balance of ether of tether inside uh as an aqua strategy. So his actual liquidity at this point in time is still 4,000 but his effective liquidity is $6,000. Now in this scenario, Alice could come through with USDC and she could trade against Bob's Ether using the same process we went over earlier. And at the same time, Tony can come in and he can trade his A for Bob's Ether. And Craig can also come in and trade his Tether for Bob's Ether. And each trade would go through a separate pair, all using that same pool of liquidity inside of Bob's

wallet. Now, some of you might be thinking, well, if two people come in and they deplete all of the Ether in their first trade, wouldn't the second trade fail because there wasn't actually enough ether to facilitate facilitate all of that? And the answer is yes. the person who comes second would get a revert. But this will not probably happen that often because our indexer will also be balance checking the uh wallets and we'll only provide quotes when we think they're actually going to go through. So in some scenarios this probably will happen, but we don't think it'll be a big enough problem to where it'll stop this from being a really useful technology.

So we talked a lot about constant product as an aqua app, but we could obviously do concentrated liquidity as an aqua app. We could do stable swap as an aqua app. And as we kind of keep implementing all these price curves, we start to see that there is a lot of overlapping boilerplate code inside of this ecosystem. So we decided before we released Aqua to also build something that we call SwapVM, which is its own Aqua app that serves as a swapping virtual machine to remove all of that boiler plate and let people just focus on the parts that really matter when they're creating new AMMs.

So you can think of swap VM as really building block functions for swaps. This means price curves, uh taker restrictions if you want to do some kind of limit order protocol, fees because LPS generally want fees if they're going to provide liquidity and deadlines if you want this to not last uh uh as a permanent trade. So if we look at these two examples, one of them is going to be a raw aqua app and one's going to be a similar application but built on top of swap VM. Do not worry about reading all this code. This is just to kind of show the difference between the two. On the left, we'll see constant product implemented as a raw Aqua app. It's written in Solidity, inherits the Aqua app class above it, and it will basically do what

people are used to, the quote exact in, quote exact out, swap exact in, swap exact out. And anybody who's worked in some of these older AMMs has probably seen this logic many, many times. And if we look on the right side, we'll see the swap VM implementation which is actually in JavaScript because this is just an SDK that uses a builder pattern to basically say, hey, what kind of components do you want inside of your AMM and you just do that in a couple lines. You click uh call build at the end and you get the bite code that represents that AMM that you can push through the swap VM. Now, so these building blocks inside of swap VM are just op codes under the hood.

Uh there are many more than just the ones I showed in that example. I think there were three in that example. There's quite a few more in the teens, I think. Um and there's one additional thing that we call an extruction, which basically says, hey, if you want to do something with your AMM that requires data outside of the contract, you can do that with an extraction. with a very obvious example of this being uh collecting oracle data of some kind when you're making a decision. You can create your own op codes for this hackathon, but you would need to edit our swapvm contract and then redeploy it. Um, which is pretty advanced and the swap VM contract itself is approaching the maxed size of a contract allowed on Ethereum. So, if you go down this path, you would need to

remove some of the op codes you aren't using to make room in the contract for your custom op codes. So keep that in mind as an advanced path, but it would get you a lot of bonus points because we like swap VM projects when uh when when we're doing judging. So Aqua also extends beyond just AMMs. Uh so far in the examples, we've just used AMMs because it's a really easy way to explain the value of Aqua, but Aqua is actually a much more generic engine of just connecting two parties together who have tokens that they want to do something with. So we have had Aqua available for quite a few hackathons now. I think around seven or eight months of hackathons. And we have had people build prediction markets on Aqua.

We've had people build privacy pools. We've had people build flash loans. And it has really shown the uh versatile nature of this protocol. So we encourage people to be creative and think beyond just swaps if you still want to use our our technology. So here's an example from earlier with the constant product AMM, but we're going to tweak it just a little bit so you can see a flow of how you would use this for something other than just AMMs. So let's say that we implemented a flash loan as an Aqua app and we still have Bob and Alice on both sides. Alice would come in and she would say, "Okay, here's the borrow amount that I'm interested in and here's the payload that I'd like to execute with the flash loan." Just as

before, the flash loan aqua app would go to the Aqua router. It would say, "Hey, is this uh liquidity available? Is Bob's wallet actually signing saying that he's interested in doing this? And if that all comes back correctly, it will use the approvals granted by Bob earlier to pull that USDC out of his wallet, give it to the flash loan aqua app, execute the payload, and then send that USDC back with some kind of fee to it, and then Bob now is still earning yield with a flash loan aqua app, and Alice is still happy. So, in this presentation, we've talked about flash loans, uh, constant product AMMs. We briefly talked about stable swaps, which you can obviously do with even more than just two tokens. And all three of these apps can be used by Bob

at the same time from a single wallet using the same funds. And that's really the selling point of this whole ecosystem is you can get all the liquidity in a single place and do everything you want with it all at the same time instead of splitting it off and fragmenting it across multiple different protocols at the same time. So the impact of this in the broader DeFi market um is quite great for LPS. This means high utilization of funds and better yields. Basically, you can do a lot more with your tokens and it will result in just earning more money faster. For DeFi users, this means that all of the apps that are built inside of Aqua will generally have better prices as more and more liquidity comes into it

because people are reusing and making that liquidity more available to more applications at the same time. And for builders, this means a fast path to production and users because as this ecosystem grows, there will be more eyes inside of the Aqua ecosystem and people can be interested and look at all the new protocols that are launching on it as well. So, let's wrap this up with some brief explanations of our bounties. Um, we have two this year or this hackathon. One is to build a new Aqua app on 1 in. This will have $5,000 total and the first will be 2,500. Second will be 1,500 and third will be 1,000. And the other category is just to extend something you have already built using

the new continuation track from ETH global. So, just take something you already made in the past and add Aqua to it. This is going to have $2,000 total. The first place is going to be $1,500 and the second is going to be $500. So, that is everything for me. Here is the QR code. It'll take you directly to our bounty page on the ETH Global website. And then I am happy to take any questions you guys have now. Um, because I know that was a ton of information. And if you don't have questions yet, uh, I will be in the one-inch partner channel of the ETH global discord as well as a couple other people from the team. So, you do not need your questions right now. Uh, we'll be there remotely,

but you can ask them now uh, if you have them. >> Amazing. Thank you so much, Tanner. Um, as always, for that very like thorough workshop. Um, if you guys have the chance, I'll give you a few minutes to scan this QR code or potentially ask a question here. Um, but as Tanner said, uh, he will be available in the Discord uh, for the duration I believe of this entire hackathon. Um, I am seeing some kind of AI notes exiting here, but I will just keep the floor open for 30 seconds just um, for some potential questions.

>> Yes, I had a couple of questions. uh regarding the Aqua VM. So as you mentioned like uh we would if we were to implement you know the VM swap VM so we'll have to redeploy all the smart contracts right uh say that last part again did you say develop smart contracts >> like if if you were to modify any sort of you know have our custom AMM uh using swap VM so we'll have to redeploy all the contracts right >> so not custom AMM custom op codes so swap VM naturally does support custom A&M but yes if you if you want to do something totally custom, you would need to redeploy swap VM. Um, which would be basically okay for the hackathon. It would obviously would be something that

we'd have to talk about later if we want to like make it production ready. But we want people to get creative. So yes, if you want to do something custom, you just take our official contract, edit it, and then redeploy it. >> And even for the SDK part, like if we want to have a UI integrated with it, so then we'll have to also modify the 1 in SDK, right? the type TypeScript SDK because it would have a different API, right? >> Um, yes. Yeah, I think so. I think so. Um, but even if you did, it would be a pretty small change. I don't think it would be that much of a problem for the hackathon side.

>> Okay. Okay. Uh, and also like uh I was reading through the swap VM. So uh if we were to uh change it so we'll have a custom op code and then we'll also have to register the op codes in a separate smart contract right like the op codes would be in the same contract. So you would have like you just redeploy the exact same contract with your modified code and then those op codes would be available there. You wouldn't want to split it across two contracts. Actually, if you could figure out a way to do that, I think that'd be fine, but I haven't really thought that through very much um on if that'd be feasible or not.

So, generally, what we would suggest is to try to just make room by taking out some of the op codes you're not using and then fit them all into a single contract deployment. >> Okay. >> Thank you.