Simon Harman: Chainflip - Native cross-chain AMM. Ep. 519
27 Oct 2023 · 1:02:56
Simon Harman, founder of Chainflip, joins Epicenter to discuss native cross-chain swaps and the liquidity fragmentation that bridges and wrapped assets have struggled to solve. He compares legacy bridging approaches with Chainflip's just-in-time AMM design, walks through how validator stake auctions and governance work, and outlines the roadmap for bootstrapping liquidity across chains.
Speakers
Topics
Transcript
welcome to epicenter the show which talks about the Technologies project and people driving decentralization and the blockchain revolution I'm Felix and today I'm speaking with Simon Haron who CEO and founder of chain flip chain flip is a cross-chain decentralized exchange and messaging protocol welcome to epicenter Simon so glad to have you here likewise Felix thanks very much for having me awesome right so I introduced it a little bit like uh what chain flip is already we're going to obviously talk about that a lot but as this customary on enter we like to start a little bit with the history of the the guest how they found their way into crypto I think for you it is quite an interesting
Journey with like many contributions already to like cryptography and crypto economics in general so like yeah why don't you tell us a little bit how you fell into the crypto Revit hole yeah sure um you know crypto's been a part of my entire adult life I just turned 27 but um I bought Bitcoin in high school in my last year um wow that's coming on for a decade now that's crazy um and uh I can't believe that uh yeah I guess me and my best friend were very interested in politics and economics and things at a very young age and for some reason um you know also being very into video games and such and developed a lot of stuff around Minecraft and other games
as well a lot of websites and things like that that was kind of my high school job so I don't know Bitcoin just kind of spoke to us um when we were young and through all the money I was making from website development into Bitcoin for reasons which elude me uh even today so but you know that obviously kicked off a massive Journey um you know started University and ethereum came out and was margin trading on poniac at 18 years old and you know this crazy you know things for young people to be doing I guess but with we were kind of crazy so it makes sense um but I guess you know my journey as a crypto founder I guess really started
after University uh when I turned when I was 21 and was very interested in the Privacy space um especially at the time obviously still am uh but uh yeah the idea of you know deploying blockchain networks uh to do stuff off chain so to speak was always something that I thought was um quite appealing and something that people weren't really doing especially at that time um and so founded a project called Loki now called oxen um where we spent we have spent the last almost six years developing um the Bane product that we've been developing on top of this network is called session it's a secure messaging app uses similar encryption to
signal but it's all deployed on a fully decentralized Network backed up by about 1,200 um independently run service notes they're called like validators basically um and we have like this sharded distributed storage system um and I think we're coming up on like 5 million downloads now I think about 800,000 monthly active users so you know after many years of development and a lot of pain um now finally starting to see uh this get adopted in all sorts of crazy ways there was um you know the Iranian protest movement last year that really kicked off the um the adoption of of session and you know getting random
emails from like the Swiss government saying oh hey guys so I just wanted to say like uh we we're all using this and enjoying it so thanks keep up the good work which yeah after so many years of developing in the bare market and um you know having a lot of struggles to go through as a result um is you know really awesome to see um I'm not involved on a day-to-day basis anymore in in that project um still being run by my co-founders Chris key and Josh down in Melbourne Australia but a couple years ago I moved here to Berlin um to take on chain flip um and you know it's another good example of a project which although is you know heavily dependent on blockchain technology you know we're
doing a lot of stuff offchain so to speak to create a product that um so far has eluded the space for many many years you know ever since ethereum became a thing um and alternative blockchains as well like even Litecoin and stuff I remember these sorts of conversations happens like for you know for a space that's so oriented around permissionless money you know why are we using all these exchanges to do all the value transfer within the space and you know what what potential other Solutions are out there um you know Bitcoin or ethereum swaps just kind of you know I consider it to be the Holy Grail of of the space and although there has been some good progress um in the last couple
years you know a lot of the time it's been some weird wrapped token thing um where you know you have this fragment of liquidity and this bridging risk and stuff and pretty low adoption um so yeah I guess that's sort of a hopefully a pretty succinct summary of how we got here and what links it all but um yeah as you say um it's been an incredible journey from start to well not it's not over yet far from it um but uh yeah the uh cryptography side of things has always been very interesting particularly in the Privacy space I was a really really uh good introduction into that diving straight into the deep
end um building off the back of a Monero based blockchain which has some pretty crazy stuff in it and now you know the sort of core of this protocol relies on threshold signature schemes in particular a scheme called Frost um which is a schnor signature based um system which allows us to create uh essentially Wallets on a bunch of different blockchains um and it's all controlled by the validating Network which we've CT at 150 could go higher but um 150 validators uh signing transactions doing key gen rotating the keys rotating funds through these vaults we call them um and that allows us to achieve a kind of architecture that the centralized exchang is kind of figured
out by default I guess you have several block uh several block chains out there you just create a wallet on each of those and then you sort of do the accounting and the swapping and the trading separately from that um so you settle using this threshold signature scheme but then you um do all of the the accounting separately with what they would call a matching engine in our case it takes the form of something called the JT amm which I guess we'll talk about later probably but um yeah I don't know is that a good summary am on the right yeah yeah very happy you already the into some topics that we want to like go into some more I guess so you've been working on this since since around when you said like quite a bit right
like TR FL been in we we started doing research into the topic at the start of 2020 I mean for your context um you know at at the time oxen was you know doing okay but Bitcoin just dipped to $3,000 at the beginning of the pandemic and you know we were kind of concerned that we w't really going to be able to um continue with the level of resources that we'd had we'd been building throughout the bare Market on what we'd raised um very early 2018 but you know at at that time for those that were around you'd probably remember how dire things seemed at uh at that moment in time so we were Keen to expand what we were doing and try and find an
angle that could sustain everything and luckily that wasn't necessary in the end but um it did give r to this idea of chain flip so yeah we started researching I think the first ver version of the white paper for this came out in July of 2020 which was right around the same time that Unis Swap and the whole yield farming thing and the defi summer kicked off so we were looking into this even before then right yeah I think that's that's actually very interesting because now I guess that was actually before all the like cross chain stuff really happened with all l1s and you know like I guess the concepts from ethereum being ported over to like other chains and and then like sort of these
systems are directing and now we do we do have a bunch of of bridges around right uh but I guess you know like um your network sort of expands on that and gets rid of some of the problems that some of these early bridges have maybe we can like yeah start there again I think you you already mentioned you you have this threshold signature scheme can you talk a little bit about how how it works and like what are the benefits over you know maybe some Alternatives of of bridges that are being deployed right now you know what's what's the what's the core issue that that this solves yeah sure um I guess like as a fundamental principle we came into this thinking about the entire vertical of um
Native cross chain swaps you know what what what is the user experience that we're targeting here and and you know that sort of informed all of the decisions that we made um in the protocol design and all of the updates that we've made to it along the way as well but as you point out you know there's been various forms of bridges and and wrap tokens and things around for you know years now um none of which have really proven to be you know 100% dominant in any particular vertical um so you know we've had a lot of hacks because a lot of these were just pumped out by you know random teams who either ran off with the money or built them in a rush and you know didn't do the
necessary due diligence and I think to an extent that's still very much happening today um although you know there has there has been some consolidation thankfully but you know wrapping a token in one place and and having it being available and another is fine but the liquidity available on these alternative chains can be very limited um you accept a lot of tail risk as well and you know I don't think I need to explain how much money has been lost doing this um it's extraordinary um I think the closest equivalent uh protocol that you might compare to chain flip there there's probably two that I would point out um one would be thorchain who definitely paved the way
um for this technology of of having this threshold signature scheme based settlement system and then layering a trading system on top of that um you know conceptually the most similar to chain flip although there are differences at every level uh between the two we don't share any any code or anything like that but conceptually that's pretty close and then the other one that i' point out is probably axela um which allows you to bridge US dollars from one chain to another that's pretty much the only use case um for it at the moment um and for cross chain messaging in general we haven't seen really anything else pop up that people seem to be using um in terms of the interoperability category which is a
word people love to throw around but then in practice falls short very often they too have a decentralized validated Network they're sort of doing this you know minting burning Oracle thing they have axle USD um as a sort of middle step that allows the minting and burning of um USD balances from one place to another and then from there you can use that to swap in and out of uh various assets through you know the usual suspects Unis swap pancakes hops so on and so on so um you know there are now Solutions out there that are miles ahead of you know the more traditional bridging Technologies um but uh still there is definitely room for improvement in in
especially within the native swaps vertical itself like for example Bitcoin you know you can do Bitcoin swaps natively now through Thor chain which is great um the only downside is you know due to the market structure you do have to wait quite a long time for those to be processed you know depending on the size of the swap it can take hours or sometimes even days depending on what you're trying to do and there's definitely improvements that can be made there um and then anything outside the evm ecosystem is a bit of a black box you know you have uh you know ICB within the cosmos ecosystem but getting in and out of there has been a challenge until recently Bitcoin woefully unders supported it is a dinosaur protocol I
hate to say it but you know working with it directly you can clear really see how far we've come um from that original design and the the number of workarounds you have to uh develop in order to be able to work with it in something like this is not fun um but it is what it is polka dot salana you know the list goes on um file coin you know telegram open network there's there's many many examples of the sort of non evm or non less compatible evm it's not it's not a one or the other thing you know there really is a spectrum going on here but with such a diverse range of blockchains out there and you know the size of some of the
Assets in terms of the volume and the liquidity and and such that you see in the centralized exchanges compared to the level of support it has within Defi and within decentralized exchanges generally is quite surprising and has remained so ever since we started and long before that as well so um yeah I guess we can probably dive a little bit into the architecture and talk more rigorously about some of the components that enable this but I guess our end goal is that you know W with one transfer you can send funds from any wallet to any wallet and receive the asset that you're looking for at essentially a zero slippage price um
with you know a very minimal bridging time uh as well we've got some unannounced features coming up around that which we're excited about I can't really talk too much about that but you know the I guess the idea the core idea uh is to repeat what Unis swap did for ethereum based assets you know before defi summer um you know all of the erc20 tokens were still pretty much exclusively traded on centralized exchanges but you know this year even now even in this you know pretty pretty bad Market uh Unis sw's been crushing coinbase in terms of volume you know there's the the ethereum ecosystem has really stepped up and above Beyond uh the centralized exchanges in terms of
convenience um and speed and all of that kind of stuff um as long as you can get that pricing and that liquidity aspect right and you know make it fairly straightforward we believe we can also repeat a similar level of adoption uh for assets that are outside of the evm ecosystem so yeah yeah I think the the core here being sort of this combination almost like native of the Swap and the bridging and like kind of thinking from that user perspective which which I think will probably helps a lot like actually achieve that too and so that's also why I want to Dive Into You also mentioned already the first white paper was like
kind of when Unis swap came out now the way I understand you have this just in time liquidity protocol right that's that's sort of uh similar to to Unis swap V3 but I guess initially when you when you started check flip Unis swap V3 wasn't wasn't even the thing yet did you already like sort of think in similar Direction about how like liquidity provisioning should work or did you later adopt the Unis swap V3 kind of model and and maybe also like in general how how is do we have to think about like chain flips like decks kind of as Unis swap B3 like native cross-chain features or are there like other differences there are other differences I would probably most closely related to
Unis swap X's proposed intense feature which isn't even out yet um rather than Unis swap V3 yeah but you're right at the beginning um you know Unis swap V2 was out and you know it was it it it'd been running for a couple years but it didn't really have the liquidity necessary to you know have it be widely adopted but then D5 summer came and that changed the game um then Unis swap V3 came out and then after that we decided you know rather than just do V3 which would have is an improvement um but in this particular context we thought we could go further and so we developed this thing called the jit amm so we we were seeing with Unis swap V3 this new
type of me attack quote unquote it's not really an attack because you know the user wins which is always nice um but essentially if you had a big enough swap coming in on Unis swap B3 you could submit a flash BS bundle where you could essentially create an incredibly tight liquidity position around the the market price of the asset so say it's was like a million dollar swap right um you could set up a flashboards bundle where um you add a bunch of liquidity at whatever price you like basically whatever you can get on binance and the prime Brokers OTC desks everything else so you know you're
basically sourcing liquidity externally deploying that liquidity then you execute the Swap and then you remove that liquidity so what you've essentially done is you've just front run all of the other LPS and given the user a better price to win the liquidity fee um and so that became very popular very quickly for larger swaps but because of the gas costs involved because of the bribery that you have to do to execute that you know the size of the swap has to be massive for that to make sense um but we realized well you know in our context because this is like a bridge and an Oracle and an amm Allin one um because of the the delay and bridging um everyone can know what swaps
are coming so if you send one Bitcoin to be swapped into chain flip you know um there it will take an hour for that deposit to confirm when we're going to we'll that won't be the case soon but we we'll ignore that for now um You don't need an hour to to do this you need you know a minute at top you don't even need a minute for the active LPS you know this is all done automatically programmatically um but because you know it's coming you can essentially go okay well you know I'm willing to offer X price on on bitcoin let's say 25k and there's another liquidity provider who is also doing the same thing and then well I'm going to offer 25 uh K and $2 you know I'm G to beat
I'm gonna beat you so um you have this system where liquidity providers can submit uh Maker only uh limit orders on top of the standard univ V3 pool so if you want to provide passive liquidity you can and um you know the the execution will move through that liquidity where it can um but these limit orders on top really supercharge the the marketplace because it means that rather than depending on um what is usually quite an inefficient pool structure you can have liquidity providers quoting in real time based on global index liquidity so effectively it means you get zero slippage swaps um you
wouldn't be able to get a better price on any particular centralized exchange because they that doesn't aggregate all the order books um so at least as a market order so you know that's that's a really cool feature and it's all nicely mathematically integrated we we forked Unis swap V3 converted it into python then ran some experiments and then once we were happy with the design we then converted it into rust and deployed it in the um in uh the state chain within the chain flip ecosystem so yeah you kind of have LPS front running each other to offer you the best price it's kind of like an open OTC market uh for Native cross chain swaps which is pretty unique I don't know if anyone else doing
it this particular way cow swap kind of has a similar thing going on but again that's only single chain swaps um and Unis swap X intense will also have a similar thing but again single chain um kind of auctions for incoming flow so um yeah hopefully that means for users you know you can swap 200k worth of bitcoin and get the same if not better price than you would on binance um but it's all done completely decentralized you don't even there's no accounts you don't have to sign up for anything there's no withdrawal delay or anything like that soon as the swap is done that's it your tail risk is over um which is yeah I think hopefully going to be very appealing to to
people yeah super interesting like I think I read somewhere in your dogs that this sort of liquidity provision that just in time liquidity versus like passive provisioning has sort of been like 3% of the volume in in 2022 do you know if that number actually went up in the meantime and and maybe I guess you already sort of mentioned it is that mostly because so it's it's like relatively low I guess still is that because of the the cost on ethereum like the gas fees and and sort of just not enough people doing it and and or where do you expect it to go do you think this will like go to 100% at some point that were like much larger like maybe 82 yeah well well I think with Unis swap X like the intense
infrastructure that they're building now does exactly this it allows it it creates a bit of time and a bit of space and this sort of offchain system whereby um you know market makers liquidity providers whatever you want to call them can put forward a bid for incoming flow so this is not a radical idea right this is this is something pretty widely understood um in even in the traditional Finance world the V3 amm or just amm in general are the strange thing that's occurring in the industry right that this is that's been the deviation from the norm but yeah the reason why it's not like 100% is because when you're doing a $50 swap you know to submit a flash Bots bundle in the first place to
be able to execute this kind of action costs I I don't actually know off the top of my head but you know it's it's significant it's hundreds of dollars potentially um and you know you have to be able to clear enough in profit um to make that worthwhile so the size of the swap has got to be you know several hundred, before it even makes sense to even think about doing this kind of just in time liquidity provision on Unis swap V3 again because of the gas costs um but on chain flip because we're running in this app chain environment the cost is essentially zero um so you can you can uh bid for this flow with no downside risk and you know locally Source in real
time from whatever Market making software you happen to be running so for users this is really good because it means that even if I am doing a $50 swap I'm still going to get you know access to those same sort of rates um which is exciting right and and so just to clarify I guess the the liquidity providers or the market makers or whatever you want to call them they interact with the chain flip chain State chain to like submit their orders and how how does it work in practice like some API or yeah it's called the lp API very creative I know um but uh it's essentially just a a a blockchain client really and you can subscribe to it and
you know you connect an account to it so you have some local keys so you you deposit funds into your LP account um so you send some Bitcoin you send some ethereum you send some US Dollars whatever or usdc rather to the chainlet protocol through deposit channels and then you have a free balance inside your LP account so really it's pretty much like a centralized Exchange in many ways many of the same exact same uh API calls it's just you're dealing with it through this rapper that talks to a blockchain rather than through an API that talks to some matching engine somewhere on someone's server right um so yeah it's you can think of it like an exchange account you know if I want to provide liquidity I you know send some money
into the exchange and then I can you know Place orders against any particular pair and they'll uh the trades will take place and then I can settle that later and and withdraw any of the assets that I have there so the lp API has many of the same things you know like place order cancel order modify order um that sort of thing range orders as well as limit orders um uh you know deposit withdraw you know all the same sort of API calls that you would make as a normal LP are available to you um as well as you know lots of data feeds like um you know you can also the unique thing though is that you you can subscribe to a list of incoming swaps so um you know it'll actually pull
information off the state chain to say okay um there is a Bitcoin swap coming in this block uh which is estimated to be around this sort of time uh at this size um um so that you know and then you can essentially automatically trigger a bid against that um using you know whatever Market making software you happen to be using so API basically in a rust written rapper which is fun right yeah that's awesome and I think I guess one sort of complication I guess in this Approach at least click from what I understood is that you don't really know in advance as the user um how much slippage you're actually
going to experience in the end of your price can you talk a little bit about again why that is I guess and how you're like sort of dealing with that or how how should how does the user Interac look is it like basically like you giveing some range of a price that can be expected or or how do you treat that for the user yeah I mean it's it's a good question right like you can't just read the state of a pool and then you know pull a price from it but you can the exact same thing is true for udy swap you know by the time your swap is included in a block and all of these transactions so adding removing liquidity other swaps have taken place before yours gets executed the state of the pool has changed the prices that
people quote or not people but these front ends quote um that you see across defi actually have no bearing on the final price you get and they don't factor in things like me and um you know uh price risk over period of time or or whatever the case may be you know there there is no such thing as a guaranteed price um with onchain trades it's just a reality unless you place um strict slippage limits which people don't do because um they want their swap to go through so they set a 0.5% slippage limit or something like that and then you are you're essentially at risk of losing up to 0.5% of the money but people don't seem to care about that as
long as there is some sort of slippage limit which is why although I don't think this is really going to make any practical difference uh in 99.9% of cases we are actually adding a feature now called fill or kill which allows you to set a minimum price um that so we'll s we'll actually simulate the swap on the chain at the moment of execution so that you we can make sure that uh if we are going to do a swap for you that it is at a certain minimum price that you're willing to accept um if not we will revert it and send it back to wherever it came from it does require a little bit more effort on the user side and we can't do it in all cases particularly where it's like uh uh we'll get into the cross chain messaging and
things like that but if if it's one hop along a string of swaps that's coming to or going uh coming from or going to some other Bridge some other chain some some of the decks it's very composable in that way but if it is one step in a long string of steps you know we can't always guarantee that we can go backwards right we can't always send back the money cuz we don't necessarily know where it came from we have an address but it might be binance or it might be a smart contract that you don't have control over or something like that so you know there's a lot of edge cases that we have to handle here which is why we didn't set slippage limits originally because that means you have to provide a refund address and you have to provide An Origin asset um and things might get
stuck so we didn't do that but um we are adding that as a feature so end users can have the confidence that if they send myone into this thing they are going to get a minimum price if they're willing to do the configuration step right you mentioned there like it can go through some other Bridges do you mean like are you also aggregating like other Bridges or meaning like other like because everything is sort of within the cross chain chain flip protocol is all like bridging happening within that sort of validator set or you also like using no no I mean I mean like like reality is when we launch we're going to support like five pairs and people want to swap more than just five different assets
right um so as an integral part of our product where we partnered with Squid um came out of axar originally um but that so chainlet will be included in in in a route but you know if I if I'm swapping from uh I don't know name name name something on Unis swap die right we don't support d right but Unis swap does right so uh um we can like we can configure the entire route such that we do a diece swap then we Ingress the usdc then we swap it to bitcoin right but we don't we we don't control Unis swap we can't revert back and we're not going to send it just back to Unis swap um so yeah we expect that the majority of
routes that we um are involved in are not chain flip end to endend right there'll be some but unless it's like USD BTC which actually could be the majority of the f I don't know um but there'll be a lot of cases where um you know it either starts on some axle supported chain that we don't support or it starts or ends in a Decks that are not us right so we don't have full control over the whole route and as such we have to build in all these different things to handle different edge cases depending on the situation um so it is quite complex luckily for you as a user this is all abstracted away and you don't have to think about this at all we've done the hard work for
you great so so you mention like it's five pairs I guess can you ex tell us like which which ones it are like BTC USD this one right and then is the plan to basically expand that and I guess for more is that like a permissionless process of how pairs are added in it can't be permissionless unfortunately just on the basis that if we're going to support a new chain all of the validators have to connect to some node on you know that whatever that chain happens to be and also adding new pairs um everything is denominated in USD which right now is only collateralized in usdc although as an end user you
don't have to care about that again we'll swap it to or from whatever you want um but all the lp positions are collateralized in usdc to start with um so yeah the that that's for liquidity reasons though by constraining the possibilities we make it much much more efficient right if by having only BTC USD and then eth USD um it means that we we we've seen this play out in Unis swap so much like the only pairs that are really there now are all backed in USD in some way because it just means no matter where you start and where you end up you're combining all of the liquidity for each of those assets in such a way where the end price always is always better so having a direct eth BTC pair
would just detract liquidity from all users so yeah this fragmented liquidity piece is a is a big problem and permissionless pools are part of the problem you know um there are some assets which have like you know six or seven copies of exactly the same Market structure where it's just not necessary right I don't know how many ethusd pools there are out there in the world but there are too many I can tell you that um and it makes things worse for you because what capital is out there is split across more pairs than is necessary so yeah right and I guess these sort of like red assets don't help
much there either because they make things infinitely worse yeah right okay yeah that that makes lot sense and then so yeah let's dive back a bit into the whole like validator thing where I guess we mentioned the threshold signature scheme but yeah maybe you can expand how what do the validators on chain flip do exactly and maybe also like you know how um you know our new chains added uh in in this world well what do the validators do they do everything it's it's a I guess you'd say it's an oracle Bridge Dex it's not really an L1 but there is a blockchain that they also validate
decentralized custody thing all rolled into one so everything that I say that chain flip does the validators do it so witnessing incoming deposits so someone wants to make a swap they create a deposit channel the validators organize that the that they then make that deposit and then and then it appears on the ethereum blockchain or whatever the validators observe that and then they have this consensus system where they agree that this has taken place so kind of like an oracle um and then that triggers a followon action which is usually a swap um which is then EX executed in the following block and we have specific execution rules so it's not it's not an L1 you can't do whatever you want on
this chain um there are you can own swaps are only triggered through deposits um so you know you can't sit there and submit a swap transaction this is all automatically executed by the validator network so this app chain environment that we've built is Works quite differently to what people are used to um none there's very few uh agent initiated actions so on Unis swap to do a swap you actually do the swap you pay for the execution and you you actually do the SMART contract interaction that's what you're signing um and then you know whether or not it follows the rules as how it's determined
but in this case um the validators uh doing that execution automatically which is very cool because it means we can automate a lot of stuff we can add a lot more uh bespoke rules around it but it's all part of the consensus driven process and then once you end up with the asset on the other side then the validators are going okay we now need to send this money somewhere so they'll uh agree on what the transaction looks like so how much gas we're going to pay where it's going to be sent to how much we're sending all this kind of stuff and then they'll get together and they'll do a threshold signing ceremony so they'll use this massive schnor signature scheme 100 of them at any time 100 of 150 is the threshold and um then they'll do a joint signing
ceremony it's the largest decentralized custody Network um uh system I think in crypto I could be wrong but I can't find any other examples of this especially at this scale and that's pretty cool because then you know you have now produced a valid Bitcoin uh transaction or a valid ethereum transaction which one of the validators is then nominated to broadcast if that fails everyone has a copy of it so they can deploy it again um and so on and so on and so on so they're doing everything they're doing everything that a centralized exchange does all in one and all together you know this is consensus driven which is why it's taken us three years to develop because the number of edge cases that you have to deal with um and even even
simple things for seemingly simple things like tracking gas and determining you know what the price is you know there's no human on the other end that can go ah that was too low I'm going to have to you know boost it now like that that's not a thing we can't really I mean we could do that but this all has to be done completely automatically all through a blockchain so you know it it really is like pretty Cutting Edge stuff and we're not the only ones that have pulled it off you know Axel has done parts of this Thor Chain's done a lot of this as well um but uh yeah it is yeah difficult to say the least but you know we've been running test stats now for over two years and uh you you mentioned like 100 of 150 that's that's because of like
consensus thresholds like 2/3 need to sign off talk exactly so there's no point doing 150 of 150 because you only need 100 right so to make it scalable yeah you you pick the minimum size you randomly select from the group and then if that fails you retry with the second group within the 150 set and that means like each of the validators needs to have like the same amount of stake or the same say I guess in the network is that correct yeah and I guess we'll talk about the auctions soon and how that works but yeah essentially you could describe it as proof of authority but it's not really um there's a sort of bond level that everyone's bonded to um
in any given Epoch but uh yeah exactly right they they have an equal share they have an equal weight I guess um just because of the nature of the threshold signature schemes right so so yeah let's let's start actually with the auction so you right like again we have 150 validators they run all the networks actually that's maybe also question is it like all the validators have to run all the networks or can validators choose which on yeah they they've all got to have they've all got to have the same endpoint connections I mean we could we could Shard this out in some ways there are ways we could re architect it but you know for now um you know axela is able to have all their validators run 20 end points so it doesn't really seem to
be a huge limiting factor so yeah in order to be a validator you need to have an endpoint available for all of these different chains often times best way to do that is to run your own node but there are some networks where that's just completely impractical like running a salana validator for example is yeah very very expensive um so yeah we leave it up to the providers um you know Thor chain we're pretty big on forcing everyone to have their own light client or something of that nature but that didn't really work so then everyone ended up having to run a full node but that's very expensive and very combersome and very painful so then you know of course validated operators being validated operas devel veled workarounds and then just ended up using you know infura or
whatever for the the equivalent thereof which is fine you know as long as there's diversity um it's uh it's really down at the end of the day the validated operators themselves are on the hook if if they if they end up using a malicious endpoint um you know they're probably they're going to be in the minority and as a result they're going to get penalized for that um if it fails so yeah right and I guess you know a bunch of the validators depending on what sort of enti are probably already maybe running Al Solana validator and might be able to use that architecture exactly exactly right yeah okay so again I guess the the difference here with with this weight from people that maybe know like Pro of steak in other ways is like
there's generally maybe like delegation and like different stake amounts now you guys have a bit of a different system because of I guess the limitations or the TSS what what that requires um and that's this auction right you need you need to essentially have or or can you explain actually how how are the 150 validators that end up running this stuff CH Chosen and like you know yeah I guess the entire system that's behind that yeah so this was a real challenge to come up with um crypto economically how but like there are some very specific constraints in place in this system that mean that you know it's just not going to work like other networks um there is a finite number of authorities
or validators that can hold the keys because of scalability constraints um you can't wait those different uh shares either they're all worth the same thing so the question is you know how do you distrib how do you make sure that the stake is distributed as evenly as possible across the set um and what we developed in response to that is a system called simultaneous single around open Dutch auctions which is a horrendous mouthful but basically the idea is we have a rolling auction and the start it's going to be every day every 24 hours but um just we're going to reduce that every 72 hours um and essentially what happens is uh the top
150 bidding validators are then selected and the lowest value uh the lowest staked value of that becomes the bond or the minimum active bid is sometimes we sometimes refer to it so everyone is is committed to the same level of stake every auction and it's all determined based on the lowest bidder so even the the stake the required stake is evenly spread anything on top of that can be withdrawn and that's so we can enable you know dynamic rebalancing so if I'm a validator operator and let's say I have three validators and um the minimum stake is like 100,000 flip let's say or the bond ends up being 100,000 flip
through this round of auctions but you know two of my validators have like 150,000 um and one of them has has 100,000 um I can now you know split off um that excess State take take that off the top and deploy it into a new validator thereby increasing the amount of validators I have uh to four and you know now I have 400,000 uh flip Stak when I'm earning more rewards so it's trying to encourage this natural redistribution across auction cycles and it's trying to make sure that the level of stake uh provided within each validator is equal so as the Dynamics shift um you know this will change to
there are also rewards for backup validators for those that are not successful in the auction just to keep them around and there's a whole thing around that but I think this is um a really exciting component of of the protocol actually and particularly around the the flip staking Dynamics as well we also have a liquid staking um product that's been developed on top by a company called Thunderhead St flip so you know if you're not a validator operator directly um you know you you can you can just go to them and they'll do this rebalancing for you across their providers um so you know from an end user perspective for a flip holders perspective this may not be that crazy relevant but you know we've had to develop it in this particular way in order to yeah overcome some of the requirements that arise as a result of
having this decentralized custody system with this equal weighted shares across each of the validators like you know the people are ask me sometimes like oh why aren't you a power chain you know you're you you have the substrate thing like why well like yeah we could be a power chain but then we'd be paying for security that doesn't really help us because you know securing our blockchain and securing the the extrinsics in that a one thing but these guys are holding key shares to vaults with millions of dollars in them um that you know are not held on on our blockchain they're actually held externally so you know adding addition like that's the most vulnerable part economically um of the system and so everything has to be
oriented around that but I think the auction Dynamics will be quite exciting because the stake will probably start out low like there won't probably won't be 150 B bidding validators in the first rounds of auctions so it'll be really easy to get in and like earn rewards and stuff but then it'll like slowly scale up as more rounds are conducted so I'm really excited to see that play out with the main net launch coming up very soon right yeah yeah it sounds super interesting like novel sort of mechanism I think yeah what I'm wondering I think there's a similar thing a little bit on sui that I'm aware of where the validator sort of bid on the minimum gas price for the epoch which also like kind of means the validator has to like do this extra step that they generally
maybe don't do like in in on top of like just running the software and and validating transactions like actually actively sort of submitting some sort of bid for something that is I guess in the sui case for the gas based on their Hardware cost which is also already like you know how do you actually measure that I feel like it's space maybe not at that point yet but can you maybe explain in the chain flip case how like what are the like parameters that the validators take to kind of make uh a bit or like how much how do they determine how much stake they they should bid is that based on like the competition or the expected rewards that come from flip staking or
you know how do you actually set this value as as a validator yeah I mean it's it's it's purely down to market dynamics so it's purely down to the appetite of other validator operators right so if there's you know 150 validators but they're all only staking a th000 flip then they have no reason to stake more than a th000 flip um but because of the rewards you know there's obviously an economic equation that comes into this which is okay you know um if I stake ,000 flip my apy is going to be like 1,000% and so you can imagine that you know a lot of people are going to then go i' be crazy not to stake so you know you have this market dynamics system whereby at some point there'll be some
equilibrium that's reached where the level of reward is um reaches the level of uh essentially the level of stake so you know if my apy is you know effectively 10% and that equates to for argument sake like $1,000 a year it won't be that I don't know what it's going to be but let's say it is right but I'm spending $1,000 a year and running this thing anyway while I mean I'm not making any money so I'm not going to bid anymore and if I get dropped I don't really care so then the state comes down to account for that um like just through natural auction Dynamics people will leave the network and then the stake will come down the API will go up and so you know there's
this constant um rebalancing that's Tak taking place which trades off operational costs versus the revenue that's coming in versus the value of the collateral it's perceived future value and all these all these kind of equations that each individual validator operator is going to make but um from an auction Dynamic perspective you know that means that we're always going to be at a level of collateralization that across the validator set trades off all of these different factors so um hopefully this is a set and forget thing for us as protocol developers you know this is a system that we've developed that we think will mean that we never have to touch it we know we we there would there
won't have to be a discussion about raising or lowering things uh unless it's sort of a central govern Central Bank kind of situation right like where you control interest rates and then that has knock on effects which affects people's economic behavior so we could increase or decrease the level of emissions that are being paid to validators that's the one Lev that we can sort of um adjust to influence the auction Dynamics there so if we increase it the apy is going to jump up and then people might want to stake more and then uh you know that will lead to a higher level of staking at least in terms of flip vice versa if we reduce the level of emission then there won't be as much rewards which may cause people to drop
off which then may in turn lead to a decreasing stake so yeah token economically I think it's pretty interesting um but you know I'm I'm a nerd so I don't know no no it's great yeah and and this sort of governance decisions like can you maybe actually talk a bit about how these are made is is like token voting from flip holders or you know what's what the system yeah that could that could be a thing at the moment the way we've got it set up is we kind of have a governance Council which right now is chain flip labs and I hope will continue to be that way for some time um but we have token weighted uh voting in a in place to change the governance Council
if it's elect a new government basically you could you could think of it as um but you know obviously you know like any blockchain developer we do all this in consultation with the community and the stakeholders and the validators and the LPS and everyone who's using the system um because ultimately you know that that's that that's where the value is being driven that's who all the stakeholders so we're not going to do anything that um we think will be you know existentially bad hopefully um but there is there are options the nuclear option for the community to get rid of us if that's what's needed um but yeah when you're running your own blockchain network like it's not that there's really no it's not worth pretending that
there is another way of doing it because like this is all connected to the validat software and someone's going to publish that someone's going to sign that you know at the end of the day um you know the whoever is running the development process someone has Authority at the ultimate Authority including Bitcoin you know there there are no networks where this doesn't apply if you're running on a smart contract on someone else's Network okay that's a different story um but that's not the situation here um so any independent Network any network for that matter um has has a similar Dynamic so um yeah in the future you know we could develop certainly develop like a a token weighted governance I mean the governance pallet that uh ships with
substrate has a lot of this in place already um but it would have to then be linked back to all of the specific functionality that we're voting on so to even do a vote the developer would have to create the hooks in order to decide between different outcomes for the token weighted voting to even make sense so um yeah it's governance is an interesting one but uh yeah I think uh overall you know the reality is is that chain flip lab is just going to be leading the way especially early on um but yeah we don't exercise any uter lateral control over um the network or the people that run it or anything like that so you know we don't we don't hold anyone's money um which is very important um but uh yeah
from a governance perspective you know we we're really going to be trying our best to iterate quickly especially in the opening first few years uh CU you know we don't no one really knows how this is going to play whether or not the settings that we said at the start were right or not and um you know so we have to yeah adapt based on what we see I guess yeah yeah yeah know that makes makes perfect sense to me I guess you can also like signaling proposals or something I guess because also flip as I understand is a erc20 on ethereum also right so you could even use Snapshot or yes whatnot right so I guess there's a lot of ways to at least somehow involve I mean yeah governance a whole topic that is quite
complex so we we don't need to like dive much deeper but yeah that's that's helpful for understanding so maybe also like one more thing there is we were talking a bit about how new networks are added and that's that basically like chain Flip or like the labs team in discussion with the validators or this is decides like a new network that should be added and then it will be added to the software and from then on all the vators need to run that additional clients yeah from a certain point yeah there'll be a releas like you a consultation period then there'll be um a release which enables them to add it and then at some point there'll be a switch over which is triggered with an onchain governance extrinsic um but you know if we were to just decide oh we're
we're listing Litecoin tomorrow and then no one's actually added it and we don't run the runtime upgrade and nothing's happened then the whole thing just stops so you know we we can't we can't just do whatever we want it doesn't work that way we we have to work in Conant with the whole validated Network so we talked a lot about like the system of of train flip but obviously you've been working on it for last three years maybe to to slowly wrap things up can we we can talk a little bit about you know where you are at right now the road map um maybe also you know what future use cases you could imagine like chain flip Network being being used for uh I guess yeah let's
let's let's get to that so maybe we start with you know when when mainnet and um you know well just between you and me and I guess everyone listenting which is not very secret I suppose but we have already conducted a stealthy main net sort of soft launch um we're not going to use the network that we we did that with but we you know just wanted to sanity check all of our work and make sure that what is working on testet right now which you can go check out live um at any time uh is you know make sense on Main and you know things like gas estimations and all that work out and it worked so uh we did find a couple things um but you know we are we are very much there now after three godamn
years we're F finally putting it out um we have a a loose tge date so the main net is going to be live in the next two weeks but it won't really be live because it w be public because normally we out to stake to it or do anything like that because they haven't got the tokens to do it so the actual token distribution go live date every auctions beginning all that kind of stuff um so far it's been slated for November 8th I hope that date holds and by the time this goes out that may have changed um maybe not we'll see um launches like this are always a moving Target you know there's a lot of things to consider you know both with mainnet uh operational concerns but then also commercial concerns as well with uh exchanges
custodi and so on and so on so on uh which we've been working very hard on as well but um yeah finally that item on the road map ticked off boom hopefully by the time you listen to this uh it'll already be live then straight after that we have a period where we need to allow the validators to collateralize the network so as I alluded to before you know starting at a stake of zero we have like just three boot nodes basically um that don't really have much of a stake you know that needs to grow to 150 validators with a fairly significant stake in order for us to be able to safely deposit liquidity into the system for it to be secured so we're leaving running for a few weeks um we don't know exactly when that's going to be yet we
probably need to see what happens in the first couple weeks um to be able to lock in a date for swapping to go live because you know we don't want to ask LPS to be throwing millions of dollars into liquidity pools if there's like you know only 10 validators or something crazy like that so um I don't think that's going to happen but um you know we have to we don't want to ask people to do anything crazy like that so yeah uh the I the idea is hopefully by the end of November uh which is rapidly approaching um as winter sets in time is accelerating thank god um get through this this cold spell but uh yeah the swapping itself will go live LPS will be able to make deposits um users will be
able to make swaps We'll Be Live uh in Squid router from day one so you know in complete end to end user experience will be there uh also got several other wallet and aggregator Integrations as well in stages of development and so yeah hopefully we'll be able to generate um you know some of that early volume and and and hopefully the whole thing will make sense economically from end to end it might not but um you know that's uh that's the nature of the business you know you got to got to be in it to win it so um yeah in terms of follow on road map stuff we've got a bunch of new features that we're going to bring out uh before Christmas um and then into the new year as well including new blockchain
um new features to make swapping faster make it cheaper make it better make it more competitive in the aggregator Market you know and uh you know things like this filler kill feature that I talked about before as well um yeah we've uh got something in the works with in regards with the usdc and cross chain transfer protocol by Circle themselves which allow for uh seamless liquidity rebalancing across a lot of different blockchains which will be very very cool again part of that efficiency piece making sure we're not fragment we don't have like a usdc usdc pool on like two different chains because like why why would you do that if you don't have to you're just wasting US Dollars um that could be deployed to
fill actual like swap swaps you know so yeah the road map is endless you know there is there is so many things that can be done in this vertical to improve it for users be that more chains more assets um making the swaps faster making them cheaper and so on um um but you know you asked before what else could the chain flip Network be used for and the answer is nothing we we do this you know a lot of projects like try to sell you the world you know this is the interoperability solution it can do all of the things and yes we have cross-chain messaging but that's only so we can make the swaps uh compatible with aggregation we only do swaps we only do
Native cross chain swaps spent three years on it and we have a feature list a mile long uh to make that better so you know you won't see us doing a lending product you won't see us doing some sort of yield farming thing although we can do like liquidity programs and stuff but it's all in service of uh cross chain native swaps that is our vertical and we are staying well within that you could use this architecture if you were to like go away and re-engineer it you could maybe use it for other things as well some sort of cross-chain lending protocol you could build a derivative platform that settles on all these different chains and stuff but there's already a bunch of protocols that do that you know um this has been specifically engineered so you can go
swap half a million dollars in Bitcoin in a completely decentralized fashion in under a minute with zero slippage I mean if that's not cool enough for you I don't know what is Felix I'm really sorry but I can't help you nice yeah that's a that's a great pige and I'm I'm very excited to see your work of the last three years go live soon so we're recording this October 12 I think we're actually going to release this like quite soon so might be that it's live before your life maybe we'll can we can like hold out a bit and release it with the actual launch would be great um but yeah thanks so much for expanding I I do think right that focus is key I think one thing that I also learned over the last five years in
crypto is that you know yeah sometimes projects maybe that haven't rece like gotten the traction with their like core thing try to sell you everything else and in a like attempt to like sort of stay relevant or sort of find something that has pmf but maybe it's maybe it's better to like stay focused on on the one thing and and especially if that has fraction double down on it I mean yeah Unis swap being maybe one example for that or also DDX which like sort of a with there I mean I i' have experienced personally as well with session I mean you know in the first two years it was it was not good you know the adoption was not good but the app was also not very good um but we didn't give up you know we kept working at it and now you
know we're experiencing month-on-month downloads growth um consistently without spending any money on marketing you know so finding product Market fit I think people have very short-term expectations in this industry you know it's either pops off now or it's it's dead but if you that is true for a lot of things which are sort of don't really have strong fundamentals but for something like this where you know people are swapping billions of dollars of Bitcoin every day and we're developing a unique venue for it it may take time it may take you know several months several years before um you know this achieves some level of produ product Market fit I don't think so I think on goto Market
strategy is good but you know I've I've experienced personally that if you if you believe in the fundamentals of the product vertical that you're operating within and you're willing to be able to adapt your thesis and and adapt to the market as you go live I I think that yeah sticking to a vertical is absolutely the way forward for for many teams at this point in this level of maturity that we've achieved in the crypto space over the last decade awesome Simon thanks so much for coming on today and yeah we'll link a bunch of the documentation and stuff in show notes and yeah glad to see chain flip live soon and thanks so much again let's hope it goes well thanks so much Felix