Ambient: Building The On-Chain Venue for Price Discovery | Doug Colkitt

28 Jun 2023 · 1:32:24

Ambient aims to make AMMs sustainable enough for on-chain price discovery, with Doug Colkitt arguing that LP fees often fail to offset divergence loss. He explains how a single-contract DEX reduces token movement between pools, while proposed dynamic fees would track recent fee-tier performance and later distinguish less-toxic order flow. Surplus collateral enables relayed trades, but governance remains powerful and knockout orders can be partially filled until their range is crossed.

Speakers

Topics

Transcript

we have this natural experiment um and and because it's pretty persistent he's like the five basis point pool has done better over the past hour probably going to keep doing better over the next hour we can um we can just toggle the feast in our pool to reflect which Fool's outperforming so so theoretically with pretty good chance right you get the best of both worlds right because because fees adjust over time so so we've got to call that a price Discovery vampire attack what's up everyone welcome back to another episode of zero X research this show is made possible thanks to our fantastic sponsor the atom accelerator if you're a developer looking for a home in the industry the atom economic zone welcomes you but you will hear more about the atom accelerator a little bit

later in the show today is June 26th and we have a great interview lined up with Doug kolkit the founder of ambient it's a new deck that's aiming to reimagine the active amm but before we get into the interview as always we're joined by effort capital and Westie to discuss the latest Market happenings Westy why don't I kick it over to you for your hot seat or cool Throne yeah I can start us off so I'm not sure if this is a hot seat or cool Throne yet we have a lot of time for it to to figure that out but basically it's a new proposal to make the current polygon proof of stake chain into a validium um so for those that need a refresher validium is similar to a ZK roll up where proofs are sent to the L1 for verification however the transaction

date itself is not actually posted but is instead kept on some like internal data availability layer um this means like a lot higher scalability and lower transaction fees because you don't need to pay to store that data anywhere but it sacrifices a level of security and censorship resistance because if that data availability layer gets compromised you know whoever's in charge of those funds can just like freeze them and not allow uh users to access it and the reason why I'm sort of back and forth between uh whether this is a good thing or a bad thing is because you know I think it does solve a lot of the issues that they've had in the proof of stake chain but they've had a ton of reorgs basically every day and this sort of solves that issue or you know they're no

longer no longer are required to look at a validator set for consensus but I'm also like pretty cautious about having sort of like a generalized chain with a lot of native value and Native applications sacrificing a level of censorship resistance and security and leaving that power to potentially like a few people and that was another thing with the proposal itself is that there's no detail into how the data availability layer would be managed or what that would look like and so we don't know what that's going to be through a committee or maybe they're Outsourcing that to Avail we don't know the details and so there's a lot we need to see I think it's going to take I think eight to 12 months for them to develop this thing

um so yeah I wonder what you guys think about them switching the proof of stake chain to the Lydia I think it's a good move personally I mean you're if you look at the chain today you're relying on a whitelisted validator set so I mean I don't think anything really changes from polygon as a side chain to polygon as a validium and I also think they did mention in the blog post that Mahalia posted on the Forum that the Matic token would be used to secure the data and I don't think a veil is actually even under polygon's umbrella anymore and that was a really under looked at thing actually I feel like no one even talked about that but I'm pretty sure polygons like completely removed from Avail so I don't even think they have really their own da layer so I do wonder if that's

kind of plan for Matic is to have like a DA layer that kind of starts with the proof of stake chain in the form of a validium and then it kind of exports its services to other chains in the future not really sure but I think in general it's a good move I personally use polygon a good bit regrettably and I absolutely hate the experience so anything they could do to make that chain actually work I'm all for it anything for your precious unicorns um but yeah I guess I'm just confused by the end game of polygon here like seemed like I thought for sure they would have been leaning into the zkbm and like just focused on promoting the popularity and usage of that and if not just transporting everything over from

the proof of stake chain like why why do we still have that chain if the end goal is not to be you know surely the end goal is not a validium so like I guess this is another short-term solution and to Westie to your point like yeah it's probably an upgrade but it still doesn't feel like it's the the end game so I don't know it's interesting to see uh they're like they seem like they're focusing on too many things at once to be completely honest like I don't know this and now their competitors are doing really aggressive things and like promoting their brands like the op stack starting to take off arboretum's been pretty up and to the right in terms of like ecosystem growth recently um you got uh ZK sync that just uh pushed live the ZK stack like everyone

else's seems to be really honing in on their expertise and then polygons just got like fingers in random jars like totally kind of lost that's just the way I'm perceiving it at least yeah I think it's also pretty annoying how they're doing this whole announcement this whole transitionary period um like why why can't you just say like here's our end game here's our road map like when ethereum puts out a roadmap it's extremely detailed you know what you're getting you'll read like a 10 000 word essay by vitalik you'll probably have to take a few days to actually digest it like polygons breaking up they have this whole polygon 2.0 Vision that's uh you know a complete rethink of their architecture rethink of Maddox uh you know the tokens um utility in the entire Matic our

polygon ecosystem and they're kind of doing like announcements of announcements over like the next four to five weeks um obviously I'm sure there's some type of marketing reason to do that they're trying to like dominate the social media Airwaves so I understand that but at the same time it's like you just tell us what your vision is like can we get actual a better user experience on on uh in the proof of stake chain or at least in the polygon ecosystem um I mean I'm sure it's great that they're trying to iterate on their products that they're trying to you know push this the ZK narrative because ultim really it sounds like the end game four on-train infrastructure is uh zero knowledge proofs but I would just like to see like in one cohesive one nice blog post like what are you doing what is polygon 2.0 yeah the other thing here

is if you look at market caps between optimism arbitrum and polygon polygon is insanely expensive arbitrim's around one one and a half billion optimism is about 800 million and then Matic polygon is trading at around six six or so billion so it's about it's just way overvalued from a market cap perspective but you start looking at fdvs it's very in line with optimisms and arbitrim is actually the one that stands out looking expensive but I don't know just another another observation is it's trading quite richly yeah sure there I think that's a pretty good point on the valuation um but I guess that's good if they're going to be using a data availability committee with the Matic token is like a proof of stake model so I guess we'll give them that but effort he got in the

hot Cedar culture in this week yeah so on the cool Throne this week um I actually have the cosmos hub no surprise being in the cosmos Bowl here uh the cosmos album the Adam economic zone so um you've seen a couple chains become consumer chains over the past month or so since replicated security went live you saw Neutron which is this cosmoplasm generalized smart contract platform which is like the execution layer for the Hub um you saw stride recently get approved uh to become like a liquid staking provider of the entire Cosmos ecosystem or predominantly the out of economic zones surrounding the cosmos Hub um that's I think going live in uh I think the third week of July and most recently this past Friday you saw Duality Labs uh post on the Forum uh the cosmo subform to become a consumer chain

and launch sometime in August so with Duality Labs building and I'm I think the Duality lab team is like super gigabrain they're on the Forefront of Meb research uh dualities building and a fully on-chain order book Decks that is fully aligned with the cosmos Hub so stride has their own native asset neutron has their own native asset and they're doing some type of Revenue sharing agreement with the cosmos hub for leveraging the security of the validator that Duality Labs is saying let's we want to become fully aligned with the cosmos Hub providing using Adam as the gas token 100 of Mev and transaction fees going back to Adam stakers um the only fees on the chain that wouldn't go back to Adam's acres are liquidity providers uh but a part of

this proposal is actually having the Hub provide 500 000 atom which is approximately five million dollars uh today of Hub protocol and liquidity to to LP into uh Duality to kind of jump start the the economic activity in the ecosystem but I think it's interesting that Duality lab is doing is something called like replicated Market making so what they're able to do is they're able to use contrary liquidity to actually produce any amm invariant so typically how this work with uh let's like say curve or uniswap if you want to have a stable swap pool uh or for like e States or east usdc the E portion of the lp pair is like split up into those two

liquidity pools so that creates liquidity fragmentation with replicated Market making what that what this allows is actually have one liquidity pool for each asset so it's all unified into one liquidity pool and then uh each each type of pool like stable swap or or a regular concept product amm curve uh the liquidity from that unified liquidity pool can actually be used in each liquidity pool like as it's as as it's needed so it kind of creates um additional Capital efficiency um a couple other Advanced things that I think Duality is uh supposed to launch with come in August is Advanced orders like limit orders or fill or kill uh Dynamic routing to prevent front running so the way I think about this is if you're trying to swap like usdc for atom

let's say there's probably multiple different routes that that your uscc can take to be converted into atom and because your trade is being posted to the public Med pool there's obviously going to be Mev Searchers looking to front-run your order and what this does is actually it uh it finds like multiple ways to get you your end requested asset and for the best price possible and by doing Dynamic routing it's actually able to um really calculate at the moment of execution like what that best route is uh and what is like the least likely to be front run um overall it really sounds like a really interesting proposal this is like the first consumer chain that's going to be fully aligned with the Hub uh this is probably the first time you're actually

going to see Adam being used as like the native gas token for a chain in the cosmos ecosystem outside of the Hub itself and this is really starting to you're starting to see The Narrative of like atom value accrual the thing that I think has prevented The Hub from uh or the atom asset specifically to really gain uh you know I guess price appreciate accordingly with like Solana and Avalanche and ethereum over the past cycle was the fact that it was kind of like cardano where you just stake in doesn't actually do anything but you're really starting to see a full economy start building around the Hub um and I think if Duality Labs actually able to create like a legitimate product um and and able to gain you know gain market share in the cosmos ecosystem that this could be a really good way for

for Adam I think to uh I I think overall like a really good story for Adam and the Adam stakers Charles hawkinson's coming for you for that comment not worried uh no I think that's that's a this is a really interesting proposal uh the idea of a foil aligned consumer chain is exciting I I like it's you gotta Wonder like what the what's the value proposition for the Builder in this case but nonetheless it's it's a really interesting development to see and I the first thing that came to my mind was like a more technical question so because the Hub does not have Smart contracts how is the five million dollars of atom deployed as protocol owned liquidity yeah it's a great

question so I think initially uh you actually saw a very similar ask for from The Stride proposal so when stride one become a consumer trainer like we'll become one but we want 450 450 000 atom of Hub owned protocol and liquidity to be liquid staked on stride and then deployed on Neutron on after port to create like a deep liquid market for staked atom or Stripes version of staked atom um how that's going to be done is through a multi-sig so I think the atom accelerator team at least in the interim is going to uh manage that atom on behalf of the Hub and I think the same thing is going to be done for Duality but the longer term or mid to Mid to long-term solution to this is The Interchange allocator that I know time

wave Labs is building and this is going to be essentially like a module written and go uh deployed on the Hub that allows the Hub to trustlessly deploy protocol liquidity really wherever it wants as long as a governance proposal says on behalf of the community like yes we want to deploy that's not an atom to a certain uh community pool or certain liquidity pool in in The Interchange so right now it's going to be more of a trusted setup but I think the interchange allocator is supposed to go live sometime in Q3 or Q4 this year and then that'll really be the solution to do this moving forward so yeah okay that's really interesting yeah because like this stride's use of energy and accounts I find really fascinating because like that way they can still control EOS on the Cosmos Hub to like

stake and unstake their assets um but yeah going the other way is much harder right but you can it makes sense you need the trusted setup just given the lack of a a better solution and just really the inability to have Smart contracts on the uh on the network yeah my my two takeaways from this are I mean the first is the cosmos Hub is kind of back like there's a lot of momentum uh for the Hub and it's economic zone uh like you said Neutron and now Duality like a lot of people are choosing to build within that zone and I think um yeah the momentum is building we're going to see a lot of other cool projects continue to build there and it's super exciting to see because you know Adam's had that sort of existential crisis over the last couple years and

it's good to see it sort of forming itself and like you said competing uh with the likes of other layer ones and whatnot and then the second is that osmosis has some like really really tough competitors coming um Duality like you said has a great infrastructure Ash report as well building on Neutron there's a lot of decks is being built within the cosmos ecosystem that are going to give them a run for their money and you know I'm excited to see the sort of those those Wars begin to see you know what are users using where is liquidity going I think that's going to be a really exciting area uh within Cosmos over the next year or so yeah I think just uh I guess end off I think one of the things I've held back the Hub over the past Cycles were this this meme of like you

gotta be credibly neutral you can't you know this whole gravity decks debacle that happened where the the Hub had a decks but the Hub didn't want to provide liquidity to the decks and it created this whole like cold star problem where it was not able to create liquid markets and ultimately osmosis won that and then the gravity decks moved off chain um off the Hub and I think this existential crisis especially at the atom 2.0 failing the community kind of really like looked themselves in the mirror and it's like well we can't just be staking at him all the time and the Hub actually has to have a purpose um we love to talk about sovereignty in the cosmos ecosystem but it's funny that like we love sovereignty but at the same time if the Hub doesn't actually start not being neutral and if it doesn't have

Smart contract capabilities it needs to actually be subjective it can't be objective uh you need to start picking winners and losers in order to actually maintain its own sovereignty or else it's going to fall to the Wayside Fade Into irrelevance and then ultimately go to zero even if the cosmos thesis is right even if the cosmos SDK and the tech stack is the best out there and can compete with the op stacks of the world and arboretums um so you're really starting to see the community kind of take initiative uh try to drive value back to the hub actually you know again throw this idea of credible neutrality by the wayside and start to um just have initiative in building an economy around the Hub what does this mean for osmosis with Duality coming online taking like a very

Innovative approach to uh to what an amm is and kind of moving towards that order book model and neutron coming online and bringing Astra port and getting that initial uh allocation for stride from strides to get their liquidity going there like what is the outlook for osmosis in your opinion I still think the majority of this space is still brand and and like whatever's Lindy so I think the tech the best tech doesn't always win um I think we've seen this time and time again not just in crypto but I think technology in general beta Max versus DVD people say that we're experts back then betamax is better Tech but DVD had better distribution and ultimately everyone used DVDs and obviously we don't use either of those anymore but osmosis still has um like the most IBC transfers still has

like the second largest user base in crypto it is still the thing everyone thinks of when you think of Cosmos D5 you immediately think of of Osmosis they're built they're they're kind of growing beyond the Decks at this point they're becoming a full-fledged defy Hub with funding markets and I think decentralized statement coins launching in a couple weeks a Perpetual Futures market so there's a lot of good things to look forward to uh to osmosis um and they're launching concentrated liquidity themselves in their next upgrade so I think it health it's healthy competition it's good to see D5 starting to potentially flourish in the cosmos ecosystem I still Envision Osmos as probably being the dominant player at least for the foreseeable future uh but it's really their game to lose um but even if liquidity does migrate to other dexes I still think like the brand

and the overall um I think lindiness of Osmosis as a community they have a really strong Community as well I think again they're probably going to be the market leader for the foreseeable future yeah that's pretty interesting it's gonna be fun to kind of watch this play out it feels like you know there's finally a battle for Cosmos D5 and competition tends to be a good thing so it'll definitely be a fun one to watch but um I can go next here and I have a cool Throne from late last week this came out after our last episode but uh massive news that I felt went really like under the radar and it's that sap is testing their sap digital currency Hub as they're calling it when this thing like allows customers to make international payments using usdc or the circle zero version

euroc and this their uh blog announcement directly calls this the future of cross-border payments and cited expensive slow and non-transparent as issues with the current accepted infrastructure in the cross Pace cross-border payment space today and this is exactly what we've been yelling about and how blockchains can be used to solve these problems and how real stable coins that can be reliable are the perfect solution to the problems that we're dealing with today and no one out like there's not a better possible company to be leading this charged in sap uh and the reason why that is is nine out of the ten companies in the Fortune 500 use sap software already so they're already ingrained in some of the

most important players in the space and their customers actually generate 87 percent of total Global Commerce that equates to around 46 trillion dollars annually so there's not a better player in the space of of the modern world today than sap to kind of be taking the position of hey cross-border payments suck today blockchains and stable coins are solving this we're going to be the ones to integrate it um so it feels like this is absolutely a massive news and it's what's pretty interesting about this is they're still in the test phase and uh they're currently integrated integrated with uh ethereum's Gurley test net which allows people to send like essentially play money back and forth Just So users can like see like oh [ __ ] like this used to

be like a seven day process that cost me 75 dollars to uh wire from you know bank account a to International Bank account B um now it takes you know a matter of seconds and and you know found out in a matter of minutes and it's you know like how cheap is it to send an ethereum transaction compared to that like this is a Monumental upgrade in my current infrastructure and so they haven't released exactly where they're going to go live and fully integrate with when they kind of move out of this test net phase but it is very very interesting that they are appearing to be ethereum aligned um so that's a kind of a huge upgrade like usually I feel like last Bull Run we'd get these uh types of announcements we're like wow this is like a major

player investigating the space and then you know it'll be like integrating with random blockchain a instead of like you know the market leader ethereum this so this is like a really exciting development in my opinion yeah Sean agree I think this one went way under the radar honestly because like they have such a sticky software amongst like some of the biggest companies in the world like I remember using some of their products in college and undergrad like five years ago and just thinking man this Tech is absolutely terrible but then I think back to like Microsoft and Microsoft Office and how slow moving I felt like they were as a company and now like I love Microsoft Office like I I don't know I think there's interesting parallels to draw there and just the fact that they touch so much of the world's Global Commerce in some kind of

way is very very exciting and the fact that they're actually using Gurley like that's just wild to me the interesting thing will to be we'll see if they launch on an L2 or ethereum Main it right out of the box like um I already know what effort capital is chomping at the bit to say here and hashtag build on base I mean that could make sense you got the usdc alignment from sap uh I just like it's crazy to me that we can say they chose usdc and they seem to be choosing ethereum like that is electric news but let's hear the uh let's hear the base Theory no I was gonna say uh imagine they announced like they were using tether how crazy the market would be like what what do you mean he's inside there uh no I I think I think it's you

know coinbase announcing their base L2 uh that's gonna go live at the end of this year I I'm hoping as a coin shareholder that they learned their you know they took lessons learned from their nft Marketplace um you're seeing the same applications the same decks as in lending markets and Ponzi schemes launched on every single L2 every single altel one and what is going to make coinbases base different um I sincerely hope because obviously nothing made coinbases nft Marketplace different it was just an nft Marketplace it completely flopped it was a really bad look on their overall product strategy and roadmap and I'm hoping with L2 with with base that they come to it guns blazing they come to it with Partnerships with from like legitimate

industry uh Market leaders like sap um and ultimately like Brian Armstrong's original thesis for crypto uh was to really be like a global remittance platform uh get rid of the bank get rid of the Western Unions of the world like let's just make payments easier it's like so simple the economy runs on B2B and b2c and P2P payments like and I think sap would be a ideal partner for uh coinbase for launch at one base goes live later this year and base is currently running on Gurley testnet that doesn't mean saps to be using base obviously I'm kind of like full you know uh I guess hoping that that they're able to to launch on base

but um I think it'd just be crazy if they you know if this is this is incredibly bullish for bronchain rails um imagine the amount of interest income that Circle would get if 46 trillion dollars in B2B payments are using sap like how much money is circle gonna print and I know that they're still moving forward with their IPO plans hopefully like either end of this year or early next but I think this is incredibly bullish for overall on chain rails and um I think that the next obvious step is once you get businesses comfortable paying each other in usdc the next obvious step is well as a major business I'm okay with getting paid in usdc from consumers so the next step is b2c and then eventually you're going to see P2P um so I think it's going to start with

the businesses and then kind of trickle down to to personal I mean even if coinbase doesn't necessarily have a partnership with sap yet uh looking at the blog post from sap themselves they say that these payments are expensive and they they cite up to fifty dollars in per transaction fee and as as we know using ethereum run like transaction fees can get much higher than 50 so I'm sure even if they test out ethereum mainnet they realize at some points the fees can get pretty high I think they probably will migrate to an L2 and the most likely I think is base just given that they're going to have that strong corporate relationship all right I feel like that's a good time to transition transition over to my uh hot seat for the week and uh effort's gonna be on

cloud nine here after that talk we just had on Cosmos but I've got ethereum l2s copying cosmos's original vision of app specific chains but now called roll apps so basically uh the reason I bring this one up today and honestly deserving a cool thrown because I'm really excited about what ZK stack is but ZK sync as Dan alluded to earlier is kind of ZK syncs op stack equivalent but obviously with ZK Roll-Ups instead of optimistic Roll-Ups and it's like a modular software stack to build chains with different security assumptions and hopefully baked in interoperability thanks to uh shared proving sequencing design lines um but yeah I just think it's kind of wild that we sit here and Cosmos has been working on this vision for

literally four or five years now and it seems like now every single ethereum L2 has a modular strategy trying to encourage applications to build apps specific on Roll-Ups um you know we have arbitrum orbital announced a week or two ago we've had op stack for a while we have starknot l3s like that's just definitely the way the future is going um so yeah I just I had tipped the cosmos being so early on that thesis and it's really pretty impressive era now has like over 600 million in tvl in the bridge contract but if you look at defy llama there's only like 100 130 million so obviously a lot of people bridging over there but not a ton of people actually using applications so again another kind of factor that puts ZK sync

in the hot seat could be just airdrop cyblers kind of parking Capital into the ZK sync bridge and not actually using ZK sync itself so in six months if the tokens down out and uh there's not that many people using era I'm definitely going to have them back on the hot seat because that activity will proven to have been non-organic and quite honestly like that's a serious threat like it's definitely something that could happen I mean arbitrum and optimism have seen a lot of activity remain robust but at the same time block space is becoming more abundant um at the same time when demand's really not there right now um so yeah I guess I'll leave it at that I'm curious if you guys have any thoughts on the ZK stack I mean it's my thesis that a lot of these Tech Stacks

are going to look very very similar within five to ten years because they're all essentially building the same thing which is the ability to create many change chains each with their own design optimized for the specific use case and that are interoperable with one another in a seamless way and Cosmos obviously had that Vision many years ago and are continued to build that out but we're seeing that with the op stack we're seeing that with CK sync stack now I mean eventually we're gonna agree on some interoperability standards I think that's going to most likely um center around ZK proofs um but eventually a lot of these texts are actually going to look exactly the same and so a question I sort of have is like what do the winners look like does

it does it make sense now to try and capture market share to capture builders on your your Stacks such as like the op stack um partnering with base and World coin um because you know eventually if if all the stacks are the same what's the differentiating factor I mean there really is done and I know effort Capital says this a lot but infrastructure is going to get commoditized so in order to sort of stay ahead of the game you need to make sure you're capturing market share now and so yeah as these converge I think it's going to be exciting over the next five years to see which of these Stacks gain the most momentum right now it seems like it'll be Stacks in the lead but it's a gay stack is probably going to give them a run for their money but again we'll see and and

Cosmos as well there's a lot of exciting things there and yeah I think it's going to be an exciting race the interesting thing to me here is there's uh one group of blockchains that is making a very different approach that's the high throughput Single Shard maximalists led by the Solana people and you gotta think like with everybody converging on this one idea and these like there's just seems to be this one small camp of like Hey we're gonna do it differently and For Better or For Worse that's going to be our Mo and I kind of [ __ ] love that it just gives you this different type of energy that's like it's hard not to bet on that it's the the people going against the grain and you know the more time you spend with the modular stack

you're like I don't know to me it starts to feel like a bunch of Hocus Pocus although we do have a bonus episode coming out this week with the ZK sync uh matter Labs team that kind of highlights what the ZK stack is and I was thoroughly impressed um so this is the first time I felt like the modular stack like all the pieces came together like you have rollups that can be designed on a spectrum of uh centralization to fully decentralized like a ZK roll-up you have the ability to have l3s um you you have native communication that does not rely on trusted validator sets and it's specifically based on cryptography and Mathematics it seems to have all the elements that you're looking for but again like it's just it starts to get

frustrating when you're thinking about da layers settlement layers you know where is execution happening how do I decentralize the sequencer now I have approver and that needs to be decentralized as well or if you just have one single damn Shard I don't know it's hard it's hard for me not to love that thesis I agree I mean the the best returns are made for non-consensus picks and that's why like as much Everyone likes to [ __ ] on multi-coin like you really got to give them credit like everyone is digging and Solana just zagged even since like 2019 2020 when they were kind of first launching growing their brand and multi-coin is still like as steadfast as ever in their Salon a thesis and you know if with all these new l2s kind of launching I'm honestly sick of l2s

launching like I'm sick like we have Taiko ortaco coming out we have scroll gonna be launching in the next few months like I guess air drops are cool like we're on it for the money and not necessarily the tech but I'm in it for the applications like I want products like nothing in zkt and ZK saying come ZK stack it looks like it's really solid Tech I'm sure it is I'm sure they're on The Cutting Edge of like ZK proofs just like the Matic team is but like is it gonna give us new applications probably not um there's probably a lot of other things like decentralized identity Solutions and I'm sure the listeners are probably tired of me talking about that at least every single time I come on here but like until we have a good decentralized identity solution you're probably not be getting real world

applications and until you get any real world applications you're just gonna get the same pile of [ __ ] a DEX a lending Market a really interesting way to lock up tokens to earn more yield um but I agree I think Salon needs like a lean into this further they need to start like I'm interested in seeing the first like real world application built on Solana because all it takes is one application one application on Solana that gets a million real world users or a 10 to 50 million real world users and the modular thesis I wouldn't say it's dead but you're going to see VC money shift from the modular stack to one Single Shard and just like go hand back into the salon ecosystem so the guy who

just Shield the newest decks in the cosmos is screaming for new applications okay got it what what I will say oh I'm just you're right but what I will say is there's we have an abundance of generalized block space we need more application specific block space and I think that's gonna unlock like the next like iteration of product ux and Patel fully Capital efficiency it's like one cool thing that DK Sync has is Maverick Maverick's been dominating like the airwaves and the ZK sync ecosystem they they're able because I think they're able to do like high high compute uh on DK sync they're able to have like higher Capital efficiency and you're kind of seeing them grow like their liquid taking token market share it's like there are benefits to launching a new ZK roll up I don't want to say there there

isn't but I think for zero to one Innovation we we need to see uh more real world applications and you're just going to see small iterative improvements from there and and Duality might be one of them to be fully honest like it might just be small improvements that ultimately no one cares about but for the sake of my bags I'm still putting them on the cool Throne fair enough fair enough and one thing that I think is interesting about the ZK stack is uh they haven't really announced anyone that's building in the space like building a hyper chain which a hyper chain and the ZK stack is just a roll-up that's connected to the same prover uh so it has the the cross communication with the other Roll-Ups in the ecosystem um they haven't announced anyone

building a hyper chain yet and I'm very excited to see who those players are going to be because if I have to guess and I I don't have any like information or insights here this is just purely speculation it's like I'm I think it's going to be one of those big payment processing companies like a Visa type type company because we've seen Visa make splashes in this space now you have other uh players kind of entering the cross-border payment space like sap like if there really is like an initial wave here of we need to get blockchains into our payment processing uh platform like I I would imagine that zkc like you know they've raised a lot of money they are a very smart well put together team like

getting that first major client and user is pretty important and again like there it they of course have done that so it's going to be very exciting to see who announces uh the launch of a hyper chain over the next couple of weeks or months yeah Sean green Dan and you mentioned Visa so there's just maybe an honorable cool cool throne for the week is uh at digital Mustafa on Twitter he actually works at visa and he put out a really good thread over the weekend of modular versus monolithic and I was like damn like this is Visa like they're talking about these things internally so I hit his DMS and I was like yo really good thread and he was like thanks man like we decided to start sharing some of the stuff we've been researching internally so it's like Visa's been looking at this

stuff and it's just really cool to see it come to fruition but anyways we're running up on almost 35 minutes here for this uh intro segment quotations I guess at this point but uh Dan you want to tell people what's good with Adam accelerator yeah for sure as always we'd like to give a shout out to the to our wonderful sponsor the atom accelerator so if you're a developer looking for a home in an industry this is just the place to be you know we just talked about Duality and all the very cool things that they're doing and their native Hub alignment is nothing to be uh you know look past that is a very exciting development and the first time we've seen anything like this uh you know as we always mentioned you know we have The Interchange security that kind of enables these things IBC giving you

the flexibility of interoperability and connecting with these other chains in the cosmos ecosystem you know we see teams like polymer building out um you know the next wave of what IBC communication will look like trying to get more non-cosmos chains involved we talked about Neutron kind of always bringing that next wave of innovation as this permissionless way to launch Smart contracts in the atom economic zone usdc is interested closer and closer to launching through Noble and of course liquid staking is supercharging the cosmos defy so if you think that you have an exciting way to build out or develop anything related to the atom economic zone be sure to reach out to the atom accelerator we will include their Link in the description and the show notes below and they're doing

grants on a rolling monthly basis ranging from ten thousand to one million dollars so again we'll be able we uh we'll include the link to their site in the show notes but now on to the interview with Doug kolkit all right everyone we are joined by Doug kolkit the founder of ambient Finance formerly known as Croc swap with an R um I saw that 20 years Doug I thought that was absolutely hilarious but thanks for coming on man we really appreciate it well thanks thanks for having me really excited to be here nice nice so I wanted to start out just by giving you know from your perspective a high level overview of just how you see amms today what specific problems do you think uh ambient is solving and uh how is ambient you know differing from the competition

sure um so yeah I think amms have been really successful in actually bootstrapping on same markets and um more critically actually bootstrapping markets where you don't need uh you know a small handful of trading firms to actually like make those markets run uh the problem with order books has always been that there's whatever 12 maybe 12 firms in the world but it can actually run and order a book um so in crypto especially this has been been a problem for a long time where I feel a new token um you have to get liquidity and oftentimes that comes at a very very steep price to get one of these firms actually creating liquidity so obviously I think amfs have been huge in terms of

uh the suspect right like getting liquidity today from tokens simple um right like anyone can participate then I think that's really important um also from like a decentralization standpoint right like we can have markets where uh we don't require giant firms to actually like create those markets uh anyone with uh wallet and just don't connect and provide liquidity so that that's been where amms have been super successful um and like even even on relatively High throughput chains like Solana right like even today you see most of the most liquidities and amm's not quarter books where elements have not been successful right is like the underlying economic problem we've done a lot of research around this and others have done a lot

of research around and people are kind of becoming more aware of the problem where uh liquidity providers don't necessarily get a great deal where the fees don't necessarily outweigh the quote-unquote uh impermanent loss or Divergence loss um as you know we call it um right but you know liquidity providers are kind of always short Gamma or short this option Where Heads I win or heads headsy windtails I lose um but rather than the swap fees are supposed to compensate for them uh market makers face the same problem that they have kind of more flexibility around pricing but so the problem with amms is like kind of the the deal isn't great for liquidity providers things have been

fine now and we have kind of a lot of really interesting stuff like liquidity mining incentives that fixed that um but those aren't those aren't necessarily sustainable for the long run um so like our goal with ambient is we want an amm that's good enough where Microsoft or uh s p index Futures will trade on it can actually compete against anything in the future and the question is how do we get there so our our goal with that is is really well number one to six for economic problems around it um which we think we don't necessarily know the exact Solutions too but we're trying to build a platform with enough flexibility and enough primitive that people can build the solutions and uh number two is kind of to make the experience in general

a lot more user-friendly um a lot more like what people expect from a centralized so a lot of dexes today uh feel more like appliances than like full-fledged trading applications so we're trying to make things faster easier cheaper and just just generally more fun to use than will most people are used to in amms especially on the liquidity provided so that's highlighter yeah super super helpful would you say the latter is kind of something that stems from your previous experience as a an hft Trader yeah I'd say I I'd say um you mean in terms of like the uh the usability right yeah exactly yeah yeah I'd say I'd say definitely um I think most people uh the kind of

the old style xyk full range V2 liquidity was relatively simple I think B3 liquidity is going to get more uh or concentrated liquidity or like what you've seen and you need B3 is definitely a lot more complicated and I think things are only going to get more complicated from here because now we have hooks um we've got different types of pools uh Implement orders so like how you provide liquidity there's a lot more Dimensions to it and I don't think um it's necessarily in intuitive uh isn't right when people go and participate right like it's not it's not a great experience they don't really understand where they should put things a place liquidity they don't really understand how to evaluate the trade-offs

um and so if you want to keep things decentralized where uh okay whenever you understands like where to place liquidity or how to you know what feature to put it in but if you want to keep things decentralized you need to make sure that even like the average guy maybe does this once a month or uh still still can compete kind of in these games awesome yeah I love that perspective as well and uh before we kind of jump into the meat of what ambient is doing I want to get your take on active amm's like you know that concentrated liquidity range where LPS have the flexibility to actively manage their positions um over what range they're uh kind of supplying to versus like this passive amm model like you know just a good old xyk or something more a little more

intelligent maybe like the like curves V2 uh models like there seems to kind of be this convergence of ideas where around more of the academic active amm side where you know ambient uni swap Trader Joe they've all kind of been pursuing that more active model while um I'm curious like do you think this more passive amm is a thing of the past where you just Supply liquidity to a pool and and let the the algorithm kind of do its job it's it's a good question um so like I I think there's still a big uh a big range of spaces for that uh kind of very passive liquidity we still see see like the longer tail of a tokens trade on a uni B2 so if you actually look let me see where things trading

unity3 does very well with the majors uh uni V2 does vary well with like the longer kill tokens even like Pepe which got very popular I think it's now more traded on V3 but for a long time even like when it was you know very popular was still primarily a V2 um token we've built ambient so that we support both Styles within the same pool so kind of we imagine that there's a life cycle where when things are very early that very very passive liquidity is important because people people just don't know the price right like things change around a lot um and there might not be a ton of liquidity so people aren't going to go in there and manage it every day so uh we support that V2 style uh full range liquidity and and

also another aspect of it can be wrapped right so that increases uh composability you can do stuff where it's a lot of these are stack liquidity mining incentives on top of it which is like super important for logical tokens um a lot easier to do other types of incentive schemes with uh for uh that ambient well that's actually where the name comes from we call it ambient liquidity um but yeah with with that ambient style uh passive liquidity um and then right I think over time as a token becomes more liquid just naturally it is the liquidity is going to be more active or more concentrated because just more Capital efficient right like uh kind of the nature of uh passive liquidity as you're providing you're using Capital to provide

liquidity all the way from zero to Infinity um ethereum is probably not going to go to 50 so hopefully in the next 24 hours so you're kind of wasting Capital to provide liquidity either so so we think we think both are important and then support it and to have that in the same place without fragmenting liquidity right on right on so let's let's uh let's start jumping into this thing so I think one of the the more interesting things from a technical perspective is Ambi was the first single decks single contract decks uh so why the design choice to make everything in a single contract and what are like what is this unlock for you as the developer right so the the big deal with it is that uh in in previous dexis every time you add a new pool you had to stand up a new

contract and it meant that every single contract was individ individually managing its own collateral right so um you know out of the box right what that first thing that's really hard is like standing up a pool is like pretty heavy weight right because you're deploying uh like a pretty big contract uh on mainnet it's not t you're talking about a few hundred dollars so like um you know for whatever if you're a decent token that's it's not like gonna break the bank but if you want to do like a very cheap and easy experiment it's not it's not great um but more more important um right kind of when you have everything in one contract it's more like one market right because I'm trading between different markets let's say I'm going

from uh you know [ __ ] coin a to e to [ __ ] coin B in my route right like and traditionally what would happen if the eth would have to move from Full contract a to uh you know whatever router contract you're using and then back to pool contract speed right and that's pretty heavyweight and unnecessary right because like at the end of the day each just winds up back at the market so when everything's in one place um right you don't need to worry about moving the tokens around the tokens are all um all in a central location the pools are separate but they're just lightweight data structures inside uh inside this uh larger contract so it just it just makes uh reduced restrictions between training uh markets

easier uh I think it's going to make markets more efficient over the long run and then and then also you can do interesting stuff with uh flash accounting where you can even start trade you can do trades you can trade on one uh you know in one pool and you don't actually need uh fill fill in like those tokens until until then that the end end of the trade so also makes like Arbitrage uh a lot lower cost so technically you could be able to do Arbitrage even without a full cycle Atomic Library charge without even staring any tokens yeah so that gets pretty interesting by reducing the erc20 transfers between pools right because if you look at like you know a a uni swap or a curve swap just straight through

the the front end about 50 of the gas is actually the token transfers themselves so I find that super super interesting to be cutting that down um and I guess with like I'm just trying to like uh work through what are the implications of having cheaper swaps like right because the Arbitrage Wars still need to pay the same amount of gas as each other to arm the pools um so really the benefit comes down to the decks being um like the arbitrary transaction happening more often so you're like essentially getting a better price as a decks am I thinking through that properly yeah I think I think that's right right like you said the Arbitrage orders are still competing with each other um but the kind of the threshold to where they're profitable is going to be

lower because the gas costs are lower which just means that um especially for smaller pools where first on a ton of liquidity and the Arbitrage profits are not that large they're more likely to stay those prices are more likely to stay in line with markets efficiently over over time just because it lowers the Arbitrage Wars can call kind of add smaller discrepancies okay okay that makes sense and so would that be like increasing the amount of toxic flow that would come through the pool or how do you think about toxic flow in general like yeah we've thought we thought a lot about um toxic flow so specifically for this question it actually um if you lower the barriers to Arbitrage it actually decreases the

total um doesn't necessarily decrease the total amount of toxic flow but it increases the number of Trades that happen um to get to the same place and so ultimately it is better for for LPS um so what one way to think about it is um assume that uh you know an Arbitrage where only came in when prices got out of line at one percent or whatever and and this this might be within our Our Deck so it might be even more the prices in our decks are a little bit quick um to be honest is where most price Discovery happens in the crypto markets um so if you know if your cost to come in is a certain you're not going to Arbitrage until Andre you know right

until you're one percent out of line um right arbitrary is going to come in infrequently but they're still going to you know the price ultimately the price is going to be moved the same distance like over over that time frame um so Arbitrage lawyers come in less frequently but they make bigger trades now let's say the price to uh let's say your barrier Arbitrage was only uh one 100 or a basis point right um Arbitrage doors come in much more frequently but to actually get uh but some of those directions are going to be wrong right because the Market's going to bounce around over time right so ultimately what happens is you get the same total toxic flow but you get a lot more Arbitrage trades and

uh and therefore a lot more fees you collect collect over time so I'm actually lowering the barriers to Arbitrage uh results in a better deal for LPS okay I'm following that then so right like even if we get that one percent move um in the cheaper pool to arm against you know you could get like a half percent up and the quarter percent back down and then get the one percent so that extra trade is extra fees and up 40 down 40 up 40 down maybe then maybe like three quarter percent up right so you end up getting you know whatever nine um and you know two two times right you end up getting like nine quarter percent before what more right on okay totally falling there that's that's really interesting and I guess that's a great

segue into kind of how you think about LP while being in a pool and like a lot of that does stem from the fees that they earn to be uh you know from these trades so how do you think about the I know you guys are employing uh Dynamic fees so talk to us a bit about the the dynamic fee algorithm that you guys are going to be using and kind of how it uses that to to price the current fee the way the way we think about it is um ultimately right like you the really nice thing about amms is like uh you have this concept of uh IL or Divergence loss or whatever you want to call it and all and the really cool thing is that's not path dependent so um you know if you don't think about Visa like just how much IL do I eat

sitting in this pool relative to holding a 50 50 portfolio is just a function of how much the price uh the price moves so if I if I join the pool and I leave uh let's say a month later um how much how much IL I ate um how much it cost me it's just a function of where the price ended up so it doesn't matter what happened in between it just matters where where the end is so the interesting thing is that makes it kind of simpler to think about um because what's gonna where things are gonna be in a month is just going to be a factor like exogenous Market forces pretty much so uh your IELTS kind of fit for any any given Market um there's not much you can do about it because you can't really change where the price are gonna be in a month

um but what the goal is it should be I should be collecting enough fees over that month that um I'm adequately compensated for it for the i o um and you know it might might not always work out that way but in expectation there's certain amount of volatility in the market there's probably going to be it's probably going to move X percent sometimes I'm like a little less sometimes I might move more but like with a given amount of volatility um right I probably have like some expected IL cost and I want my fees to compensate that for me so given that you can't really do a lot on the IL front what you can do a lot on is on the thief run right and and this is like you know this is the same onset how market makers work right like market

makers don't charge the same bid ask spread every single time like period every single second of every single day right and that's how amms have worked up till now there's six feet even if there's multiple features um right like in uni V3 they're still fixed right so if I'm in the five basis point Google I'm in 30 basis point pool I'm only collecting that for for the entire period um some sophisticated players might move between peers but that's pretty few and far between and again that like kind of gets away from decentralization where uh Joe six packs and going to be doing that so the goal is right like I should be charging adequate like relative to the um you know toxicity of the flow which

ultimately determines kind of this il on a macro scale right I should be charging that uh that flow forage toxicity right so I should be pricing it correctly so we have this concept of dynamic fees and and kind of the first step to that is like on a regime based menu so there are certain periods where uh usually when like volatility is high liquidity is scarce um highly in demand uh Liberty scarce Thailand demand so you as a supplier of liquidity ienlp should be charging more for liquid and vice versa periods where the Market's pretty plaquesit there's a lot of liquidity there's not much demand people don't aren't really trading the price of liquidity should should be lower uh we have a pretty clever hack where

because you have at least for for pools where we have this like YouTube see you have these Unique Pools where you already have different feet here so you're like running a natural experiment I can look at the at least I can look at the five basis point pool I can let them 30 basis point pool and I can just look back over the past hour which pool has been um outperforming in terms of collected fees um so because we have this natural experiment um and because it's pretty persistent and usually like the five basic Point Pool has done better over the past hour it's probably going to keep doing better over the next hour we can um we can just toggle the fees in our reflect which pools outperforming so so theoretically with pretty good chance right you get the best of both worlds

right because because fees adjust over time so so we kind of call that a price Discovery vampire attack um in the sense that like the uni markets are doing the hard work for us there um so that's that's what uh that's what we're gonna have about um very soon and that's kind of phase one phase two is we want to actually start looking at where does order flow originate from and not all sorts of water flow are equally toxic um so for example liquidation box tend to be very very non-toxic uh because they're not usually trading to like capture small Edge they're not usually trading like against the binance price they're trading for different reasons um so to the extent uh sent that that order flow is coming it's on toxic another example of non-pots order flow

is uh the anything coming off like the metamask router or the coinbase router because uh a very sophisticated trading firm is never ever going to send their trading flow through the metamask router because it charges uh whatever one percent fee on top uh and so right like just the fact that water flow is coming through there is a credible spine you can get into other stuff right where you can even start saying um you know you can build your own mechanisms you can say okay did someone go in and voluntarily accept like a two block delay or something and that'd be that'd be a credible signal of non-toxicity but what we ultimately want to do is start saying okay we can start dividing up order flow and what we do

know from our research is actually toxicity really only comes from a very small subset of walls so once you can start dividing up order flow you can start giving very good prices to incredibly non-toxic water flow um and then just start charging successively higher prices to the to the most okay so it sounds like there's two pieces here so let's dive into the first one first um which would be that like the pricing model is kind of based off of uh of the uni pools and you kind of like how you kind of called that like a price Discovery vampire attack so this seems like a great starting point but you know if it really does become like such a better um you know way more like less hostile environment for LPS than you know it would I I like in my head I'm seeing it

like a track successfully vampire attack those pools and so at that point um you know it would probably not make sense to leverage these lower TBL pools it's not the long-term solution it says Flubber act to get us uh and obviously right people might want tokens on us and we hope that the tokens train on us and and not unique for example we'll be on other chains where uniswap might not necessarily be so yeah you're absolutely right when we have we have other models uh we have we have an alternative model that doesn't leverage uh the unit swap so you can look at things like uh volume volatility we try to do as much [ __ ] well I actually think we do all the calculation on chain so you can deploy these models that look at certain you can look at your own pools um how fast have you been

at cumulative and you can you can kind of do this adjustment process where you can say okay you know my fees are 20 basis points in the past hour but um relative to like how much the price has changed uh or you know relative to the rate of change from the prices relative to my volume these These are probably too low or too high actually up kind of this control uh control like this feedback loop where where you adjust and does the user deploying the pool have the discretion of like what the the uh the fee algorithm is used for that specific yeah so we never really anticipated that hooks would be so popular on day one so we call on permission adaptive MacBooks are way better

um sort of way better so we always uh anticipated that we have canonical pools like kind of our main pools um and then we'd run it we never anticipated hooks would be so popular in day one we thought we'd have to actually convert people to do it so um we we uh we haven't just running with our canonical pools now I'll turn on uh turn on the user defined folks um you know within within a matter of uh could be within less than a week um so yeah I mean hooks got very popular uh so we're gonna make sure that it goes forward and if it's a user-defined pool yet same thing users have total freedom to Define uh if if they Define a given pool right what the what

is that we want people to experiment right like we we have a vision we want to build stuff but we also want to experiment uh we're we're platform okay and I had this question later towards the end of the conversation but now seems like a good time to address the elephant in the room like what was your reaction when you saw the uni V4 announcement are you like excited to kind of see things moving in this uh like like I said at the beginning like this seems to be like this concentration of ideas towards this more active amm like how are you feeling when you saw that announcement uh that's good I think it's good validation um that the stuff we've been working on uh is is important right like a lot of these a lot of these ideas um when we started working on them

people people were like a like for example the the Singleton contract people would say oh is that a good idea should you put everything in one contract so uh at least never have to answer that question again uh so yeah no I I think it's a good validation of where we were going we're I think I have a lot of things where uni isn't necessarily doing it or they're doing it in ways that I feel like is less efficient than how we're doing it so it's good that they have have their own Vision they're building on it yeah Sean agree there and I have a Layman's question for you but I just hear a lot of concentration from your end on making the lp experience a lot better and increasing fees and revenue generated for them to you know kind of make up for

some of that IL that they experience so these this has to be coming from somewhere is it all coming from gas optimization or is it increased fees that Traders are paying like how do you really balance being a protocol in between two customers as the LPS and the Traders no it's really it's really tough right because you really have two two separate customers um for us uh we think LPS have not had a great deal um we think also depending who you are we can do have a better deal for swappers I mean the reality is I think uni is the existing amms or uni or whatever it's a very very good deal for um a very very small percent of swappers that probably don't look like your

regular swappers um I won't say which firms but right there there are a very small number of firms that are generating um a lot of money from kind of this broken amm model so I don't even know how much of the benefits of regular swappers um they're mostly you can look you can see which wallets are really truing um money it's it's not many um and it's certainly not the guy at home uh so I think right like it's a good deal for small percent it's probably a good deal for ethereum itself so so it does hurt me as an ethereum holder because right at the end of the day this kind of had this kind of uh liquidity that's not being charged correctly ends up uh

really people pay a lot of money for the top of the block and Burns Burns a lot of gas and generates a lot of Mev um fees and and block inclusion fees and so kind of juices ethereum yield and increases the burn um but yeah in general I'd say it's pretty bad for alt peas and even for regular swappers I don't think kind of fixing things really changes a lot if anything right kind of discriminating against flow will eventually allow us to you have better crisis to uh your most of the ordinary users now Sam I love that angle there and like I feel like an example of this of like favoring the um the lp over the the trader in some regard is like not allowing for jit liquidity right and you can't have a

deposit come in and supply to the specific range where the trade is happening and ultimately like that would benefit the trader right because you'd get a better price whereas uh the LPS get hurt in that scenario because they don't accrue the fees like is how do you like is there oh is it possible to over optimize for the wrong party I guess it is it is possible I I think though especially with jet liquidity the issue is that you're right like the swapper can potentially get a better person not not always actually so so that's the that's the other thing about it um because nobody's giving you chip liquidity unless the markets moving in the right direction so um as in against you as a swapper so uh you know

depending on like where your limit you're like where your slippage is but but like the point is if you send uh like if I am an Mev Searcher would I provide you I'm looking at the price of binance right so you have 12 second block time um and price of you're coming in and buying and the price of the price of Finance has gone up um I'm not gonna provide you jet liquidity because it means I'm getting filled at a bad price of Finance has gone down and it's a bad swap um I will provide you jet liquidity but but that's exactly the time I don't want to be filled so I don't know it depends what you're supposed to do you might get filled regardless but the point is right like jit liquidity also comes with adverse selection to uh to the swapper so so there are times right where where

it is better but like often and and like going back to tradify like we've seen like these types of these types of systems like flash orders uh like I don't know like 15 years ago 10 15 years ago and like equities market like last look in FX markets and and they always inevitably lead to like really low Market quality over time because what happens is even if you have jet liquidity eventually the LPS the regular LPS leave and then as a swapper you're back with uh less passive locality less firm liquidity and uh some jit liquidity that's unreliable okay yeah a super interesting perspective there as well but uh one of the other interesting things you guys are doing is the idea of like Surplus collateral where the idea of having like an account

within the Singleton contract so walk us through what that is why it's important and I'm really curious about how like the the accounting of it like how does the system actually keep track of the user balances yeah so so basically the way that works is um because all the collateral is help like all the tokens in the decks the collateral was held in a single place um what makes sense is that the user can hold uh hold the balance um just directly directly at the exchanger and really under the flood what that looks like is there's a map it Maps users to um the amount of tokens tokens they own um they hold on on their Dex balance um but what's interesting about that right is

now I can swap I can you know provide liquidity I can do anything um and I don't need to actually even move tokens in my transaction so so it's really useful uh and like you said a lot of the gas costs are token transfer so if I'm an active Trader if I'm going to hold a position for you know a few hours or whatever probably doesn't make sense for me to you know take the tokens out pay that gas and then go back send the tokens back in I can just hold this this Surplus collateral um position uh what what also is interesting and that it opens up is we want to move in the direction of uh quote-unquote gasless transactions and that's built into the protocol so

anything in the protocol can be done through these uh gasless transactors which were really uh years ERC uh Erp 712 signatures happen off chain you pass it to a relayer um it can even be you can specify which relayer I trust execute it you can specify given Oracle condition that has to happen that can be arbitrary so you know it becomes possible to do things like stop losses or only trade if like sort of condition art hit but um these this surface collateral balance actually enables that because the way the relayers get paid is they get paid out of this Surplus collateral so then now also you can pay if I'm trading I can pay just whatever tokens I want I don't have to pay uh you know the cost of the I mean ultimately

it's the cost of gas right because the relayers themselves have to pay the gas but I can say hey I'm willing to do this swap um and whoever executes it for me can collect two dollars of USBC at the end of ten dollars or whatever of usdc at the end of the trade um and now I don't even need a wallet anymore right so so it makes it really interesting right I don't have to manage wallet I don't even have to manage heat I can just trade on on this thing technically I could go to another chain I don't even need to connect to the chain right anymore I don't need to worry about what the native token is um all that stuff so uh that that's also kind of like why it's there to enable um that catalog return yeah so one thing I'm curious about is more on like I

guess the the gas side of things is like you know sex to decks are accounts for a large portion of Dex volumes today uh but these entities as you mentioned are like large players that have very strict internal compliance departments and like I'm curious you don't generally see these guys lping as much as just pure trading and like you know these guys won't even approve tokens to to pools um so do you think that like using these accounts is for them or like really who is this for it could be for them um right yeah it is a question like how did how long does it take for them to get comfortable using it it's certainly it certainly will reduce their cost so I think there will be some competitive drive to use it as even a fermain doesn't use it um firm B can use it and

can trade for half the cost of firm a um well eventually current B is just gonna win those arms so um so I do think there will be some competitive drive for it especially especially on the standard side uh so if you're doing omnic arm especially there are being between us and like another decks you have to take the tokens out um but especially on the setup side I think it should get more common but but I think even for like regular Traders um you know a lot of people will go and buy a token they don't necessarily if I'm buying some mean point I'm not necessarily buying it the whole if I'm holding it for a long time including your wallet if you know I'm buying it because the price has gone up I want to hold it for a few hours I'd say use use

the Dex balance so I I think there's a range people super interesting yeah do you uh this is a little more off topic but now it just came to my head is when it comes to retail flow do you think that will exclusive like do you think it'll exclusively just flow through Dex aggregators at some point in the near future it's tough um maybe but I think people have been saying that visas for a while and it doesn't it doesn't doesn't seem to happen so I don't know uh maybe maybe not um so yeah it's it's a good question uh I I think maybe sometimes people over emphasize with retail how much they care about getting like you know one basis point or

whatever a few basis points cheaper um and a lot of people just care about a better user experience um so I think Dex aggregators obviously can get cheap prices but they may not necessarily be the most fun app to use I mean like what's one of the biggest companies in um crypto coinbase it's not like coinbase is known for having the lowest fees but they have become users just because they have a better user experience yeah I think that's a super fair point I always think too with the L2 conversation it's like at what point do users not care that much about a 50 reduction in fees apples and oranges but same uh same takeaway um but I do want to Pivot the conversation a little bit to governance that's kind of a facet of crypto that isn't necessarily fully figured out yet

so I'm curious your takes on governance and exactly what aspects of the protocol will be governance controlled yeah so the protocol has a has a fair bit of power on on the governance side um and that's partially just to reflect that again we don't really know what the uh right like answers are we don't necessarily think like exactly the protocol as it as it stands today um will be the same protocol that ends up uh you know ends up being the right thing so you know uh what one big difference between us and uni is uh we're upgradeable um so we do think right there will be changes probably over time the kind of the architecture we have is super backwards compatible so any any like way people are using the

protocol uh will be you know always very very backwards compatible um in that aspect of it but uh there are things that we think we want to add in um over time um on the governance side uh you know because because those like Powers kind of exist um and also like to Define pool types um protocol fees to Define like what are the jet thresholds at least especially unlike the pools that are canonical so kind of on user-defined pools um technically the governance could override it but um we'll we'll defer to like if it's a user-defined pool what what whatever however they Define the pool is or what mechanism they give uh but that being said right like

because the governance is powerful we're really cognizant uh being careful around that so you know everything is carefully gated by you know long time locks uh and obviously rug people uh multi-cigs uh for now and then with decentralized going forward and then the other thing I think that we've done at least fairly Innovative on the governance side is we've divided out into this uh Canada's layer in between implementation and governance that we call like the policy layer but that's where certain aspects that might be governance related for example the creational like new pool types can be offloaded to um you know offload it for that just one specific

governance responsibility in one very narrow context to another um smart contract or another system um right and then that that so that's makes it easy for people to call it but but call that kind of those powers and in a very uh limited predefined predefined way if that makes any sense okay super interesting there as well um and so when it comes to things that governance has control of it's one of those things that's permission pools or as hooks as they're being called as well yeah so so yeah right now right now to actually create a new type of pool template it is governance gated um and so right to create uh so so the basically the way it works is there's

there's full templates each template um a template defines the parameters of uh template defines the parameters of like what's the permission Oracle which is basically the hook contract um and like Dynamic fee stuff uh the template defines stuff like what's the tick size in the pool uh you know what are the jet thresholds oh man other other escort yeah well it's stuff like that so the cool templates kind of Define these pool parameters um and then anyone can you know create and also gate whether the pool can be created On Any Given token uh pair or maybe be restricted to certain pairs right so there might be a pull template it's only applicable to you know certain

tokens or whatever so we we have cool templates on governance technically defines which templates are uh instantiated um but going back this policy system is actually how we make that permissionless where we say okay we have a policy where somebody calls in calls it it creates a pool template at like a hash um so right so that's how like you avoid collisions so you say okay you're you define this contract the contract defines uh cryptographic hash um you create this template you can set the parameters you set like the Oracle the permissioned Oracle contract all this stuff and right like now you can miss endlessly anyone can come in remissionlessly create um these cool templates through which

normally a governance function but like through a policy is has a has a very defined way to do it in a specific context so this is definitely something you've been thinking about for a while so I gotta ask you like what uh what kind of what kind of hooks do you think or permission pools do you think will be like super exciting and just can't wait to see people get their hands on it's it's a very question I I I'm really excited to see um again like as you can tell like what what you think is important is like toxic flow and the economics so I'm really excited to see kind of how people um start thinking about um the economics I think like in the amm space a lot of people have done a lot of work on what's the shape of liquidity like oh what type of curve is it is

custom product curve um or like this stick difference they haven't done a lot of work only adequately pressing liquidity so obviously like that we're super excited about so I'm really excited to see um like from a protocol so the example I always use is like Olympus style like owns all gold would it be in their pool right but like start seeing like protocols can say okay maybe you can only swap in this protocol this pool if you hold x amount of a certain tote Gunner you can only provide liquidity um you know if you're part of this Dao or or whatever so it's also interesting to see um kind of how these like walls like private markets all I think will be really interesting okay that's pretty

exciting as well because yeah I was I was actually thinking about something similar for uh for Dows as well just so many tokens sitting uh endowed treasuries sitting unused at like all right it's time to deploy get some liquidity back on chain but um one of the other things we haven't talked about is uh knockout liquidity and this is something that's like native to every pool and is not relying on like this external uh permission pool idea so can you walk us through kind of how knockout liquidity effectively it becomes like an on-chain atomic limit order in some way yeah yeah definitely so so what what it actually looks like is under the hood is it's a thin rainforter so unlike a traditional limit order which is just at exactly one price um would actually is is a range order from a very a very small rank so right

now it's 16 basis points um we might be able to make that small but the idea is okay I I'm into range order um the range order starts out of range so let's say you're buying right so let's say I wanna you know put in a limit order for e at um you know whatever I think it might dip to what's that now it's 17 30 I think my dip to 1700 so I'm gonna put in you know a buy order I'm gonna buy the dip um so let me let me put in a limit order here um it's gonna mint it's gonna not exactly 1700 it's because it's got to go on this uh it has to be on a ballot tick and the range but it might be like 1698 to 1702 or something right so it's a range order um it provides liquidity

like anything else in the Curve but what happens is when the price of the curve dips below the end of that range order um which is you know whatever pretty close to your limit order um when it dips below that range order so it calls this uh calls this function that basically takes that order um atomically pulls uh your liquidity out so so now you put in usdc or yeah you put in usdc you've been fully converted to eth um what happens is that the liquidity gets atomically pulled out of the pool um the fee accumulation gets snaps on it and then um when you can go back and you know claim claim the filled limit order

um and as well as any fees that the liquidity position has accumulated so unlike the traditional swap where you're paying liquidity in this case you're actually receiving local DCs so it's same as any other liquidity provided um so uh you know if you're patient if you're a patient directional Trader I think it's a very useful way to trade um and that and that happens all within the same curve uh so traditionally the problem with like kind of on-chain limit order implementations is if stuck in the stacks you probably don't get filled in this case even if there's a flash flops bundle uh if there's a sandwich um you you still get filled right it doesn't it doesn't matter as long as the curve touches your price you're atomically locked in and filled and it

helps helps the uh health of the pool itself right now now these limit orders are all provided would it be into the curve right which makes it a better deal for swappers and everyone else you don't have to worry about all this complicated probably so one of the things there is like I think this is an adjustable parameter but what's the minimum tick size because isn't there a world where you could get like partially filled yeah you can you can get partially filled so uh you could get until you're actually at the end of your range order and fully filled you're not atomically locked in so that would be one difference between like visual limit order where um if you get half still the right like your the price moves back um you don't have that locked in so you have to touch the end of it uh right we think if it's

thin enough for most users uh it probably close enough um but you're right like all the smaller kick sizes uh make that less of an issue um and when lower gas environments all twos we're definitely going to run at smaller case sizes but but for most ordinary users we think it makes sense if you're a high frequency Market maker um it's not as good as an order book but a lot of the times high frequency market makers make a lot of money is because they're playing at PVP game so the distinction here right like from an order book is that judicial order book um like limit orders are like it's very PVP like who's at the front of the queue who's getting filled right that makes it

bad if you're another locality provider so like to be clear like these limit orders participate Pro rata with all the other liquidity in range in the pool which we think is you know critical to keeping keeping the core dynamics of the name what would you say Doug like in two years like would make you look back and be like man like ambient has been a huge success like what is the the end goal for ambient yeah I think the end goal so two things one I mean one obviously like we talked a lot of fixing fixing the economics I wanted to be clear that you know lping is not uh it shouldn't be a debate like lping LPN can be profitable it's a useful way to use your money

might come with some risk but but it's a good way to um deploy deploy Capital um two would be right at Price Discovery moves on chain or at least starting to move on chain I I would hope price Discovery is still not happening at binance two years from now and nowhere else so um definitely want to make kind of these on same Market efficient and liquid enough where uh you know where where their actual actual markets are not just not just following along wherever it uh Finance goes interesting so I'm sure there's more examples but one of the largest examples quite honestly the only thing I can think of off the top of my head right now where price Discovery happens on chain I believe is steak to eat right because the curfew has like a two

percent depth of like a couple million bucks and I don't know if there's anywhere else even remotely close to that how does that change the Dynamics of of ELP alping and B Arbitrage yours well the first thing is I think of straight up better for LPS right because it like you can do a thought experiment where like let's assume you have liquidity pool where there's just like no endogenous users right you just have a bunch of liquidity and just sitting there and not have any organic users um all you have are recharge holders who come in and hit that and Arbitrage Wars aren't in the game to make or lose money right like there's something they're not losing money so at the end of the day right like especially for gas speeds like LPS have to kind of lose money at

least an expectation in that thing so to the extent that way more price Discovery happens outside the market like that's just bad for LP so the flip side of that is if you can move price discovery on Market or on chain and it was better for LPS right because that's actually means that um you have a lot more activity that feeds into to fees um you do kind of see that another example is like meme coins before they're listed are actually like we've done some research on this uh actually that's a pretty profitable help that is like one thing that's like pretty profitable from very volatile but um but there's definitely Alpha there um lping earlier on mean points especially before

they're listed on exchanges um so yeah that would be that would be like a pretty important like they kind of go hand in hand the the other thing is you start flipping it where like you kind of Hit the cycle where the more price like the less toxic flow there is or at least the better you are segmenting it the lower the cost for non-poxic flow which attract I mean obviously there's barriers to trading on faint but it attracts more uh non-toxic users right because you're looking what's the price to execute a binance versus what's the price to execute at uh hopefully you're looking at ambient and hopefully Ambience eventually cheaper than binance um and you say right okay maybe I'm gonna route my order flow instead of

binance and at that point um right like that makes the market healthier and then you know also then less toxicity then you can lower prices more and and so on and so on so that you know that that would be the dream right that we can actually start replacing not just am as archers things on chain right like we can start competing with off chain exchanges you know long term like I said I want Microsoft to trade on amps very very interesting and how does latency come into effect all this right you get a block every 12 seconds on ethereum whereas binance is quoting you every microsecond so how does that affect price Discovery again I think there's there's Goods there's good and bad to it right like obviously faster price

changes are better um the flip side of that is very very low latency markets the um very PVP right you have a few players who are really really skilled at executing really really fast which means if you're not one of those players um you're just at an inherent disadvantage so one thing that's like interesting about like on chain stuff is that uh when you know when prices move instead of a latency game it becomes a pop-up block right so instead of who's gonna fire off a packet fastest to the network uh Gateway or at the exchange Gateway who's gonna who's gonna lend top of the block so we have some interesting ideas about

kind of changing that Dynamic to where um instead of whoever's paying the most to get pop-up lockets whoever is kind of paying the most to LPS in the pool so I think like kind of long term it almost looks like a batch auction system um where you're saying whoever wants priority can you know pay the most LPS to get priority right but like kind of the surplus of those uh of those positional rents start accruing to the LPS in the pool which I think is healthier than even ordered books okay now that's super interesting and could you do that in such a way where like obviously you have to work around the base layer in this in this case like can you build that batch auction system

where it works on ethereum you can you can definitely build the system like that um so like rough sketch of it would be something like anyone can participate in the pool anyone can go in like pools permission list composable all that but you know the the the price you pay to interact with the pool is uh you know might just be higher it might be a hundred basis points or whatever but but still means the pool's fully composable no one can get it um the way it might work is really put this order flow segmentation system where obviously there's certain ways like I can credibly signal my order flows non-toxic um you know maybe I accept an arbitrary delay uh maybe you know I'm a larger

Trader and I've accumulated reputation up we talked about relayers and also the system where you have relayers and the relayers themselves are responsible for policing order and they have a reputation score over time and then in between right you might have people are types of flow but you start saying who's willing to uh it's kind of been a meme I don't know they saw like in the uni before white paper where they had the Donate function um we have a similar thing a tip system so it's kind of a meme like oh this is how we stick the lp profitability you just call the difference uh but yeah we have a similar thing we call it you can voluntarily pay the higher a hierarchy and that's not just

for me reasons it's because right like you might have certain players who over time consistently you know donate whatever X percent of their outflow into the pool and right now now with the permission tools you can build a reputation system you can say Okay um and in CZ it's on chain right so like well it's not easy but right like we have a Merkel route we can look over the history of the chain you can make assertions about it in some way or another and it's probably the hardest engineering standpoint but it can be done right we can look at it given Source or order flow we can say how toxic has it been and uh how much of the toxicity did it donate back to the pool and right now now you can start saying okay we have three classes we have

people who just don't want to participate at all and are going to pay a lot and they're going to be at a natural disadvantage like people are very non-toxic who are going to um naturally pay low fees are incredibly non-toxic or at least could be pretty sure they're not talk so they're going to pay low fees and we have people in between who are uh kind of able to get priority in this system but only to the extent that they're willing to share a large fraction of the uh the alpha with the LPS so it's a similar concept of flashlights right where you have players of alpha but a lot of the value of that output goes towards um towards the block build the relay or the validator or whatever in this case

hopefully the alpha goes to the LPS so that's that's kind of a very high level overview some nuts and molds to fix but super optimistic kind of on that that is wildly fascinating I have like a million more questions so we might take a we might need a whole other podcast for that to be honest with you um so I guess we'll let's zoom out here we look at the Dex market today uni swap by far and away is just dominating everybody in volume like what's the reason for that why why are they crushing everybody else I mean I don't think there's been a ton of innovation on the mechanism so there's been a lot of innovation on like Ponzi nomics how like things have been stacked on top of anything else but I don't think there's really been a lot of innovation in the

OR mechanism of how I name them actually works I think most things are either most things are still be two forks right so Union's on B4 and like most of these other amms are just V2 quarks still um yeah and just volatile pairs I mean it is it is right like the reality I hate to say this as a competitor but the reality is they have a pretty different position uh uni pool is almost like the analogy is like aspirin right where like the brand name has almost become like synonymous with the entire product category so uh people just use it as like shorthand I'm going to create a unique pool I the the other thing is right and like we're still trying like trying to see like oh they have a lot of LPS that are super loyal because it's pretty

clear that certain LPS aren't aren't necessarily great uh making money and they've been there for years so um you know have it having very loyal peace uh I guess is a certain like pays pays off or at least hard to hard to peel away um I guess the other thing though would be like the reality is like from like an on-chain activity perspective you've kind of been in like a clear bear market like it's almost like from like May 2021 like on chain like and maybe a peak like a little bit more in later 2021 but like activities kind of been down right like so before there was like kind of exponential up until like mid 2021 and that's just kind of been down

from now so it's probably easier to defend a dominant position when like the Market's kind of shrinking or in like secular contraction so it'd be interesting to see like can they hold that dominance when the markets like you know in exponential growth Model A lot right because it's easier to hold on to people you just don't win over new customers yeah I think that's a very fair point and makes a lot of sense but I am curious too like UT's a little bit earlier that you guys were planning on launching on the other chains so do you have any details you can share on that front nothing specific yeah um we should have should have some details soon although I mean ultimately we're chaining dot we're evm based obviously but pretty chain agnostic have my own views about different chains but we want to be where users

users are at um let the caveat that we're a small teams so trying to can't support everything on on day one so um we'll be kind of selective about like where where we roll out uh to see where we can make the biggest impact awesome that sounds great Doug and I I like that analogy of of uni pools kind of becoming synonymous with with dexes just as escalators and moving stairs and Kleenex isn't tissues but uh thanks a lot Doug this has been such a fun conversation really enjoyed having you on today and uh you know I guess there anything you want to leave the audience with where they can find you where they can learn more about ambient yeah us out at uh ambient doc Finance or uh follow our Twitter at ambient underscore Financial or follow my Twitter at uh at

Xerox Doug awesome thanks a lot Doug and uh yeah to the listeners Doug's a great follow so definitely be hitting him with a follow on Twitter thanks guys really appreciate it [Music]