Whiteboard Series with NEAR | Ep: 41 Matt Luongo from Thesis
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
Thesis Founder Matt Luongo ( / thesis_co ) and NEAR Co-Founder & CTO, Alex Skidanov ( / alexskidanov ) discuss the design behind tBTC.
------ About Whiteboard Series --------
The Whiteboard Series with NEAR is a set of video interviews with Founders who are building scalable solutions for Blockchain. We deep dive into their story, what they're developing and how it is helping the ecosystem.
Follow the latest from NEAR Protocol on,
Website: near.org Discord: near.chat Twitter: / nearprotocol GitHub: near.ai/github
#WhiteboardSeries #Blockchain #FutureIsNEAR
Transcript
8,176 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:04
hi everyone this is alex from near with me today is matt the ceo of thesis and we will talk today about uh the design behind tbtc uh which is extremely exciting uh so so matt would you like to introduce yourself and give us uh the high level overview yeah yeah of course um so yeah i'm i'm matt i'm the founder and ceo of thesis we're a cryptocurrency production studio so uh if you're familiar with fold um they spun out recently they're
- 0:36
uh shipping a bitcoin rewards back card um keep network uh is a big product of ours and on top of keith and on top of ethereum uh we built tbtc which is a bridge to safely bring your bitcoin on and off of ethereum so you can do things like earn yield uh take out usd loans and really participate and defy widely with confidence that you can get back to your exact bitcoin cool uh so so let's do an overview of how tbtc works
- 1:08
sure yeah so high level um i mean yeah there's a let's see where to start where to start so uh you think people are probably already familiar with different bridge designs uh possibly no so it's good to go yeah so let's just really quickly go through um some bridge designs so you know at the end of the day what you're trying to do um and i'm just gonna draw myself a little blockchain here because i'm probably gonna need it a lot um that at the end of the day what you're trying to do is you're trying to
- 1:42
take this uh one consensus mechanism here um that is a chain note that when people draw the arrows going forward they do not understand linked lists or time um so you have this little block chain here obviously this is not uh not my best drawing and i'll i'll pretty it up a little bit um but what you're trying to do let's say this is bitcoin is you're trying to with some confidence uh take uh take some value from this chain uh so i'm not gonna talk about like more
- 2:13
general um data transfer mechanisms and merge consensus and stuff like that because this uh conversation will get totally out of control and i'm not a pro at it but what you're trying to do is you're trying to take data from this chain which let's say is the btc chain and uh and you're trying to see if this arrow will move there we go and you're trying to uh then bring it to another chain so now i do not want to clear page i
- 2:48
would love to copy though say copy paste beautifully um let me see if i can add an arrow there while i'm at it play with this a little bit you're seeing my unfamiliarity here with the tool so um so the reason that we want to do this is obviously to bring uh in in my particular case bitcoin but really any value that's been locked um on one chain onto another so bitcoin is a little bit different than a chain that you might build from scratch today
- 3:33
if you build a chain from scratch today you know um that there are a few things that you're going to need but if you care about interoperability and i'm just going to use ethereum here for our example since it's where our system runs today um but if you care about interoperability today and you're building a new l1 what you're going to do is you're going to think about how can the state of my chain or a summary of the state of my chain
- 3:55
be provable to people off chain so it's very important that you be able to be able to say whether or not you're running a fully validating node that when someone gives you the latest chain tip that you can have some amount of confidence um and either you know that could be that could be confidence because you are confident in a particular validator set and that they've uh they've signed it that could be confidence uh because of the weight of work
- 4:24
that goes along with that data so a lot of different ways to do it but in the case of bitcoin a lot of the fancy tools that we would typically pull out uh when we're talking about um interoperable blockchain design uh just don't apply um bitcoin will not likely have a soft fork that uh has any focus on interoperability at least for the next two three years um possibly longer maybe forever and uh and that's just kind of something that when you are
- 4:56
trying to do work with bitcoin you have to be really upfront about and so i have a question immediately yeah on bitcoin the blocks are rather infrequent right they they are 10 minutes and the proof of work if i remember right is just double shot right it is yeah now should it not be trivial to have a contract on ethereum that once every 10 minutes someone said means the block verifies double shot that's exactly what we do yeah so so um
- 5:19
so in that direction it's quite easy right so uh so you can use spv proofs and these were like you know the original spv proofs where uh you have a person in the middle and oh man i really should have just like made some people too let me just make some people real quick um so you have a person in the middle and uh who's some off-chain actor and this off-chain actor is able to uh read the state of the bitcoin chain
- 5:46
and they're able to submit that state using an spv proof um to the ethereum chain now ethereum is um i don't want to call it legacy yet right but obviously there's a lot that's wrong with the evm uh that anyone who's uh familiar with kind of like engineering outside of ethereum knows but it can it can verify spv proofs the problem quickly becomes the state that you have to track so um
- 6:15
btc relay i believe which was a very one of the first uh really pegs to a chain like ethereum uh actually tracked all of bitcoin state on ethereum and that launched in 2015 and it had to be paused in 2017 because the expense was just too high so um so there are a number of ways to go after this so if you're looking at a chain uh that's kind of like bitcoin but not quite bitcoin so zcash for example you can use techniques like merkel mountain ranges and uh and just kind of
- 6:48
this fly client idea and basically what you're doing is for each block instead of needing to catch up the chain um on the right to the chain on the left linearly you can use um logarithmic techniques so you can actually like get pretty cheap validation on the ethereum side but again bitcoin is not going to make a change like that anytime soon so um so we're stuck with linear so
- 7:12
originally our approach building tbtc here was to uh use something called a what we're calling a light relay and the idea with the light relay was instead of tracking each head um and instead of constantly tracking the chain tip every 10 minutes instead what you do is you check difficulty retargeting periods so you get this period that is difficult to know in advance it's really hard to know before retargeting happens what the actual value is going to be and and then you have an anchor and it
- 7:47
gives you less security than a full stateful spv but it gives you more security than stateless spb which is spv without using any of the existing chain state so that was the original plan and we got pretty far with it in fact uh we have a full implementation but what we realized and this is 100 james prestwich at suma who came up with this is that you could actually take an idea like btc relay and dehydrate it to the barest minimum possible
- 8:19
rules discarding almost all data around spv proofs and then and then it basically boils down to code on the ethereum chain that's um about fork choice and uh heaviness uh of work and that's it so we really dove in but so uh the way that we keep track of bitcoin state on the ethereum side is uh using this uh this relay so if you're interested you can actually go on mainnet right now currently we are um we are running the
- 8:51
relay as a public good for ethereum users which is funny because it's gone down at least once and um actually the community saw and they stepped in and started running it um so we're working on a group incentivized relay that multiple bitcoin projects can be using on ethereum um but that's kind of your first piece the second question though is how does data from ethereum get back to bitcoin
- 9:18
so um unlike uh ethereum being able to validate spd proofs for bitcoin there are two issues with going the other direction first because ethereum was not designed with interoperability in mind eath hash is a very annoying proof of work it's difficult to summarize um it's and it's difficult to validate from other chains it's much more expensive than it should be and it sort of violates some core design principles that we would follow uh if we were
- 9:50
designing a proof-of-work smart contract chain today um but even more difficult than that is the fact that uh bitcoin has no way to actually verify the proof so um bitcoin's execution environment is uh you know people actually it doesn't even have a name people refer to it as script um but it's not even uh technically a name it's it's a fourth based uh like stack based uh little mini language it's incredibly restrictive and then the data model
- 10:21
is a utxo model and so that leads to some great scalability um opportunities if bitcoin wanted to take them but it also means that you can't make assertions about the entire chain state necessarily the way that you could in something like ethereum so what i'm basically saying is there is no way for ethereum to to prove something uh to bitcoin so this is where um what currently looks like a pretty simple system
- 10:54
it's gets quite a bit less simple let me see if i can successfully move this screen here and here we go okay so uh so now our job uh designing tbtc is to build a system that will allow people to move quote unquote um their bitcoin onto ethereum move it back uh to the bitcoin l1 and be confident that um that they'll always have access to their l1 bitcoin so it's very important to me as a bitcoiner to make sure that um that i that at no point will there be more bitcoin
- 11:32
printed on ethereum so we don't want this to become a full synthetic uh it's very important to me that i can be confident that there's always physical settlement and then lastly it's it's important that i have uh no trusted intermediaries so i don't want to be relying on people's reputation for access to my bitcoin i can already do that with centralized exchanges um i i want to avoid any sort of proof of authority
- 12:02
um and instead rely on things that i can always kind of like get recourse for um so if someone does walk with your bitcoin you're able to hurt them real bad and ideally uh get your money back so all that's actually a really tall order without any soft forks on bitcoin um but i will see if i can draw out the way that we've got this working here it's just i'm just going to go back to boxes and squares
- 12:32
it's too complicated otherwise let's say duplicate okay so the system that we use um and that tbtc is built on we're calling a bonded multi-federated peg let's see if it lets me collect any of these so what that means is if if you follow the history of side chains which why not right like what else you're gonna do on a saturday um then uh then you know that uh this original idea of a side chain is like okay you want you want one chain to have data from
- 13:04
another chain um and ideally those two chains stay synced but what you really care about more even with a lot of these early folks than you care about consensus is you care about what's called a two-way peg and so the idea of a two-way peg is that you can just be confident that when one asset moves from one chain to another it stays locked on chain one and unlocked on chain two and then when you lock it on chain two
- 13:30
it becomes unlocked on chain one that's a subset of uh bigger consensus things we talked about today on smart contract chains um which is convenient because you can use different tools to enforce it than you would if you're trying to do this more generally so what we've done to solve this problem because bitcoin has no uh way to um to actually verify ethereum's uh ethereum state is that we've taken this idea of a federation
- 14:01
and we've said okay clearly we need someone who's custodying bitcoin and i'll choose three here because we've started with pretty small wallet setups uh clearly we need someone who's costing bitcoin the problem it's it's not like we're okay with other people like we like to say not your keys not your coins but it's actually okay for me at least if someone else holds my coins what's not okay is i
- 14:26
i can't get them back right so i don't think it's like inherently wrong um that someone else is holding your coins so so what we've done is is we've got this federation here and i've just chosen a three of three um that i'm about to start doing some doodles on but what this federation does is it actually locks up um cash on the ethereum chain so let's move some of these around here
- 14:57
sure why not that's fine maybe one more circle we're gonna get really artistic excellent um so we call these federations in our particular system a signing group um rather than just a general federation and the reason that we call them that is um instead of acting as federated validators which is typical in a bridge design where you have a few people who come together and they vote on the state of the ethereum chain instead of that what you have them do is
- 15:38
you have them custody of the bitcoin so all of these together have let's see an ecdsa repair you have them custody the bitcoin but then you also have them let's get really fancy lock eth and you have them lock e so that if they do disobey the system um and and the parameters that and rules that have been set aside here you can slash them so what's nice about that is normally if they're holding your bitcoin they could abscond with it and then your only recourse as a user is
- 16:18
you know a judge it's to try to find the jurisdiction that these signers are in and go after them and try to find their identities but in our system um signers are chosen randomly uh many of them have been kyc'd um incidentally but you can buy uh into the system on the free market at any time and uh so it's not really reasonable to try to look these people up and uh send them a nasty gram and try to get your bitcoin back instead uh what you do is uh you can
- 16:48
submit more of these proofs so once you've trusted bitcoin to um to one of these uh federator wallets and they have bonded their eth at any point if they move that eth you can submit a fraud proof so it's just an spv proof we say fraud proofs and i think sometimes people think that that's like a particular type of proof system but it really just means proof of fraud so in this case the proof of fraud is uh
- 17:18
is uh it could be an spb proof but actually you don't even need that all you need is any ecdsa signature that this key pair has uh has generated that has not been authorized already on the ethereum chain so anytime they do that um this same actor can submit that and can actually seize the eth from these guys so that's the core insight that you're going to see in this bridge design is um rather than you know kind of like falling back to um
- 17:50
something that looks a little bit more like liquid where um you really basically have to have trusted parties and rather than falling back on something where where you talk about like implicit staking this is my favorite argument uh that oh these people must have skin in the game because they're involved in the system so why would they possibly be dishonest um you actually fall back to hard currency so in our particular instantiation of
- 18:14
tbtc on ethereum uh what we've done is we require 150 of um anything that oh that didn't work we require 150 bond um from any of these guys who want to act as a signer and so you might ask like why would they act as a signer and of course the answer to that is that they're able to earn fees every time they bridge bitcoin over and then when there's a redemption every time they send bitcoin back so high level these are some of the
- 18:48
components of the system i've gone about this in a different order than i usually do um some others that are really relevant so so now you've got something that looks like a lot of bridge designs in tbtc's specific case we've added this over collateralization factor we've added this ef that's locked up and then what we've also done is every single deposit gets a new federation and that these are chosen from a large group of potential custodians
- 19:20
so the reason that's important is if there's ever an attack where this collateralization is incorrect if there's ever any other system-wide attack that requires you owning many many of these federations fully you can be confident that with a large set of operators large set of signers and a random beacon that that is not going to be possible so that's that's roughly our design for tbtc uh it really doesn't look complete now that i'm looking at this whiteboard but uh
- 19:51
would love to answer questions and go into detail yes so so couple questions is uh the first one is um so let me first make sure that i understand correctly right so let's say there's 100 of those so so i on ethereum in a trustless manner can go there and say you know what guys i want to be a tbt serial layer right yeah and i just put some if right yeah and then so i put if before people send me bitcoin right correct yeah otherwise
- 20:23
yeah right so so my if that is put in there it just allows people to send up to some limit of bitcoin right that's right i see so what happens is if at some point i did have um 100 uh collateral yeah but i don't anymore because of the fluctuations yeah yeah so um there are a lot of different ways to handle this um in our particular again first instantiation on ethereum what we've done is we've said um okay if this drops to 135 percent
- 20:54
collateral then there's a courtesy call if it drops to i want to say it's 120 then there is liquidation so what happens with liquidation is that these bonds are put up for auction and the idea is that the deposits closed so like i said earlier a goal of mine is not to have synthetic bitcoin it's that you actually want bitcoin backed uh tokens and so what happens in this case is the job of the system is to preserve the supply pack so what you do to preserve the supply peg is
- 21:25
first you give your signers a heads up hey guys this is going to happen if you don't respond soon if they don't respond soon you put their collateral up for a falling price auction and you put that collateral up against tbtc so you say okay i have what could be anywhere between 100 and 150 of each uh of that tbtc collateral so you start the price at 150 and then it just drops lower and lower and lower block after block eventually someone fills it um and the
- 21:59
tbtc that fills that auction is burned um and then the signers are left with the bitcoin and they can sort of sort it out on their own so at that point uh they have uh there are a lot of different ways to look at this there's a financial angle and there's just the mechanical angle but mechanically they can all chat and recover their bitcoin and uh and now they're stuck with bitcoin um
- 22:22
and anyone who wanted access to that bitcoin has now instead been told uh no this bitcoin's been removed from the system and the tbtc that it backs has been burned right uh and so but at 135 if they don't want that to happen they just they just add more if they just close it yeah so if you if you look at how if you think about this like a margin account if you think about a margin account where you have many many people
- 22:45
who are like equally responsible for it no one's gonna top up right so what you do instead is you just say okay guys any of you can take this now you'll get a slightly better price than your peers if you close this out and remove your collateral but top-ups yeah the coordination game's too hard oh so so they will remove their collateral and they just put some tbtc that's exactly right yeah so they
- 23:08
basically they basically confront run the liquidation and say no no no i'll just close this deposit here's the tbtc back right um or they can redeem so so let's say there's 100 tbtc and there's five of them right yeah do i need to put hundred tbts or do i put 20 tbtc and just you know remove my share oh no no you're taking the whole thing okay so i have to close it entirely makes sense yeah cool yeah so definitely it like it really um benefits uh folks who are running this
- 23:38
bridge to have inventory in both assets you can't just hold eth and run this bridge um you're going to need to hold tbtc just as an operational matter now that said we've been up for four or five weeks so far it's not very long um but we have not had a single deposit go below i think 142 collateral and the reason is that ethan btc are so tightly correlated um so i think most people that i would talk to today would probably say that
- 24:12
eth has more upside uh potential lately um i'm i'm a i'm a bitcoin bull and i don't always necessarily hold a lot of eth but you know you're just looking at like historically so um because the two are correlated you can be fairly confident now obviously in an ideal world maybe you're using multiple kinds of collateral here but i think what we kind of decided is we're not maker and we don't want our
- 24:36
job to be this kind of like collateral and risk assessment constantly so as we improve this design on future chains the plan is to maybe allow a couple of their classes of of collateral so potentially you can imagine staking derivatives and anything that yields cash flow as being useful but then otherwise just choosing something that's fairly highly correlated right uh then the second question is uh well obvious
- 25:08
question is how large is the committee right so if i'm moving my tb you see how many people are chosen from the it's tiny only three only three so the reason that we do that is uh is for forward compatibility for something much bigger and grander that we're that we're trying to ship so um right now instead of using bitcoin's multi-sig we're using threshold ecdsa threshold bcdsa is really freaking cool
- 25:34
um we can we can talk a lot about this particular mpc application um but uh at the time of building tbtc actually and actually until today this is still true it's going to stop being true next month but um there was not a way to properly attribute malice in these setups and so if you let's say for example we had a two of three you're ensuring that two could always steal from uh the third yes yeah that was my next question yeah exactly exactly so what we did um to solve this problem
- 26:06
economically is we decided to start with n of n and then you say okay well it's n of n you don't have liveness so drop the wallets as small as possible and have as many wallets as possible so you have robust liveness across the system though particular deposits liveness might not be as good um for the next version the plan is uh we're working with an outside team that will shortly be uh
- 26:29
delivering an attributable ecbsa scheme um which i'm really really stoked about and that's going to allow us to explode these committees so think 50 to 100 and think um n over two thresholds so then it's just going to look much more robust right so so now let's say that the threshold is actually n over two right yeah sure uh but the collateral is only one hundred fifty percent that's exactly and if only you smash half of them you only cover seventy five percent of the that's exactly right that's exactly
- 27:00
right so right here we have done uh this is i'm not gonna call it the most naive because it's not but this is like a really straightforward clear over collateralization situation now if you look at let's zoom out here for a second and see if i can properly do this so if you start um actually looking at the real world here keep hitting ctrl c thinking it's going to uh copy and it doesn't you know what actually happens is today on mainnet we have
- 27:34
a 140 stakers we're targeting 500 by the end of the year so very quickly you know this starts getting larger and then each time you sample from them as long as you have a fairly decent um beacon each time you sample from them you have some strength of collusion resistance right so the idea is that eventually you hope that you can lower this 150 effectively and if there are issues past that 150 percent that you can socialize
- 28:07
um or this is the alternative design or you can you can basically treat um people's membership in this group is having value so what we've done on ethereum is we have a work token called keep and for you to actually stake in the system you have to buy this work token and you have to put it at risk to even be chosen in the first place so suddenly you have this work token that looks a lot like a taxi medallion that can be leveraged across multiple deposits so if you balance things right and if
- 28:39
you use your beacon properly and you don't let people basically be in many many shared setups with the same group of people you can actually have a piece of collateral that can be leveraged across multiple uh wallets so that lets you start to play and get this number lower so you don't suddenly have to do 300 um collateral to get in over to safety ultimately though like what we're going to be doing is finding all these numbers in production right so we'll start high and
- 29:10
then we'll slowly slowly through governance inch them down and figure out what is the value of capital efficiency and is there an honesty assumption here at all um this this initial tbtc design assumes 100 malice from all players um which is you know way beyond uh what most literature outside of the cryptocurrency space uh considers and in v2 will start to um will start to relax its assumptions
- 29:41
cool okay uh now another question well one simple question is what is the random beacon today is it just the hash of the block oh how hell no man i spent i've spent an incredible amount of time on this so the random beacon today is um a bls threshold based on dfinity's original work in 2017 that's been anchored onto the ethereum chain um and so what that does is it means that uh on the one hand it's anchored to the ethereum chain for better or worse so there are some things that we can't
- 30:13
use this for it's not suitable for a consensus mechanism period um any anything that people want to build where they say well the beacon is the first piece that you're seeing in new chain designs this is not the beacon for that instead though what this beacon gives you it gives you resistance to minor attacks and to long-range attacks so because uh and and i could almost start a whole new diagram but i'll spare you um who is participating so all of these same signers
- 30:43
so all of these same yeah exactly so all of these stakers also participate in a random beacon and our particular bls based random beacon it's a 64-member group with uh i believe it's a 31-member honesty threshold um and then the way that it works is uh what you're really looking for is because it's bls based people can't give you malicious answers because the ethereum chain can validate
- 31:08
that the signature is correct instead you're fighting aborts and so in the case of our chain let's see the men's stake right now is 80k keep 60 cents 32 so we're talking so in the meantime what is the curve uh on which you're doing it is it no it's all it's all bn256 it's terrible right um the ethereum curve that no one like so we have it it is not live but we have the same randomness beacon and we and we're using uh restretta yeah
- 31:42
because because technically you don't really need anything from bls so you're really only using pairing when you validate the uh the the output of the randomness beacon but instead of letting around output of the randomness become you can verify each uh each reveal from every participant for which you do not need you can use just schnorr oh yeah sure my cryptography is very rusty right but yeah but you can validate each of the of
- 32:05
their reveals and you can uh re-interpolate the polynomial and confirm that you know the the point is zero is what you expect right so yeah this is the only place where you use pairings uh and then if you use threat well well technically tayden doesn't have restrictors it doesn't help much but yeah yeah so so i was gonna say like obviously we're super restricted by the evm right now and um i've already we've already pushed for a couple eips
- 32:28
we got a pre pre-compile in for blake 2b for example for zcash interop but um the like greater curve work that ethereum needs done is just like i'm it'll happen eventually but uh we would be years behind schedule if we'd waited on it so but but also if i hear correctly what you're saying you're saying that right now on ethereum you have a randomness become correct that's huge oh that's that's
- 32:51
great that's on the team yeah it's expensive but yeah it works you can do it uh ev every every tbtc deposit uses it right now but but another question so so let's say you have 200 uh let's say you have 200 of those participants right and you sample let's say five of them yep right if you only have like one or two bits of influence that doesn't really allow you to uh to sample the committee that that is bad right like if you control 50 of them so so why not use block hash as a as a randomness
- 33:22
oh yeah that's a good question so there are a couple yeah let me see if i can unpack this so first i'll be frank we built the beacon for much greater things yeah yeah so so we had already built this beacon that uh like a committee this small does not need this beacon um but when we start getting to large samples and larger number of stakers i think it's going to be quite relevant
- 33:48
um and then the other thing that we've had to do this is an implementation detail but it's an important one is just getting to the beacon there's actually a lot you have to do after that so on ethereum a gas efficient sortition pool implementation is not trivial so i'm happy to say that we've shipped that as well so what we actually have is the ability to sample from a list that's thousands and that well i mean obviously it's not
- 34:12
actually a list but a collection that's thousands and thousands of members long and that's weighted um arbitrarily and so that's really what we brought to the chain so while we're initially using it for these small committees um the idea is that we'll start using it for 50 to 100 plus deposits we'll also right now we're set so that these deposits are using fixed sizes so one btc 5 btc 10 btc and we've done that um because there are we have uh aims to build privacy
- 34:43
solutions on top of bitcoin and ethereum and you need fixed note sizes for good privacy solutions but in the future when we're doing these larger committees we will be removing those balance and so suddenly it's really important that you're confident in the group that you've chosen right cool so okay so so let's let's shift gears a little bit and yeah sure i have a couple of questions in in a completely different space so please ah so so i'm here i'm on bitcoin right
- 35:13
and i have my my one btc i want to move it to the to ethereum yep right so so what is the order here right i need to i need to know who to send it to right yeah bigger ethereum smart contract to get my committee yes yeah so so this is not the smoothest uh ux minting process right now but the way that it works today is uh when you say look i i have one bitcoin i want to deposit one bitcoin uh you send a single transaction to ethereum um
- 35:43
and then that emits an event where off chain these guys are able to figure out who should be in the committee um they all come back online uh they submit an ecdsa pub key and then you see that uh and you know that these guys are already bonded uh because that was a precondition for them being chosen in the first place once that happens you can send your bitcoin to that address um and then wait six confirmations and submit your spv
- 36:12
proof when you do that um you're originally given an nft and what's cool this is like such a low level detail most people don't care but it's really cool for like tax nerds and bitcoin nerds is um that nft actually represents your deposited utxo so if you have a reason to get back to that same utxo you can hold on to that nft for up to six months and maintain access um if you don't and
- 36:37
you just want to like you know go farm on d5 or whatever you can then turn that into what we call the vending machine and it just holds all the utxos and mints new tbtc on ethereum and then you can walk with your fungible token so it takes a few steps i think if you skip approvals it maybe takes three transactions uh which is not ideal ideally we would have someone that was already over
- 37:01
bonded and that could accept larger lot sizes so that's on the docket cool uh so so the next thing is so you're saying i can i can hold to this uh utxo for six months right yep so as a participant in the uh in the network of people who you know who put collateral and participate right yeah so what happens if three months in i realized that i cannot be participating anymore so i need to exit right but there's a lot of there's a lot of uh of tbtc that
- 37:31
i happen to have you know i'm part of their multisigs right so i cannot just walk away ah yeah oh no so um so if you are a signer uh you're stuck for up to six months in that position and so um now luckily most people meant fungible tbtc like they want the erc20 and so what you can do is you can just go through and you can use the same piece of collateral to close close close close close and just kind of like zipper and which is great but in the case where someone
- 38:03
is obstinate and they really want to hold on to their particular utxo that means you need to keep participating or your collateral's at risk and maybe for some people that's okay um not not for me i'm pretty cost conscious but you know for some folks if you really had to exit quickly but so so let's say all of the key btcs uh went to the vending machine sorry all of the nfts went to the vending machine
- 38:27
right so so none of them is blocking me so for me to exit i will just have to close every single uh that's right every single committee so i will have yeah so you just get some tbtc and you can just go down the vending machine and close both clothes that's right okay and we've already seen that um so this sounds kind of abstract but this is actually something you can see on mainnet happening today so the way that we've incentivized early bridge operation
- 38:50
is um for the first interval we've said for every for every deposit that is opened on your operator and that is then closed on your operator you get one point and at the end all the points are added up and that's how rewards are distributed and these are in addition to signing fees that people already get and of course what that incentivizes right is people to open close open close up and close and so um so we just saw this like
- 39:14
master class and uh kind of like incentives happen where we were giving away a bunch of tokens uh for people to do this and that was exactly what you saw where we had uh we currently have a thousand btc cap we're doing a guarded release and it's slowly growing um but every time the cap goes up the supply starts to increase and then the stakers start decreasing it and the supply increases and the
- 39:39
stickers decrease it so we've actually got a velocity of something like 7x um where bitcoin goes into the system and goes out very very quickly because these uh because these stakers want to get it off the books and make sure they get their rewards so it's just been incredibly interesting to actually watch all of them closing their own deposits and getting their hands dirty obviously long term we'll be changing that incentive mechanism that's not perfect but
- 40:04
uh and so now let's say someone wants to exit right so so i have my tbtc and i want to get actual bitcoin right so i go to ethereum uh do i need to convert it to nft first or do i just say you can do it in one call so you can just say give me a random nft that's the size and uh and then pay to this address but what if there's no energy of this size oh so you do have to choose something that's of a particular lot size
- 40:27
so that is uh that is a key part of the system as it works today and even even if we remove lot sizes um the way that the system works is that each committee has a single amount of bitcoin that they're custodying and you need to choose from those amounts to exit when you start allowing partial exits from a particular bitcoin utxo the complexity of managing bitcoin transaction fees and
- 40:51
and change and wallets is is very high it's very simple when you're running a centralized service but it's very high um on the evm i think if i did this from scratch with a chain that like didn't have so many restrictions we might we might go for it and so so okay so i'm exiting right i chose let's say i chose myself a lot right so i went there i said give me this nft so now i have this nft uh i want that
- 41:15
energy to become a bitcoin on my account right so so transaction needs to happen yeah so so is it the case the transaction is just constructed on ethereum uh and the the committee signs it and then it's up to me to submit it you submit the transaction so what happens is you say um uh nodes here's the transaction i'm going to prove that this is what i want you to sign on ethereum uh then the notes get it and at that
- 41:37
point they have six hours if they do not physically deliver um not only that transaction signed but also in a block importantly um then uh you can seize their collateral why is it their responsibility for it to get into a block that's just that's just the way that we've decided to do this so we've tried to offload almost all of the complexity of the system onto the stakers so you could certainly say like you know
- 42:06
um the okay here's a transaction and now you need to get it in uh and give that to your user but very quickly what you run into is okay who's paying when the transaction fees need to go up at what point uh are these guys not delivering can you prove that they're not delivering um it becomes quite uh quite hairy and so what we found for this first version that was a little bit better was the user and actually they do this most of the time can optimistically kindly altruistically
- 42:35
um deliver the proof uh that the transaction's been submitted um but ultimately it falls to uh the nodes to actually do it so so who chooses the fee exactly the user chooses the fee but what if i chose the fee which is too low for the transaction to get into that we have a transaction fee bumping algorithm where uh basically the timeout slowly gets increased if things aren't arriving in a block
- 42:59
and you can continue doubling the fee until it makes it in but it's not the user's expense so if the user decides i'm going to withdraw a whole bunch of bitcoin in the middle of a bitcoin fee event they should be the ones who pay the signers don't control when the user decides to withdraw right what what does it increase the six-hour timeout uh so each fee bump increases the timeout yeah i see make sense okay so if
- 43:25
it didn't get into the block in this after six hours they don't get slashed immediately at first the fee will get bumped that's right but at this rate at which point do they get slashed yeah so they don't get slashed until the user says i haven't gotten my bitcoin uh and so at the end of that six hours if no one has said we need a fee bump and the user has not gotten their bitcoin and there are no proofs then the user can say okay i guess i just need your collateral
- 43:49
i see i see but well well maybe i don't understand the whole state mission but but seems like sure uh so so the way the way i hear it right is that uh so so request is submitted right and user says i want to pay zero fee right yes yeah i said the lowest impossible and and right now fee is huge right so yeah so signers sign it right and there's some time out before they can propose to bump it that's right so
- 44:21
so they will bump it okay so in fact the idea is that once the key becomes reasonable the transaction will make it in no matter what right so and if they didn't sign it if they didn't sign it i guess it's treated differently and they will get slashed right exactly yeah yeah that's yeah so it's like there are some simplifications i think on both of these sides so the mint and the burn where like in retrospect we're like you know
- 44:44
what are we seeing we're seeing people under fund and over fund we're seeing you know just varieties of little like difficult cases where it's like should that be me or should that be the sticker but so far it's worked well um and yeah i mean i'm excited to i think what we're gonna do is keep tweaking like every new instance of tbtc on new chains we're just going to tweak the design a little bit and get closer to what we think is
- 45:07
ideal awesome cool is there anything we didn't cover whoo um i mean that was a pretty good amount i guess a couple things that are kind of cool and that maybe aren't obvious one of them is if you take all of those nfts and you put them in and you put them in something like tornado cache you now have the most robust mixer that bitcoiners have ever seen very very quickly because you've already got fixed slot sizes and everything else that you
- 45:38
need um fixed node sizes that you need for privacy um so i think that's one that's interesting another is that um if you really care about your taxes and you want to avoid disposal of bitcoin you need to use a system like this for this to not look like a cell so i'm not an accountant and i'm definitely not a lawyer definitely not yours but um that's that's a pretty key design that we found when we're dealing with
- 46:02
bigger depositors is they're like look i'm not sure of the treatment here i don't want this to trigger capital gains every time i go over this bridge and so it's been important to give them an opportunity to actually have an nft that they can then use on collateral as collateral on the side chain but yeah i think that's that's the big stuff right there cool okay that was very exciting uh thanks a lot for sharing yeah of course and let's see let's see
- 46:27
how it evolves great thanks thanks