{"id":"M3SoQfbqd5I","title":"Whiteboard Series with NEAR Protocol | Ep: 48 Tarun Chitra founder of Gauntlet Network","description":"This Whiteboard Series episode dives into MEV (maximal extractable value). NEAR Co-Founder Illia Polosukhin (twitter.com/ilblackdragon) talks to Tarun Chitra (twitter.com/tarunchitra), founder & CEO of Gauntlet Network (gauntlet.network). Gauntlet is a financial modeling platform focused on risk management for decentralized finance.\n\nIllia and Tarun unpack MEV––a term describing the maximum value that can be extracted from block production in excess of the standard block reward and gas fees by including, excluding, and changing the order of transactions in a block. The video breaks down how MEV works on PoS Ethereum, where validators are now responsible for transaction ordering/inclusion, and how the MEV environment is evolving across chains today. They also explore where NEAR’s unique protocol design differs from other blockchains and the opportunities this offers to NEAR developers and traders. \n\n~~~~~\n\nFor the latest from Gauntlet, check out:\n\nWebsite: https://gauntlet.network \nTwitter:   / gauntletnetwork   \nBlog:   / gauntlet   \nResearch: https://gauntlet.network/research/ \n\n~~~~~\n\nJoin NEAR's community:\nWebsite: https://near.org/\nReddit:   / nearprotocol  \nDiscord: https://near.chat/\nMedium:   / nearprotocol  \nBlog: https://near.org/blog/\nTwitter:   / nearprotocol  \nGitHub: https://github.com/near  https://github.com/nearprotocol\nDev Docs: https://docs.near.org/\nCreate a wallet: https://wallet.near.org/create\nApps on NEAR: https://awesomenear.com/\nLearn to Build On NEAR: https://www.near.university/\nGrants & Funding: https://near.org/grants/\n#Blockchain #FutureisNEAR #NEAR #nearprotocol\n#nft #dao","channel_name":"NEAR Protocol","published_at":"2022-10-07T00:00:00.000Z","thumbnail_url":"https://img.youtube.com/vi/M3SoQfbqd5I/hqdefault.jpg","transcript_text":"hello everyone uh Amelia coming back with whiteboard series here from New York I have tarun from Gun Hill Network and we're gonna go in to the Mev yeah so I think if you followed crypto Twitter at all nowadays you know there's a lot of fighting over what qualifies as Mev um but first of all let's write out what the acronym is the acronym has changed it actually stands for maximal extractable Value not because no more miners right because a few weeks ago yeah exactly so this uh this this is what we're talking about and so you know what you know the problem is one hard to Define two it has the um the quality of porn which is you know it when you see it this is from a famous Supreme Court case where that was a definition nice um but you know you know it when you see it unique to blockchains because in tradify you don't really see it you you see your version of it but the exchange doesn't tell you really what everyone else is doing yeah so it's hard to see if if someone is extracting something from you but yeah it's like porn because you literally go on block Explorer yes but but you have like Robin Hood for example which was kind of doing that right like you send all your trades and they would match them and kind of do it but you don't actually see how much money they made out of this exactly you don't really see how much Citadel made out or or jump or whoever made out of it right so the interesting thing is that here in blockchains you kind of there's this porn aspect of it in that you can go run the transaction and see how much it should have cost or taken and you can go around the you can go look at what happened actually happened and you see a difference so clearly there's there's there's some sense in which uh uh difference between expected cost and realized cost so you know this is I send five tokens I'm supposed to get five dollars but I get 450. but then you also said you're fine with this when you were sending here otherwise this would have failed correct correct correct correct but the thing is in a lot of applications right an application will guarantee you something you know it'll say like spend five dollars on Robinhood and you'll get five shares and then if you you say yes and then you see that you got four 4.5 shares will be tests yeah so this is the you know it when you see it aspect right now there's this big question of like is everything Mev so um you know I think the The Flash buff people who who do Mev auctions on ethereum they may I think they take a lot of Liberty with saying even like our Dex arbitrages is Mev but in some ways it's not really it it's it is just intrinsic to the system that there's some uncertainty over a block and whoever gets uh kind of to to pick what the block ordering is kind of has some power over the users um so instead I think the a sort of more kind of economic way of defining Mev is sort of we have a sequence of transactions that are sort of sitting in the mempool we have a sort of value function which takes in a ordered sequence of transactions you want to find such permutation and you you want to say like what's the max permutation so this is the permutation that's probably going to be the most formulas in whiteboard series those those far right or sorry rather you should say this is the max value m this is the expected value e expected value permutation so but here's here's a question for you yeah why why don't blog producers by protocol not forced to just randomize this order yeah great question um one reason is that they cannot come to consensus on the actual transactions they have so for instance if we have a network of validators I'll just draw them as you know this network graph these are the validators and then there's the network of users actually you mind if I use the other things so we'll make the red as validators blue is users and so you know the user is sitting all over the internet and they submit transactions and as you can see they submit them to different validators maybe they submit them twice just to get make sure their transaction gets in and the problem is coming to consensus on the set of transactions you have so on the the set yeah tx1 a adds a bunch of latency but B if if you know you basically have to ensure that people are not dropping some of these transactions um but also you basically have to do what's sort of like a ranked vote so if let's say let's say even if we agree that these are the transactions the set of transactions the ones we're going to include then we have to say okay well I saw I got this transaction first and I got this transaction last but the problem is there's no way that everyone gets the same ordering sure yeah right and uh effectively people have to vote on what the ordering is they could vote on the randomness so they could vote on like but the thing is that the randomness only chooses the permutation the the way each person is storing the set is actually up to them no but I mean you can say like publish a set first get your consensus and then through that also vote on the randomness like for example the randomness is Source from uh DLS signature on the Block sure then the execution happens already so we need to agree in advance on something what what the set is and like what like lexicographic ordering is like what alphabetical ordering is so that sure and then we draw this random permutation right yeah uh a higher latency B you still have the set problem of like how do you guarantee that people are including uh what they say because like well people well you mean that like this is where the like tips and transaction fees are coming from you actually like get included yeah exactly so as soon as you do that you kind of violating the and B that there isn't some side Channel agreement where a minor is accelerating certain transactions versus others right which is what flashbots effectively you know does like if there's an auction you pay them if you win the auction you get to go ahead of everyone so a it's bad B increases latency C sort of like increases communication that the validators have to do makes them more susceptible to get ddosed there's like lots of sort of things that make it harder so instead you know one you know the way things work on ethereum right now is there's effectively a centralized coordinator called flashbots and um let's say I'm a I'm a strategic user so I'm going to call the Strategic users like gonna give it a face with some glasses uh and the Strategic users like hey flashbots here's my transaction and I want it to be first and I'm willing to pay five dollars more than than what the transaction costs and let's say that wins then flashbots broadcast this transaction do all those all the validators and who subscribe to it and they effectively agree like a cartel to execute the transaction such that that occurs and they only get the payment if like the the things this thing passes yeah um and so you might say hey I'm getting robbed here because this guy's putting his transaction first so that when I put in the five tokens I only get 450 because he put in his two tokens before and took out my 50 cents um not great but arguably it is more efficient in the sense that people who are strategic who if if this wasn't there they would try to spam the validators with many many transactions and you would actually get worse performance in other words yeah right so there's this trade-off between the economics of incentivizing the Strategic users to to pay more versus the spam on the network and that's sort of this intrinsic trade-off in Mev you know there's people who spend their lives trying to make these things called Fair ordering protocols that do really complicated like you've kind of the things we talked about like everyone keeps voting on the sets of transactions first then they vote on sort of the randomness and then they execute so far none of them have worked without either some amount of centralization they have sort of some fallback mechanism um or they just take forever take forever yeah right so so some consensus algorithms the bigger the big problem is no one has actually proven any formal results about this that say something like hey there's always this trade-off of like you either get the highest information process through your blockchain or you have to slow it down to like guarantee some sort of fairness and there's sort of some well raid off there's a laden super difference like everything is about latency it's sort of latency personality or for um sort of cost and sort of fairness measured in some notion of like how how much you're respecting like the the intent of the user because like one way of thinking about it is we have blockchain block one block two block three the user sees the state of block three and it sees that it's like five dollars for shit coin right and they're like oh I want to buy five dollar shit coin and so I'm like yeah I'm gonna send my transaction here take my money for five hundred dollars but then you know of course somebody comes in and somebody comes in and they they they instead of getting 100 shit coins they only get 90. and so um you know the the idea here is that fairness would say hey actually if there's 10 people trying to get the 500 thing instead of having one person get it 100 another person get 95 another person get 90 split it evenly that's the fairness access the latency access is like how fast is my transaction process yeah just aggregate all transactions wait for a while exactly everybody chill and then settle and fairly exactly and cost is cost is a little bit complicated actually so um one thing that's interesting is like suppose we have two exchanges so we have one exchange that shows five dollar shit coin and the other exchange that shows 450 shit coin what's the real price well depends on the much you're buying and the exactly the pools exactly how much liquidity there is what you're buying it's possible that the five dollar ship coin is horrible for you because there's no liquidity and you push the price to ten dollars or it's possible that the 450 is actually worse and so what is the natural incentive for people to do is to synchronize these because technically they have the same assets so you know Buy Low sell High so in some sense your cost goes down by allowing people who are doing Arbitrage to go in front of you because they're actually ensuring that the prices are sort of synchronized and so it's as close to five dollars as when you saw as possible and so that's sort of there's some sort of like surface in this 3D I'm about at drawing 3D things there's some sort of trainoff surface between fairness latency and costs and there's this idea that like hey if I maximize Fair the the people who believe in Fair ordering they think that if you maximize fairness you're not trading off these other two but I think that like one of the big thing unsolved sort of mysteries is proving that you can never have all three of these I think I mean the question is also because for example you build a blockchain where there is the swap is uh core part of protocol and you can have like you aggregate also transactions and then you execute swaps at the end of the block right like you can have a more like the the transaction ordering for example does not matter in a block at all yes so there are things like penumbra which is a ZK blockchain where they take all your transactions and they do a batch auction yeah the batch auction gives everyone the same price so it maximizes the fairness side but everyone actually only sends encrypted transactions so liquidity providers have to play this game or before the block they have to get they have to basically submit how much of their liquidity they want to keep for that block and then the order flow gets executed privately against that so in that that's another example of someone going way on the fairness axis and but their latency access is also quite low they're like they're like they're high fairness low latency but high cost because the batch auction worst case is high cost right but but let's say you don't do it private you do it in public you say we aggregate all transactions and instead of executing them in order we we bad shows a holds the orders but now your consensus rule has to interact with an application for the order but then let's say we build a you know the fair low latency low-cost swap chain right but my point is you can't drive all of them to zero or like maybe there's some sort of like limit to how well you can do without making your consensus suddenly well I think I think that what will happen in this case is that the cost is lower on ethereum for example because there's so much more lots of stuff yeah like yeah and so as soon as you start optimizing just for swaps a specific chain you lose all the other functionality and now actually your cost will be higher because you don't have like flash like correct flash loans and stuff like this to like actually or you don't have um routing where you have many dexes and I can you know I want to trade a to d but I can I can split my trade into yeah and actually this gets to a paradox and a paper we wrote recently that's actually pretty easy to explain that you can explain mainly without math by just some pictures explaining something without math what you know I I do I do my best um so this is a sort of paradox and from you know basically in this paper we found this Paradox that the inverse of this Paradox that exists in sort of traffic modeling like when you're designing cities or designing roads between cities uh for amm so the way it works is imagine we have four tokens um unfortunately there's not I don't know shit in other languages otherwise I would name them each a different form of shit um but uh the we'll start start with the traffic version of this so we have four cities on each Edge so you want to go from a to d so you know a b d e c d on each Edge is uh what What's known as sort of uh the latency so let's say there's a hundred cars that need to travel this if the the latency says X then and 50 of the cars take this route then the time it takes is one half and if it says one it's it's like uh infinite it's like a really large Highway it'll just take everyone the same amount of time always and so we have this thing where we have you know kind of this really large Highway really narrow road really narrow road really a large Highway okay so you know if you look at the equilibrium of this imagine everyone was like Hey like what's the fastest route to take well they would see okay well my you know it takes me the same amount on each route and you would expect traffic to sort of 50 50 right so you get 50 50 this way and 50 this way okay now imagine counter-intuitively that you add a road here that has latency zero just imagine there's teleportation anyways right and so actually by the way when they're split 50 50 the the time it takes you is one half plus one which is three halves right because half goes here so one half and then takes one okay now here if everyone is selfishly optimizing the fastest path is actually this path yeah because if they if they if they took any of the other paths it could be higher right but here it's actually technically you know x and x whereas this is always two and X is less than two so it's so basically what happens is but the but then you get this weird paradoxical thing if everyone takes this route then there the time it takes them even though I added another road there should be more throughput in the network the network should be more efficient takes them longer because like everyone took this road never took this so it takes time too yeah right so that's bad however you know what happens if I at now let's suppose I add a 0.1 yeah a little Epsilon times x it's not that's the only symbol you're getting so now as you make this like cost congestion cost go up then you'll see that people will revert to Distributing 50 50 and like how much does congestion costs controls like how how people distribute themselves I'm sorry amms are the same way if I have four tokens um and you know I have these edges that can be built it turns out that these people doing this Mev there's a thing called sandwich attacks which we can explain I don't know if that's worth explaining I don't know we can we can yeah it's it's sort of this idea that I put in five dollar five tokens I'm supposed to get five dollars back at 450. and and the way it works is basically any trade you you put in you say okay I'm putting in five tokens but I don't want to move the price more than ten percent and I say the percentage but let's suppose someone whose strategic notices that actually if they put me first in the block I'll only move the price five percent then they add another transaction so this is say attack they call it a sandwich attack it's not really I I find it hard to call these things attacks they're they're sort of like it's a sandwich trade it's like you're a bad dumb user like you should have been bidding in the auction for the same spot but like you're willing you know that that's what you get for being unsophisticated um and just saying order books are better I'm not I'm not Anatoly so right so this guy adds in a trade that pushes the the cost at five percent we put in my trade which pushes the cost up five percent and then the attacker sells the trade sells back uh so attack ourselves back their their amount that they put in and so this sequence of Trades can be profitable um so they they pushed the price up in front of me I get a worse price I get less tokens out and then they sell right after me and as long as they can guarantee these are executed in that order they can take advantage of me now the interesting thing about this example is the sandwich attacker is adding this congestion Epsilon yes in some sense and what actually is kind of a very non-intuitive thing is that without the sandwich attacker there's some scenarios where based on the different relative liquidities of this where actually you have a worse cost for executing end trades over this network than you do if you have the sandwicher so the sandwich are actually they cause congestion but they kind of in the in in the same way they make people's routing go back more optimal so there's this trade-off between like yes the users who take that edge are getting sandwich getting a worse price but the overall flow across the network can be better and there's a trade-off be congestion and routing costs so but but usually this kind of trade is is uh a taunt Atomic and so like even if it is like if it sounds like let's say my trade is you know A to B to D plus a to c to D in one transaction yeah and so you're saying that like they've done this on like b a b and on AC for example yeah and then sold it that's still in some cases that it's not always true yeah it's just that there are examples where if this thing is actually sort of low liquidity but these are higher than you and there's some ratio between how much liquidity is here you you can basically get the scenario where the sandwich actually helps avoid people taking the low liquidity path because the sandwiches profit is highest on the low liquidity path so people's routing changes around I see I see but this is like presumably when when somebody does doing the search they should probably try to predict how much they're going to be I mean instructors someone's doing the search if they were if there were a way to do this in ethereum you can't do this but I think if in anything where you have multi-transaction flash loans yeah you could actually just flash borrow B and C add liquidity here and then actually make the path cheaper but you'd have to do inject the flashlight inside the atomic thing it would be annoying so you have to do this multi-transaction Mev of like flash loan execute trades unflash loan right and it's hard to compress those atomically but if you could do that well if you had resources for example that are multi-blocks with some guarantee yeah then you then you could actually just never have any of these types of problems and just assuming there's like a flash loan of old place capability yeah yeah this is actually something we we wanted to do because our stuff is always multi-block anyway right and so we've been thinking how to have like pretty much resources or walls where you actually walk me through how the design of the how that how how do you guarantee kind of atomicity we don't over these each each contract is almost its own chain or its own roll up or its own sub chain or its own power chain or its own like we'll name it even within the chain what I'm saying is but wasn't it well that's the point we don't have like each con so let's say you have um like uni swap so on near uni swap has all the pairs in one contract okay and so then what's called refinance and so then all the trades are just linearized around that but if you want to do anything else like for example actually send tokens to the user that is done in the next block so the token itself like you know usdt dot near or whatever it's called is did like you actually send you deposit money in one block then you do a trade and then you withdraw you know I mean in a way but you can't do that all in the same block no okay because the each cross country call happens in the uh the cross contract column is the token.transfer call yeah for usd2 yeah exactly yeah so it's all based on callbacks you're always calling the uh like it's almost it's message passing am I guaranteed my callback doesn't revert like what happens on reversion uh you get a call back you get a cup but then you have to wait another block right for that callback to have the exception does the exception ever take more than a block no space you can guarantee you guarantee that well they have gas limits so I mean you can write some code that will run out of the yes yeah but yeah so you kind of need to guarantees uh like if someone can't make an exception that throws an exception call back and like has this chain of like if they wanted to grief you because you're paying the gas for that uh well it says the user Pace like the whole transaction is paid by the user right right the user would but the user could trigger this chain of exceptions that it keeps calling back in no no there's a limit for one time there's a fold the whole thing transactions okay yeah yeah so how would you do flash loans in near you don't okay so I mean you would have a uni swap having a flashlight capacity or this is what we're thinking to have volts so volt would be something that travels like that's on the runtime level and it travels between contracts and it can and it has guarantee similar callback guarantees pretty much as uh so you would like program a vault like you say it's either settles in this way or gets returned right and so you package whatever resources you want in the world and if it gets returned it has a per do you have like a per block gas spend on The Vault like as it goes through each yeah you pretty much will like program but like you pretty much vote will be like a piece of programmable data that travels around right so right now data travels around without like with with just a global but like what if you actually can program it so that it can execute so so actually maybe this is this is a good analysis question so like if we were to do a sandwich attack on near how what's the number of what's like if I drew like you know block height h block height a plus one Blockhead h plus two well so right now I mean depends on how like so can I like batch the transfers like yeah you can deposit everything trade everything and then withdraw everything because like say the attacker first does their trade they say transfer a to the unisoft contract this one says transfer B the users yeah so you can do that in one block you can do that in one block yeah okay so but like an attacker would just already have all the all the deposits on on the contract because you can have your internal balance on this contract you don't need to oh I see I see I see so what would have just already transferred yeah it just put all the money in and then and then just when you see somebody executing you just try to execute around them you execute in the same block then yeah yeah that's linearized okay okay yeah so within this you can have many many like call executions pretty much happening within one block um are those that but I forced some serialization around them right yes and so this is and this is where the fun starts so so each contract is its own quote-unquote like chain roll up whatever but then they get batched into like actual shards physical shards which are actually I mean semi-deterministic and then and the cross-contract calls are getting batched and received from different shards and also like deterministic but uh kind of determined by a previous block how do you guarantee that the validator executes the Callback correctly on the next block like are they that's right yeah that's just invalid State tradition okay so like pretty much the way it works uh so this is a block right so within the blogs there's chunks yeah or shards and then you have transactions here and so this produces we call them receipts but this is just uh cross-contract calls and so they're getting included in the beginning of the next so these things will get included all right so there's like actually two parts there's transactions with the block header of the previous block includes the set of things that must be called yeah first or something yeah and so like how can you is it possible that the number of these things have to get called here take up the entire next block it yeah so there's like some there's always some limit to include more transactions but yeah so there's a queue pretty much been built and it may take some time to like undo it yeah like I mean the user doesn't actually have that so like Suppose there was like a order book yeah and I had a liquidation from a lending protocol that took out the whole order book it's possible that if I wanted to like trade on that order book I submit a transaction I'll be behind you know like uh is there a bound on that time before or like is there a bound on the space per block that's taken by the previous callback yes yeah yeah so there's some space always for new transactions to come in but uh okay so that's where you have some nav so if I if I know the the the the the the new transaction space yeah let's say I know there's a liquidation let's say I'm the Liquidator so I caused the liquidation happen and then I want my orders to get filled I will just like add a new new kind of like order so the order book such that oh these these some of these have to get executed in this block right yeah non-zero number like like if I look at let's say this is like box based as like there's some percentage that is callbacks from last block yeah or like receipts yeah before and how much and some new transaction yeah what's the ratio uh I mean so there's a limit on the whole block yep and then there's a uh minimum percentage for this I don't remember what it is but like then then usually it's you know less than and so it fills in with the rest yeah this is an interesting way of manipulating a t-rop Oracle so another form of Mev is like let's say you have a unisoft transaction and there's a you know someone's using it as an oracle price like they're marking a loan on another contract um if you bought up if you basically changed the price on use up so you paid to move the price up for a certain amount of time you you will somehow keep adding trades here that are callbacks and you'll have to add some new transactions yeah um so yeah you can pretty much like try to push up the price and while this gets I guess there's yeah more stuff scheduled to execute yeah right right yeah that's kind of interesting and this this callback Mev I don't think anyone's ever talked about it but it clearly exists that like so how does this ratio get chosen is that governance or is that yeah it's a configuration so values have to vote on change to it yeah have you seen people taking advantage of this like in this way like not just right now I think the yeah there's some sandwiching that happens but it's also hard because let's say well the sandwiching is capital inefficient here because you can't flash like you can't really flash on your sandwich well you can on a specific protocol Implement like uh application implementation that has internal balances okay so so you're saying the Utah contract I could put it has yeah well so unislope contract is almost like it's its own chain where you can deposit money trade and then withdraw money right yeah like that's why like they are extra chains right yeah and you can do it in one transaction but obviously it's less efficient than if you deposit do a bunch of Trades and withdraw right but can I can I flash and borrow as my deposit and then do the trades and then flash close uh assuming it's profitable not there's no implementation in the current but in in theory yeah interior could okay that that should someone should do that that actually I feel like that would just make this process more efficient yeah yeah uh yeah interior because like this contract actually has a lot of liquidity itself so it actually can borrow like well actually it doesn't it doesn't even need the real money yet you can actually literally print the money because it will be within one one yeah all fits execution yeah exactly exactly it should it should you should be able so this is an interesting question in a protocol like near where I can think of as like each app is almost effectively its own chain although there's some sequencing there's still there's yeah there's so there is a a pretty much synchronization that happens right that's that's really what it's like our point was if it's completely async right which was like a lot of original sharding designs it becomes like completely unmanageable right right because like as a user you now have no idea what's going on I mean you already still do have the little you have some yeah you have something like the user you need to like like the the wallet needs to basically like resend if it doesn't make it into the if like if you're on high priority let's say you get into the Callback but you have no clue whether you'll be in the next block or five blocks away you have to keep layering new orders and try to get into this um yeah I mean it's actually kind of interesting to think about what the uh because in a way this is this is a more optimized version of a multi-chain world right like if you think of it like this is yeah each thing is mode chain world it's just you have kind of a single right Machinery to do with it but like you have this problem across like say you have Cosmos with IBC you have the same type of thing right you have like things send you know sending money between you can trade you can withdraw and so like a multi-chain mov that's what neroes already have right so what uh uh what kind of so so one interesting thing about multichannemuv another another kind of funny little allegory this one this one again I'm trying to do all the ones that don't need an email um this one doesn't really actually just I was thinking about this yeah so actually is this if this contract is refinance adds A Primitive specifically for sandwich attacks yeah where you can lit you literally say I'm gonna borrow X trade like a to b or whatever some set of executions and then whenever somebody else trades this I'll return it this changes the the the dichotomy of this unisol pool right it's like let's just say we have you know R1 R2 which is like the reserves well what are you borrowing when you're flash borrowing well you're borrowing one side of this so you're actually changing the price slightly yeah you literally just say I'm gonna drop the but then but then this contract can just do it himself they can just give everyone the minimal price the minimal like whatever the price that user said the minimum they will be fine with it can just give it to that and take all the money to itself right doesn't do that that's a great question you should ask them why their token doesn't no no but like whatever unit swap just did that like it will always give them whatever minimum price or or fail sure so that's what the like penumbra type of thing does when they do batch auctions yeah effectively you could do it on the single transaction level they just do it on a mini transaction level um but if we're talking about like generally yeah yeah yeah yeah having the contracts themselves of course that yeah because then people will like actually optimize this because right now it said like the five percent the problem is we're ignoring one user here which is the liquidity provider and they are losing out on this potentially but no but the contract can make money for liquidity Provider Services like they can split the profit right right they have to say in a way in a way like right now you have this like you know you get I was like you know there's there's a price curve right like this and you're saying you know if you if you're buying then the price goes up if you're selling and the price goes up down but the reality is you can just say this is like you will you'll be going from here instead and this is your yeah the problem is the language that you design trades in unisoft doesn't give you a price you just say the language is trade size and slippage limits exactly it doesn't give you a price that you pin to yeah um if you added the price you could sort of do this provided that like it is true this is sort of sort of like adding like stop loss orders exactly well yeah well it's it's more like when when you trade you just say like I want I trade A to B and I want at least acts of B yeah yeah well which is how slippage units are defined exactly this is this is how and so you just get all these the X yeah yeah and so so the problem is the user might their transaction might fail many times because like someone but but this is true right now too if when somebody's front running hopefully yeah yeah as long as you can enforce it so if if there's efficient value extractors like flashbot they you will always get X yeah otherwise they're not efficient and they can extract more so so in reality you're already getting this except the money are go to whoever runs Searchers instead of right LPS so why don't swap protocols just give it to a piece and their token holders they have that they could I guess the the weird thing about this borrow this like hey I'm I'm gonna take some of the reserves and like use it to do the sandwich Taco sandwich is that it doesn't work at very low liquidity so like it long tail assets are fucked um but then it also like doesn't work for really large trades because they will like wipe out it'll have to borrow so much of this that will push the price like there is this trade-off between between like how much you're willing to borrow to do the sandwich versus like the trade size and it's unprofitable in some cases but you're right that you could do it just on the trades it's guaranteed profitable for LPS yeah um so it just solved the MV is that no no there's other parts no I mean not this this is the sandwich we just saw sandwich text s pretty much all all deck all amms should just always return whatever minimum user said and make money for LPS yeah that's definitely true they should just sandwich themselves I mean people have made these I mean these uh uh MMS have done that but for some reason they've never been able to get liquidity because there's there's this like liquidity beginning liquidity effect of like people's wallets are already routing to you if like yeah I'm not I mean there's Network effects there's Network effects yeah but like I think somehow so so so you actually talked about like originally and I know you wanted to uh flip another topic but the you know defining kind of it's through maximum permutation yeah but like things like twap and other stuff that takes multiple blocks actually not that yes I guess so so it's really the the the the the the the the thing here is Max or permutations Max over transactions you can add Max or transactions you uh uh um such that you know the sum of all the transactions is less than the block limit but there's also a context of like you've been can be doing this for multiple blocks yeah yeah you you again that's true then you need to make sure this block limit thing takes advantage of that of value of mempool yeah um so yeah so it is it is expensive I do think these um the amount people have so one question you might say is like suppose I gave you a flash loan that let's say flashbots offered a service where they lend you collateral over a block so let's say you're a Searcher so a Searcher is a strategic user who who does a sandwich or does a liquidation whatever flashpot says hey we'll lend you 1 million you can do a bunch of transactions we just but we'll only it'll only be valid if we get back at least one million plus plus some interest reward yeah right uh but but you can buy arbitrary amounts in a block now you could imagine just doing that repeatedly and the cost of this t-wop attack just went down dramatically right so the question is this is actually incentive compatible for the auctioneer because it's actually better for them to be lending you money right because they don't they actually don't earn any yield on right now yeah because I mean yeah right and for them this is free interest so the question is at what point does it become does all the value go from the Oracle LPS to the auction and my suspicion is in the long run the validators always hold the keys and they can all literally and they can literally always do this and there's no reason for them not to and if you're accelerationist validators should be selling these types of services but shouldn't vow they just be the oracles then because I hold the keys anyway yeah yeah exactly may as well just they should actually provide the data yeah yeah so uh eigenlayer which is like this thing for eth2 for restaking so what it is is like let's say I'm an E2 validator I've staked 100 East and someone is like hey I'll pay you five percent a year if you take your 100 Ethan these two and you restaked it in my Oracle protocol so what that means is I if I draw it it's like I have my 100 East I deposited into staking contract and now have a hundred steak teeth I'll cut SC this is separated from STS because that's slightly different and what um what restaking does instead it says hey put your 100 Heath in the Oracle contract that will actually take it underneath yes and the Oracle deposits it there and then when you so so so the the withdrawal address that the main protocol sees he's Oracle is the Oracle but the Oracle is a smart contract that guarantees that when you call withdrawal it atomically sends you back yeah so now you basically get this pass-through where you can earn extra interest as the validator by basically delegating your stake to a contract that does good part put it in the main network but then also earns fees from you know whatever people calling the oracle so there's a sense in which that's the way I think that all of these services and validators could offer like like lending you could basically make a lending protocol like this um that where where the amount that's allowed to be lent effectively is like the the the protocol say it takes so let's let's suppose we had a lending protocol version of lend they take 95 each and restake and they take five eth and put in the lending pool and the idea is maybe this is getting you you know seven percent fixed and the loans are getting you like five to ten percent variable right and like you can choose how much you want to do that yeah and then you would have then the validator would have the capital to like do this to that Glenn yeah but then the t-bop Oracle completely is ruined but but like what I mean but you know if they go further we just go to add this in on the protocol level where this I mean you could add these as Services directly yeah and then you can which I think is any amount of anything right you just borrow any amount like infinite amount of anything if you return more of it hey hey you win 64 has a max button well you 256 to begin also uh you can borrow as much as the limit of the of the integers yes um but like I think this is actually what will end up kind of defeating a lot of like on-chain trading as oracles like I think there's there's a lot a lot of people trying to build lending protocols they use Hue operacles and the moment validators start doing and like eth has already gone this way proposer Builder separation sort of screws over a lot of these um things that want to use t-ref oracles yeah so you might as well just shove it into the validator yeah there was no attacks yet on all the stats that depends on two up I think right now the validators can do whatever right like there have been a couple and most of them actually just have to do with people's using bad t-rep settings okay because like obviously they make the window Too Short it becomes really cheap they're really easy yeah um and so like yeah I I think uh another another kind of interesting liquidation game to consider is uh oh yeah sorry oh yeah cross chain um cross chain our cross chain auction design so this is something I'm working on now and it's formalized formally but like there's one example in there that's kind of interesting so suppose we have two chains chain X chain y and there's a amm here that is trading X versus synthetic y and there's something here trading synth X y okay so let's suppose the price here is P0 the price here is P1 P0 is less than P1 let's suppose that there's validators no I should let me draw them as a little stick figures there's validators same validators of people they might not be the same they might be the same who knows and they can do one of three auctions one sell the Arbitrage so like you know tradex for since y go to Y redeem it trade y for syntax go across back so you can price the auction price the bundle in x price bundle in y I'm prize both or sell the legs separately yeah and depending on the liquidity and the gas cost model when you do this trade here if you'd bid on them separately you're actually bidding on how much you're going to change your gas cost here because you're actually pushing down the price why so if there's this price difference is really big then you actually can as the auctioneer earn higher Revenue by pricing separately versus pricing in one or the other and this is the type of stuff I think that like makes this cross chain Mev stuff much more complicated it's like actually sometimes the auctioneer should be offering you very different sets of bundles bidding languages well I mean this is where you like ideally you have some options that you can buy to like yeah yeah yeah yeah sure sure I mean like Azure latency I'm saying like that there's certainly hopefully that but I for a lot of coins that's not true right well I mean so this is I think one of the interesting things in general from for any multi-chain stuff is can you because like there's a latency you know L that exists here and so what you want you want some options for like 2L plus you know some Epsilon that will guarantee you whatever you're doing here yeah and so having like a facility that gives you such options like efficiently priced again this is another thing that validator should be selling you yeah especially if others are trying to cross all the chains right so so exactly so the difference in value so in a sort of no Arbitrage World which is obviously somewhat idealistic but it's not that idealistic because the validators if they're issuing the options it should be no Arbitrage like like by almost otherwise they fucked up that means that they're they wrote their code wrong uh then in that case if there are options these three should all be priced the same because these two will include options yeah right but but my point is right now that if you just look at the dexes that there's the the way muv is extracted is kind of um is is actually the the way people are designing how you bid on these things changes their revenue and I don't think anyone's very much solved that problem yeah I mean I think that there's an interesting like if we're talking about validator right like right now they're just running like a regular node yeah and so already with flashbots that is like you run something that like uh you know proposes blocks yeah sidecar proposes block so the question is like should this be kind of a standardized facility to allow like for kind of customization of the almost like a block like block logic right like for you know flesh mints and kind of all these things and I think that's that's inevitable this is this is this is the direction I think all the cosmos Mev stuff is moving this direction and I'm gonna guess near Mev will move in this direction this is where it's different than these because eth is doing first proposer Builder separation which kind of complicates doing these sidecar things and because the block so the proposer is the person who it gets drawn from the stake distribution the Builder is the person who proposes a block and so you have this auction where the proposer is given a bunch of blocks they can't see what the transactions are but they're bidding on you know a particular block so it's like no they're just picking whatever who pays them more pretty much and they they just they should be but I mean there's some weirdness here in that and I don't know why flashback people don't believe this but like the proposer and Builder could easily collude by being the same person uh so there's like Builders who propose the number of Builders propose a block it was a block which is why it's confusing yeah with the six proposers to propose a block correct and then and then the the validator let's just call them is the one who actually picks and so like naturally I mean ideally they should pick whatever is a pays them the highest yes but they can if they are the builder then they just there's something they're just lazy well they might want to choose the cheaper one because they have a bunch of their own well there's a yeah there's like extracted value here which is higher than this price and so this again gets at this fact of like Fair ordering is fucking stupid like this thing will never be compatible with this idea that there exists some Global like Kenneth Arrow won the fucking Nobel Prize for proving this impossibility theorem for ranked voting and like somehow we still want to like shove our shove ourselves into like pretending that that's not just like a fact of reality uh since there's no fairness sorry for destroying your world there's no difference there's a trade-off of fairness yeah there's a big problem with machine learning too right now big problem in both machine learning and crypto so like I actually think that's that's where the intersection of research is I mean that was like the fairness thing of like how much fairness do you trade off for accuracy slash cost and latency and like yeah very hard problem but well that's yeah that's why there's but I do think people will make a node where there's sort of like a DSL or that like lets you like say hey I'm going to use this mainnet contract as my restaking mechanism and like you deploy these contracts like Oracle lending whatever that basically guarantee the execution for the validator yeah but well I don't think you need the restaking contract you just literally have some you just say like there's a facility of like pre-block plus block logic yeah that everybody just the whole blockchain just votes that we're gonna accept yeah this piece of code to run and like in Cosmos it's like everybody does that all the time well I think the restaking thing's kind of important because you yeah yeah I know the pre-block post block header thing there is like a little bit that makes sense but I think like in Cosmos they just have that like they literally have that two pieces of I think the interesting thing here is that the Lend contract may actually want to Source liquidity not from the validators right the Lend contract might just be like hey it's the normal Ave pool yeah and you're just using the obvious if you don't have just flesh mints if you have flashes and that's what I'm saying like if you have just like facility to do whatever yeah I mean it's that that's where like well it's at cloud and stuff like this but yeah but like generally saying right I mean this is where like if we have if we had resource programmable resources then you can have a flesh mint in the resource where like in x-blocks it needs to come back but I guess my question with the design you're saying earlier of like I have to wait another I have to wait each block yeah for the like how does Flash mitt work because like in Flashman but then the Flashman is stuck oh well yeah so this thing that's what I'm saying is programmable there's like a piece of logic there that says in X blocks this thing needs to come back and and call this function that will like flash pretty much minted I mean burn it and so what it doesn't matter where this resource stands up well it's that's that's where the guarantee by the runtime I see I see I see okay so so so in runtime there's a new there's a new pack like a new place where it records all the resources that are there and iterates over there and says like is any of the resources need to come but it also says basically takes a lock on all these resources exactly yeah this is this is this is this is a mutex of resource that you can travel around this is this is how we were solving the train and hotel problem yeah and we have not implemented this because it is more complex but actually move is doing this this is where yeah it gets interesting because move is actually programming language that has the resources already yeah which are like half conditions right I do think the problem with this stuff is like the uniswap style like Global State everyone is shitting in the same pool one day yeah you know you're executing doesn't work very well here because you have to have many of these running concurrently for each user in some sense which can be like a pain in the ass so you need to build a stuff to like manage like all the users like State tripsing and like then when there's you know like the same block like you have some rules but this is where like usually something in unisol will just be one chain contract account yeah thing where you just synchronize everyone trade it and yeah synchronize but I just mean for developers that's quite a bit of overhead if they have to think about that they want to write fucking JavaScript man they do that's why we have now JavaScript well in JavaScript you do have callbacks and you know if you're writing this is actually this is literally how microservices work yeah yeah this is like you have each each contract on here is a microservice was a database and it receives incoming calls and it has callbacks but the question to me is actually more like the lock on the state that's touched like based on how you want it it's a developer okay that's why we want to ask we wanted to add some facility like a standardized log facilities but we haven't is there a way to like wait can I control whether whether I have a view only resource first mutable resource of like you as a developer can Implement whatever you want you can literally resolve your own like blocks and everything so okay okay because that yeah that makes this seems like there's more Mev here honestly than there isn't even like I I know all the move people are like oh we have less mov bullshit like this actually seems like there's way more of like for the resources the locks the sequencing like suppose I have like five resources let's suppose there's State one state two state three and like calculation one calculation two and we have five people and they that you know let's suppose we you know we have those sort of like complete bipartite graph on this and each of them is taking some path like one that's doing that one is doing that one is doing that and and they have some they have some contention right like they they'll reach the same state the resolution of those contentions is either random but the randomness is not really random there because it's you know the if you're if you know the validator code you can figure out what the they have to come to consensus on it so there must be some deterministic source of that so you could try to basically simulate ahead the previous the the rules unless you unless you're pipeline it then it's the next block so this this is where like in our case we actually have we have a one bit of uh like validator can only affect one bit of Randomness right by not producing a block which then actually I see it perhaps their ability to do anything and and we actually had a fully like fully non-biased vrf uh implemented but not launched well how come there's no one thing I haven't understood because there's so many benefits to application developers is why no one has a vrf the application Level because like like to some extent the thing you were describing earlier where we're like hey we will you know we'll we'll let you borrow a little bit yeah before right the contract does it itself is a sort of form of like hey the contract is collecting its own Mev or like there's application specific Mev but one of the things is like that's not quite easy to do right now and one thing that would make it easier is actually having just like a vrf you could call in your contract that's tied to the consensus so so we have that because we have because when you submit a transaction it gets included and then it gets executed okay so by the time it gets executed you already had something that was like a consensus yeah I haven't made like numpy dot random for consensus Randomness like I want to sample gaussian I want to do the like you can do that on there I know but someone should actually make the library on that because like I feel like that will actually give application developers a lot even more easier easy control over like avoiding these so you're just saying like oh just give a random amount back pretty much within the range right but with some distribution like yeah it was it just like well you have you have a slippage and you just say well we're gonna give you yes random amount yeah yeah well so so we we wrote this paper proving how to get differential privacy which is sort of like a way of you know you can show for these amms you can't ever give pure privacy even if you had a ZK proof blocking the reserves because if you see the prices you can always invert the prices because the functions are determined yeah for how they change so the question is how do you add noise such that you know if I add x x bits of entropy to your trade which change your price by some amount of there's some bits of Entry to the random price how do I make sure that I I someone can't infer what your trade size was with more Precision than x but then I also don't move your price more than y right so there's like you know there's like the trade size space and then there's the sort of you know price and you know I want to add Randomness so you're in here but then I also don't want this this thing to be related right yeah and so there's this trade-off and if you had different distributions you can like add noise here with certain distributions to guarantee that this thing is bounded all right well there's a project right there for someone to build I think the library thing might be first numpy dot random well that's what I mean yeah like I mean because there's a source of Randomness you just need to like then build distributions yeah yeah you can actually you can just copy it you can actually run them on here right you could just copy that and just make sure it uses the correct to see code so you can just run this you just need to make sure it gets well the problem is your vrs 256 my point and you probably want 256-bit Randomness so you might want to rewrite those to support u-256 but I think there's like lots of stuff like this unexplored territory for people all right well lots to build uh there's and loads to fix with existing protocols so I mean look he didn't think we'd have an hour of Mev content all right awesome thanks thanks tarun and uh please uh check out all the videos like it subscribe you know the usual YouTube stuff that I don't know what to do but thank you I mean I'm sure we can talk for like many hours to be clear like yeah I feel a lot of yeah no it's good","transcript_synced_at":"2026-11-04T03:57:26.807Z","segments":[{"start_seconds":3,"text":"hello everyone uh Amelia coming back with whiteboard series here from New York I have tarun from Gun Hill Network","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3s"},{"start_seconds":10,"text":"and we're gonna go in to the Mev yeah so I think if you followed crypto Twitter","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=10s"},{"start_seconds":18,"text":"at all nowadays you know there's a lot of fighting over what qualifies as Mev um but first of all let's write out what","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=18s"},{"start_seconds":25,"text":"the acronym is the acronym has changed it actually stands for maximal extractable Value not because no more","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=25s"},{"start_seconds":32,"text":"miners right because a few weeks ago yeah exactly so this uh this this is what we're talking about and so you know","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=32s"},{"start_seconds":41,"text":"what you know the problem is one hard to Define","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=41s"},{"start_seconds":48,"text":"two it has the um the quality of porn which is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=48s"},{"start_seconds":56,"text":"you know it when you see it this is from a famous Supreme Court case","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=56s"},{"start_seconds":64,"text":"where that was a definition nice um but you know you know it when you see it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=64s"},{"start_seconds":72,"text":"unique to blockchains because in tradify you don't really see","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=72s"},{"start_seconds":78,"text":"it you you see your version of it but the exchange doesn't tell you really what everyone else is doing yeah so it's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=78s"},{"start_seconds":85,"text":"hard to see if if someone is extracting something from you but yeah it's like porn because you literally go on block Explorer yes but but you have like Robin","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=85s"},{"start_seconds":94,"text":"Hood for example which was kind of doing that right like you send all your trades and they would match them and kind of do it but you don't actually see how much","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=94s"},{"start_seconds":101,"text":"money they made out of this exactly you don't really see how much Citadel made out or or jump or whoever made out of it right so the interesting thing is that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=101s"},{"start_seconds":109,"text":"here in blockchains you kind of there's this porn aspect of it in that you can go run the transaction and see how much","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=109s"},{"start_seconds":117,"text":"it should have cost or taken and you can go around the you can go look at what happened actually happened and you see a difference so clearly there's there's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=117s"},{"start_seconds":125,"text":"there's some sense in which uh uh difference","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=125s"},{"start_seconds":134,"text":"between expected cost","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=134s"},{"start_seconds":141,"text":"and realized cost so you know this is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=141s"},{"start_seconds":150,"text":"I send five tokens","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=150s"},{"start_seconds":157,"text":"I'm supposed to get five dollars but I get 450.","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=157s"},{"start_seconds":169,"text":"but then you also said you're fine with this when you were sending here otherwise this would have failed correct correct correct correct but the thing is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=169s"},{"start_seconds":177,"text":"in a lot of applications right an application will guarantee you something you know it'll say like spend five dollars on Robinhood and","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=177s"},{"start_seconds":185,"text":"you'll get five shares and then if you you say yes and then you see that you got four 4.5 shares will be tests yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=185s"},{"start_seconds":193,"text":"so this is the you know it when you see it aspect right now there's this big question of like is everything Mev so","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=193s"},{"start_seconds":202,"text":"um you know I think the The Flash buff people who who do Mev auctions on ethereum they","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=202s"},{"start_seconds":209,"text":"may I think they take a lot of Liberty with saying even like our Dex arbitrages is Mev but in some ways it's not really it it's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=209s"},{"start_seconds":218,"text":"it is just intrinsic to the system that there's some uncertainty over a block and whoever gets uh kind of to to pick what","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=218s"},{"start_seconds":227,"text":"the block ordering is kind of has some power over the users um","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=227s"},{"start_seconds":233,"text":"so instead I think the a sort of more kind of economic way of defining Mev is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=233s"},{"start_seconds":240,"text":"sort of we have a sequence of transactions that are sort of sitting in the mempool","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=240s"},{"start_seconds":248,"text":"we have a sort of value function which takes in a ordered sequence of transactions","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=248s"},{"start_seconds":255,"text":"you want to find such permutation and you you want to say like what's the max permutation so this is the permutation","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=255s"},{"start_seconds":266,"text":"that's probably going to be the most formulas in whiteboard series those those far right","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=266s"},{"start_seconds":275,"text":"or sorry rather you should say this is the max value m","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=275s"},{"start_seconds":282,"text":"this is the expected value e expected value permutation","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=282s"},{"start_seconds":290,"text":"so but here's here's a question for you yeah why why don't blog producers by protocol not forced to just randomize","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=290s"},{"start_seconds":299,"text":"this order yeah great question um one reason is that they cannot come to consensus on the actual transactions","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=299s"},{"start_seconds":308,"text":"they have so for instance if we have a network of validators I'll just draw them as you know this","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=308s"},{"start_seconds":316,"text":"network graph these are the validators and then there's the network of users actually you mind if I use the other things so we'll make the red as validators","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=316s"},{"start_seconds":330,"text":"blue is users and so you know the user is sitting all over the internet","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=330s"},{"start_seconds":338,"text":"and they submit transactions and as you can see they submit them to","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=338s"},{"start_seconds":346,"text":"different validators maybe they submit them twice just to get make sure their transaction gets in and the problem is coming to consensus","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=346s"},{"start_seconds":354,"text":"on the set of transactions you have so on the the set yeah tx1 a adds a bunch of latency but B if if","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=354s"},{"start_seconds":363,"text":"you know you basically have to ensure that people are not dropping some of these transactions um but also you basically have to do","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=363s"},{"start_seconds":372,"text":"what's sort of like a ranked vote so if let's say let's say even if we agree that these are the transactions the set of transactions the ones we're going to","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=372s"},{"start_seconds":379,"text":"include then we have to say okay well I saw I got this transaction first and I got this transaction last but the problem is there's no way that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=379s"},{"start_seconds":388,"text":"everyone gets the same ordering sure yeah right and uh effectively people have to vote on what the ordering","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=388s"},{"start_seconds":396,"text":"is they could vote on the randomness so they could vote on like but the thing is that the randomness only chooses the permutation the the way each person is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=396s"},{"start_seconds":404,"text":"storing the set is actually up to them no but I mean you can say like publish a set first get your consensus and then","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=404s"},{"start_seconds":412,"text":"through that also vote on the randomness like for example the randomness is Source from uh DLS signature on the Block sure then the execution happens","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=412s"},{"start_seconds":420,"text":"already so we need to agree in advance on something what what the set is and like what like lexicographic ordering is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=420s"},{"start_seconds":427,"text":"like what alphabetical ordering is so that sure and then we draw this random permutation right yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=427s"},{"start_seconds":434,"text":"uh a higher latency B you still have the set problem of like how do you guarantee that people are including uh what they","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=434s"},{"start_seconds":441,"text":"say because like well people well you mean that like this is where the like tips and transaction fees are coming from you actually like get included yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=441s"},{"start_seconds":449,"text":"exactly so as soon as you do that you kind of violating the and B that there isn't some side Channel agreement where a minor is accelerating certain","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=449s"},{"start_seconds":457,"text":"transactions versus others right which is what flashbots effectively you know does like if there's an auction you pay them if you win the auction you get to","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=457s"},{"start_seconds":465,"text":"go ahead of everyone so a it's bad B increases latency C sort of like increases communication that the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=465s"},{"start_seconds":474,"text":"validators have to do makes them more susceptible to get ddosed there's like lots of sort of things that make it harder so instead","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=474s"},{"start_seconds":483,"text":"you know one you know the way things work on ethereum right now is there's effectively a centralized coordinator","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=483s"},{"start_seconds":491,"text":"called flashbots and um let's say I'm a I'm a strategic user so I'm going to call the Strategic","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=491s"},{"start_seconds":499,"text":"users like gonna give it a face with some glasses uh and the Strategic users like hey flashbots","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=499s"},{"start_seconds":507,"text":"here's my transaction and I want it to be first and I'm willing to pay","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=507s"},{"start_seconds":514,"text":"five dollars more than than what the transaction costs and let's say that wins then flashbots broadcast this transaction","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=514s"},{"start_seconds":523,"text":"do all those all the validators and who subscribe to it and they effectively agree like a cartel to","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=523s"},{"start_seconds":531,"text":"execute the transaction such that that occurs and they only get the payment if like the the things this thing passes yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=531s"},{"start_seconds":539,"text":"um and so you might say hey I'm getting robbed here because this guy's putting his transaction first so that when I put in the five tokens I only get 450","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=539s"},{"start_seconds":547,"text":"because he put in his two tokens before and took out my 50 cents um not great but arguably it is more","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=547s"},{"start_seconds":556,"text":"efficient in the sense that people who are strategic who if if this wasn't there they would try to spam the validators with many many transactions","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=556s"},{"start_seconds":564,"text":"and you would actually get worse performance in other words yeah right so there's this trade-off between the economics of incentivizing the Strategic","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=564s"},{"start_seconds":573,"text":"users to to pay more versus the spam on the network and that's sort of this intrinsic trade-off in Mev you know","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=573s"},{"start_seconds":581,"text":"there's people who spend their lives trying to make these things called Fair ordering protocols that do really complicated like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=581s"},{"start_seconds":589,"text":"you've kind of the things we talked about like everyone keeps voting on the sets of transactions first then they vote on sort of the randomness and then","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=589s"},{"start_seconds":596,"text":"they execute so far none of them have worked without either some amount of centralization they have sort of some fallback mechanism","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=596s"},{"start_seconds":604,"text":"um or they just take forever take forever yeah right so so some consensus algorithms the bigger the big problem is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=604s"},{"start_seconds":612,"text":"no one has actually proven any formal results about this that say something like hey there's always this trade-off of like you either get the highest","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=612s"},{"start_seconds":620,"text":"information process through your blockchain or you have to slow it down to like guarantee some sort of fairness and there's sort of some well raid off","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=620s"},{"start_seconds":628,"text":"there's a laden super difference like everything is about latency it's sort of latency personality or for","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=628s"},{"start_seconds":636,"text":"um sort of cost and sort of fairness measured in some notion of like how how much you're respecting like the the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=636s"},{"start_seconds":644,"text":"intent of the user because like one way of thinking about it is we have blockchain block one block two block three the user sees the state of block","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=644s"},{"start_seconds":653,"text":"three and it sees that it's like five dollars for shit coin right and they're like oh I want to buy five dollar shit","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=653s"},{"start_seconds":661,"text":"coin and so I'm like yeah I'm gonna send my transaction here take my money for five hundred dollars but then you know of course somebody","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=661s"},{"start_seconds":668,"text":"comes in and somebody comes in and they they they instead of getting 100 shit coins they only get 90. and so","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=668s"},{"start_seconds":677,"text":"um you know the the idea here is that fairness would say hey actually if there's 10 people trying to get the 500","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=677s"},{"start_seconds":684,"text":"thing instead of having one person get it 100 another person get 95 another person get 90 split it evenly that's the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=684s"},{"start_seconds":691,"text":"fairness access the latency access is like how fast is my transaction process yeah just aggregate all transactions wait for a while exactly everybody chill","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=691s"},{"start_seconds":700,"text":"and then settle and fairly exactly and cost is cost is a little bit complicated actually so","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=700s"},{"start_seconds":707,"text":"um one thing that's interesting is like suppose we have two exchanges so we have one exchange that shows five dollar shit coin","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=707s"},{"start_seconds":715,"text":"and the other exchange that shows 450 shit coin what's the real price","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=715s"},{"start_seconds":723,"text":"well depends on the much you're buying and the exactly the pools exactly how much liquidity there","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=723s"},{"start_seconds":730,"text":"is what you're buying it's possible that the five dollar ship coin is horrible for you because there's no liquidity and you push the price to ten dollars or","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=730s"},{"start_seconds":738,"text":"it's possible that the 450 is actually worse and so what is the natural incentive for people to do is to synchronize these because technically","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=738s"},{"start_seconds":746,"text":"they have the same assets so you know Buy Low sell High so in some sense your cost goes down by allowing people who are doing Arbitrage","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=746s"},{"start_seconds":755,"text":"to go in front of you because they're actually ensuring that the prices are sort of synchronized and so it's as close to five dollars as when you saw as","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=755s"},{"start_seconds":763,"text":"possible and so that's sort of there's some sort of like surface in this 3D I'm about at drawing 3D things there's some sort of trainoff surface between fairness","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=763s"},{"start_seconds":771,"text":"latency and costs and there's this idea that like hey if I maximize Fair the the people who believe in Fair ordering they think that if you maximize fairness","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=771s"},{"start_seconds":779,"text":"you're not trading off these other two but I think that like one of the big thing unsolved sort of mysteries is proving that you can never have all","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=779s"},{"start_seconds":787,"text":"three of these I think I mean the question is also because for example you build a blockchain where there is the swap is uh","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=787s"},{"start_seconds":796,"text":"core part of protocol and you can have like you aggregate also transactions and then you execute swaps at the end of the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=796s"},{"start_seconds":802,"text":"block right like you can have a more like the the transaction ordering for example does not matter in a block at all yes so there are things like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=802s"},{"start_seconds":811,"text":"penumbra which is a ZK blockchain where they take all your transactions and they do a batch auction yeah the batch","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=811s"},{"start_seconds":818,"text":"auction gives everyone the same price so it maximizes the fairness side but everyone actually only sends encrypted transactions so liquidity providers have","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=818s"},{"start_seconds":826,"text":"to play this game or before the block they have to get they have to basically submit how much of their liquidity they want to keep for that block and then the order flow gets executed privately","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=826s"},{"start_seconds":835,"text":"against that so in that that's another example of someone going way on the fairness axis and but their latency access is also quite low they're like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=835s"},{"start_seconds":844,"text":"they're like they're high fairness low latency but high cost because the batch auction worst case is high cost right but but let's say you don't do it private you do it in public you say we","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=844s"},{"start_seconds":853,"text":"aggregate all transactions and instead of executing them in order we we bad shows a holds the orders but now your consensus","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=853s"},{"start_seconds":861,"text":"rule has to interact with an application for the order but then let's say we build a you know the fair low latency","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=861s"},{"start_seconds":868,"text":"low-cost swap chain right but my point is you can't drive all of them to zero or like maybe","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=868s"},{"start_seconds":877,"text":"there's some sort of like limit to how well you can do without making your consensus suddenly well I think I think that what will happen in this case is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=877s"},{"start_seconds":884,"text":"that the cost is lower on ethereum for example because there's so much more lots of stuff yeah like yeah and so as soon as you start optimizing just for","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=884s"},{"start_seconds":893,"text":"swaps a specific chain you lose all the other functionality and now actually your cost will be higher because you don't have like flash like correct flash","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=893s"},{"start_seconds":901,"text":"loans and stuff like this to like actually or you don't have um routing where you have many dexes and","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=901s"},{"start_seconds":908,"text":"I can you know I want to trade a to d but I can I can split my trade into yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=908s"},{"start_seconds":916,"text":"and actually this gets to a paradox and a paper we wrote recently that's actually pretty easy to explain that you can explain mainly without math","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=916s"},{"start_seconds":925,"text":"by just some pictures explaining something without math what you know I I do I do my best","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=925s"},{"start_seconds":934,"text":"um so this is a sort of paradox and from you know basically in this paper we found this Paradox that the inverse of","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=934s"},{"start_seconds":941,"text":"this Paradox that exists in sort of traffic modeling like when you're designing cities or designing roads between cities uh for amm so the way it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=941s"},{"start_seconds":950,"text":"works is imagine we have four tokens um unfortunately there's not I don't know shit in other languages otherwise I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=950s"},{"start_seconds":959,"text":"would name them each a different form of shit um but uh the we'll start start with the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=959s"},{"start_seconds":967,"text":"traffic version of this so we have four cities on each Edge so you want to go from a to d so you know a b d","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=967s"},{"start_seconds":974,"text":"e c d on each Edge is uh what What's known as sort of uh the latency so let's say there's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=974s"},{"start_seconds":982,"text":"a hundred cars that need to travel this if the the latency says X then and 50 of the cars take this route then","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=982s"},{"start_seconds":990,"text":"the time it takes is one half and if it says one it's it's like uh infinite it's like a really large Highway it'll just take everyone the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=990s"},{"start_seconds":998,"text":"same amount of time always and so we have this thing where we have you know kind of this really large Highway really narrow road really","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=998s"},{"start_seconds":1005,"text":"narrow road really a large Highway okay so you know if you look at the equilibrium of this imagine everyone was like Hey like what's the fastest route","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1005s"},{"start_seconds":1013,"text":"to take well they would see okay well my you know it takes me the same amount on each route and you would expect traffic","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1013s"},{"start_seconds":1020,"text":"to sort of 50 50 right so you get 50 50 this way and 50 this way","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1020s"},{"start_seconds":1029,"text":"okay now imagine counter-intuitively that you add a road here that has latency zero just imagine","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1029s"},{"start_seconds":1037,"text":"there's teleportation anyways right and so actually by the way when they're split 50 50 the the time it takes you is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1037s"},{"start_seconds":1044,"text":"one half plus one which is three halves right because half goes here so one half and then takes one okay now here if everyone is selfishly","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1044s"},{"start_seconds":1053,"text":"optimizing the fastest path is actually this path yeah because if they if they if they took any of the other paths it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1053s"},{"start_seconds":1062,"text":"could be higher right but here it's actually technically you know x and x whereas this is always two and X","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1062s"},{"start_seconds":1071,"text":"is less than two so it's so basically what happens is but the but then you get this weird paradoxical thing if everyone takes this route then","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1071s"},{"start_seconds":1078,"text":"there the time it takes them even though I added another road there should be more throughput in the network the network should be more efficient takes them longer because like everyone","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1078s"},{"start_seconds":1087,"text":"took this road never took this so it takes time too yeah right so that's bad however you know what happens if I at","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1087s"},{"start_seconds":1094,"text":"now let's suppose I add a 0.1 yeah a little Epsilon times x it's not that's the only symbol you're getting","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1094s"},{"start_seconds":1102,"text":"so now as you make this like cost congestion cost go up then you'll see that people will revert to Distributing","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1102s"},{"start_seconds":1111,"text":"50 50 and like how much does congestion costs controls like how how people distribute themselves I'm sorry amms are","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1111s"},{"start_seconds":1117,"text":"the same way if I have four tokens um and you know I have these edges that can be","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1117s"},{"start_seconds":1125,"text":"built it turns out that these people doing this Mev there's a thing called sandwich attacks which we can explain I don't know if that's worth explaining I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1125s"},{"start_seconds":1133,"text":"don't know we can we can yeah it's it's sort of this idea that I put in five dollar five tokens I'm supposed to get five dollars back at","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1133s"},{"start_seconds":1141,"text":"450. and and the way it works is basically any trade you you put in you say okay I'm putting in five tokens but","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1141s"},{"start_seconds":1149,"text":"I don't want to move the price more than ten percent and I say the percentage but let's suppose someone whose strategic notices that actually if they put me","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1149s"},{"start_seconds":1158,"text":"first in the block I'll only move the price five percent then they add another transaction so this is say attack they call it a sandwich attack it's not","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1158s"},{"start_seconds":1166,"text":"really I I find it hard to call these things attacks they're they're sort of like it's a sandwich trade it's like you're a bad dumb user like you should have been bidding in the auction for the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1166s"},{"start_seconds":1175,"text":"same spot but like you're willing you know that that's what you get for being unsophisticated um and just saying order books are better","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1175s"},{"start_seconds":1184,"text":"I'm not I'm not Anatoly so right so this guy adds in a trade that pushes the the cost at five percent","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1184s"},{"start_seconds":1194,"text":"we put in my trade which pushes the cost up five percent and then the attacker sells the trade sells back","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1194s"},{"start_seconds":1202,"text":"uh so attack ourselves back their their amount that they put in and so this sequence of Trades can be profitable","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1202s"},{"start_seconds":1210,"text":"um so they they pushed the price up in front of me I get a worse price I get less tokens out and then they sell right after me and as long as they can guarantee these are executed in that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1210s"},{"start_seconds":1219,"text":"order they can take advantage of me now the interesting thing about this example is the sandwich attacker is adding this congestion Epsilon yes in some sense and","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1219s"},{"start_seconds":1228,"text":"what actually is kind of a very non-intuitive thing is that without the sandwich attacker there's some scenarios","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1228s"},{"start_seconds":1235,"text":"where based on the different relative liquidities of this where actually you have a worse cost for executing end trades over this network than you do if","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1235s"},{"start_seconds":1244,"text":"you have the sandwicher so the sandwich are actually they cause congestion but they kind of in the in in the same way they make people's routing go back more","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1244s"},{"start_seconds":1252,"text":"optimal so there's this trade-off between like yes the users who take that edge are getting sandwich getting a worse price but the overall flow across","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1252s"},{"start_seconds":1260,"text":"the network can be better and there's a trade-off be congestion and routing costs so but but usually this kind of","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1260s"},{"start_seconds":1266,"text":"trade is is uh a taunt Atomic and so like even if it is like if it sounds","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1266s"},{"start_seconds":1273,"text":"like let's say my trade is you know A to B to D plus a to c to D in one","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1273s"},{"start_seconds":1281,"text":"transaction yeah and so you're saying that like they've done this on like b a b and","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1281s"},{"start_seconds":1288,"text":"on AC for example yeah and then sold it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1288s"},{"start_seconds":1295,"text":"that's still in some cases that it's not always true yeah it's just that there are examples where if this thing is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1295s"},{"start_seconds":1303,"text":"actually sort of low liquidity but these are higher than you and there's some ratio between how much liquidity is here","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1303s"},{"start_seconds":1311,"text":"you you can basically get the scenario where the sandwich actually helps avoid people taking the low liquidity path because the sandwiches profit is highest","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1311s"},{"start_seconds":1318,"text":"on the low liquidity path so people's routing changes around I see I see but this is like presumably when when somebody does doing the search they","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1318s"},{"start_seconds":1327,"text":"should probably try to predict how much they're going to be I mean instructors someone's doing the search if they were if there were a way to do this in","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1327s"},{"start_seconds":1335,"text":"ethereum you can't do this but I think if in anything where you have multi-transaction flash loans yeah you could actually just flash borrow B and C","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1335s"},{"start_seconds":1344,"text":"add liquidity here and then actually make the path cheaper but you'd have to do inject the flashlight inside the atomic thing","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1344s"},{"start_seconds":1351,"text":"it would be annoying so you have to do this multi-transaction Mev of like flash loan execute trades unflash loan right and it's hard to compress those","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1351s"},{"start_seconds":1360,"text":"atomically but if you could do that well if you had resources for example that are multi-blocks with some guarantee","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1360s"},{"start_seconds":1367,"text":"yeah then you then you could actually just never have any of these types of problems and just assuming there's like a flash loan of old place capability","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1367s"},{"start_seconds":1374,"text":"yeah yeah this is actually something we we wanted to do because our stuff is always multi-block anyway right and so we've been thinking how to have like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1374s"},{"start_seconds":1382,"text":"pretty much resources or walls where you actually walk me through how the design of the how that how how do you guarantee kind of atomicity we don't","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1382s"},{"start_seconds":1390,"text":"over these each each contract is almost its own chain or its own roll up or its own sub chain or its own power chain or","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1390s"},{"start_seconds":1397,"text":"its own like we'll name it even within the chain what I'm saying is but wasn't it well that's the point we don't have like each con so let's say you have","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1397s"},{"start_seconds":1406,"text":"um like uni swap so on near uni swap has all the pairs in","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1406s"},{"start_seconds":1415,"text":"one contract okay and so then what's called refinance and so then all the trades are just linearized around that but if you want to do anything else like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1415s"},{"start_seconds":1423,"text":"for example actually send tokens to the user that is done in the next block so the token itself like you know usdt","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1423s"},{"start_seconds":1433,"text":"dot near or whatever it's called is did like you actually send you deposit money in one block then you do a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1433s"},{"start_seconds":1441,"text":"trade and then you withdraw you know I mean in a way but you can't do that all in the same block no okay","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1441s"},{"start_seconds":1449,"text":"because the each cross country call happens in the uh the cross contract column is the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1449s"},{"start_seconds":1456,"text":"token.transfer call yeah for usd2 yeah exactly yeah so it's all based on callbacks you're always calling the uh like it's almost it's message passing am","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1456s"},{"start_seconds":1464,"text":"I guaranteed my callback doesn't revert like what happens on reversion uh you get a call back you get a cup but then you have to wait another block right for","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1464s"},{"start_seconds":1473,"text":"that callback to have the exception does the exception ever take more than a block no space you can guarantee you guarantee that well they have gas limits","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1473s"},{"start_seconds":1480,"text":"so I mean you can write some code that will run out of the yes yeah but yeah so you kind of need to guarantees uh like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1480s"},{"start_seconds":1488,"text":"if someone can't make an exception that throws an exception call back and like has this chain of like if they wanted to","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1488s"},{"start_seconds":1496,"text":"grief you because you're paying the gas for that uh well it says the user Pace like the whole transaction is paid by the user right right the user would but","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1496s"},{"start_seconds":1504,"text":"the user could trigger this chain of exceptions that it keeps calling back in no no there's a limit for one time there's a fold the whole thing transactions okay yeah yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1504s"},{"start_seconds":1513,"text":"so how would you do flash loans in near you don't okay so I mean you would have a uni swap having a flashlight capacity","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1513s"},{"start_seconds":1521,"text":"or this is what we're thinking to have volts so volt would be something that travels like that's on the runtime level and it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1521s"},{"start_seconds":1529,"text":"travels between contracts and it can and it has guarantee similar callback guarantees pretty much as uh so you would like program a vault","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1529s"},{"start_seconds":1537,"text":"like you say it's either settles in this way or gets returned right and so you package whatever resources you want in the world and if","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1537s"},{"start_seconds":1546,"text":"it gets returned it has a per do you have like a per block gas spend on The Vault like as it goes through each yeah you pretty much will like program","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1546s"},{"start_seconds":1554,"text":"but like you pretty much vote will be like a piece of programmable data that travels around right so right now data travels around without like with with","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1554s"},{"start_seconds":1562,"text":"just a global but like what if you actually can program it so that it can execute so so actually maybe this is this is a good analysis question so like if we were to do a sandwich attack on","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1562s"},{"start_seconds":1571,"text":"near how what's the number of what's like if I drew like you know block height h block height a plus one Blockhead h plus two well so right now I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1571s"},{"start_seconds":1580,"text":"mean depends on how like so can I like batch the transfers like yeah you can deposit everything trade","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1580s"},{"start_seconds":1588,"text":"everything and then withdraw everything because like say the attacker first does their trade they say transfer a to the unisoft contract this one says transfer","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1588s"},{"start_seconds":1596,"text":"B the users yeah so you can do that in one block you can do that in one block yeah okay so but like an attacker would just already have all the all the deposits on","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1596s"},{"start_seconds":1605,"text":"on the contract because you can have your internal balance on this contract you don't need to oh I see I see I see so what would","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1605s"},{"start_seconds":1613,"text":"have just already transferred yeah it just put all the money in and then and then just when you see somebody executing you just try to execute around them you execute in the same block then","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1613s"},{"start_seconds":1622,"text":"yeah yeah that's linearized okay okay yeah so within this you can have many many like call executions pretty much","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1622s"},{"start_seconds":1629,"text":"happening within one block um are those that but I forced some serialization around them right yes and so this is and this","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1629s"},{"start_seconds":1638,"text":"is where the fun starts so so each contract is its own quote-unquote like chain roll up whatever but then they get","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1638s"},{"start_seconds":1645,"text":"batched into like actual shards physical shards which are actually I mean semi-deterministic and then and the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1645s"},{"start_seconds":1652,"text":"cross-contract calls are getting batched and received from different shards and also like deterministic but uh","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1652s"},{"start_seconds":1660,"text":"kind of determined by a previous block how do you guarantee that the validator executes the Callback correctly on the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1660s"},{"start_seconds":1668,"text":"next block like are they that's right yeah that's just invalid State tradition okay so like pretty much the way it works uh so this is a block right so","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1668s"},{"start_seconds":1677,"text":"within the blogs there's chunks yeah or shards and then you have transactions here","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1677s"},{"start_seconds":1684,"text":"and so this produces we call them receipts but this is just uh cross-contract calls and so they're","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1684s"},{"start_seconds":1691,"text":"getting included in the beginning of the next so these things will get included all right so there's like actually two parts there's transactions with the block","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1691s"},{"start_seconds":1700,"text":"header of the previous block includes the set of things that must be called yeah first or something yeah and so like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1700s"},{"start_seconds":1707,"text":"how can you is it possible that the number of these things have to get called here take up the entire next block it yeah so there's like some there's always some limit to include","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1707s"},{"start_seconds":1715,"text":"more transactions but yeah so there's a queue pretty much been built and it may take some time to like undo it yeah like I mean the user doesn't actually have","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1715s"},{"start_seconds":1724,"text":"that so like Suppose there was like a order book yeah and I had a liquidation from a lending protocol that took out","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1724s"},{"start_seconds":1731,"text":"the whole order book it's possible that if I wanted to like trade on that order book I submit a transaction I'll be behind you know like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1731s"},{"start_seconds":1741,"text":"uh is there a bound on that time before or like is there a bound on the space per block that's taken by the previous callback yes yeah yeah so there's some","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1741s"},{"start_seconds":1749,"text":"space always for new transactions to come in but uh okay so that's where you have some nav so if I if I know the the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1749s"},{"start_seconds":1757,"text":"the the the the new transaction space yeah let's say I know there's a liquidation let's say I'm the Liquidator so I caused the liquidation happen and","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1757s"},{"start_seconds":1764,"text":"then I want my orders to get filled I will just like add a new new kind of like order so the order book such that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1764s"},{"start_seconds":1772,"text":"oh these these some of these have to get executed in this block right yeah non-zero number like like if I look at let's say this is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1772s"},{"start_seconds":1779,"text":"like box based as like there's some percentage that is callbacks from last block yeah or like receipts yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1779s"},{"start_seconds":1788,"text":"before and how much and some new transaction yeah what's the ratio uh I mean so there's a limit on the whole block yep","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1788s"},{"start_seconds":1796,"text":"and then there's a uh minimum percentage for this I don't remember what it is but like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1796s"},{"start_seconds":1804,"text":"then then usually it's you know less than and so it fills in with the rest yeah this is an interesting way of manipulating a t-rop Oracle so another","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1804s"},{"start_seconds":1812,"text":"form of Mev is like let's say you have a unisoft transaction and there's a you know someone's using it as an oracle","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1812s"},{"start_seconds":1820,"text":"price like they're marking a loan on another contract um if you bought up if you basically changed the price on use up so you paid","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1820s"},{"start_seconds":1828,"text":"to move the price up for a certain amount of time you you will somehow keep adding trades here that are callbacks and you'll have","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1828s"},{"start_seconds":1836,"text":"to add some new transactions yeah um so yeah you can pretty much like try to push up the price and while this gets I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1836s"},{"start_seconds":1845,"text":"guess there's yeah more stuff scheduled to execute yeah right right yeah that's kind of interesting and this this","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1845s"},{"start_seconds":1853,"text":"callback Mev I don't think anyone's ever talked about it but it clearly exists that like so how does this ratio get chosen is that governance or is that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1853s"},{"start_seconds":1861,"text":"yeah it's a configuration so values have to vote on change to it yeah have you seen people taking advantage of","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1861s"},{"start_seconds":1869,"text":"this like in this way like not just right now I think the yeah there's some sandwiching that happens but it's also","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1869s"},{"start_seconds":1877,"text":"hard because let's say well the sandwiching is capital inefficient here because you can't flash like you can't really flash on your sandwich well you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1877s"},{"start_seconds":1885,"text":"can on a specific protocol Implement like uh application implementation that has internal balances okay so so you're saying the Utah contract I could put it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1885s"},{"start_seconds":1893,"text":"has yeah well so unislope contract is almost like it's its own chain where you can deposit money trade and then withdraw money right yeah like that's why like they are extra chains right","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1893s"},{"start_seconds":1901,"text":"yeah and you can do it in one transaction but obviously it's less efficient than if you deposit do a bunch of Trades and withdraw right but can I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1901s"},{"start_seconds":1909,"text":"can I flash and borrow as my deposit and then do the trades and then flash close uh assuming it's profitable not there's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1909s"},{"start_seconds":1917,"text":"no implementation in the current but in in theory yeah interior could okay that that should someone should do that that actually I feel like that would just","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1917s"},{"start_seconds":1924,"text":"make this process more efficient yeah yeah uh yeah interior because like this contract actually has a lot of liquidity itself so it actually can borrow like well actually it doesn't it doesn't even","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1924s"},{"start_seconds":1932,"text":"need the real money yet you can actually literally print the money because it will be within one one yeah all fits execution yeah exactly","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1932s"},{"start_seconds":1940,"text":"exactly it should it should you should be able so this is an interesting question in a protocol like near where I can think of as like each app is almost","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1940s"},{"start_seconds":1949,"text":"effectively its own chain although there's some sequencing there's still there's yeah there's so there is a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1949s"},{"start_seconds":1956,"text":"a pretty much synchronization that happens right that's that's really what it's like our point was if it's completely async right which was like a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1956s"},{"start_seconds":1963,"text":"lot of original sharding designs it becomes like completely unmanageable right right because like as a user you now have no idea what's going on I mean you already still do have the little you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1963s"},{"start_seconds":1972,"text":"have some yeah you have something like the user you need to like like the the wallet needs to basically like resend if it doesn't make it into the if like if","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1972s"},{"start_seconds":1980,"text":"you're on high priority let's say you get into the Callback but you have no clue whether you'll be in the next block or five blocks away you have to keep layering new orders and try to get into","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1980s"},{"start_seconds":1989,"text":"this um yeah I mean it's actually kind of interesting to think about what the uh","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1989s"},{"start_seconds":1996,"text":"because in a way this is this is a more optimized version of a multi-chain world right like if you think of it like this","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=1996s"},{"start_seconds":2004,"text":"is yeah each thing is mode chain world it's just you have kind of a single right Machinery to do with it but like you have this problem across like say you have Cosmos with IBC you have the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2004s"},{"start_seconds":2013,"text":"same type of thing right you have like things send you know sending money between you can trade you can withdraw and so like a multi-chain mov that's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2013s"},{"start_seconds":2021,"text":"what neroes already have right so what uh uh what kind of so so one interesting thing about multichannemuv another","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2021s"},{"start_seconds":2030,"text":"another kind of funny little allegory this one this one again I'm trying to do all the ones that don't need an email","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2030s"},{"start_seconds":2037,"text":"um this one doesn't really actually just I was thinking about this yeah so actually is this if this contract is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2037s"},{"start_seconds":2043,"text":"refinance adds A Primitive specifically for sandwich attacks yeah where you can","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2043s"},{"start_seconds":2049,"text":"lit you literally say I'm gonna borrow X","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2049s"},{"start_seconds":2056,"text":"trade like a to b or whatever some set of executions and then whenever somebody else trades this I'll return it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2056s"},{"start_seconds":2066,"text":"this changes the the the dichotomy of this unisol pool right it's like let's just say we have you know R1 R2 which is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2066s"},{"start_seconds":2074,"text":"like the reserves well what are you borrowing when you're flash borrowing well you're borrowing one side of this so you're actually changing the price slightly yeah you literally just say I'm","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2074s"},{"start_seconds":2083,"text":"gonna drop the but then but then this contract can just do it himself they can just give everyone the minimal price the minimal like whatever the price that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2083s"},{"start_seconds":2091,"text":"user said the minimum they will be fine with it can just give it to that and take all the money to itself right doesn't do that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2091s"},{"start_seconds":2098,"text":"that's a great question you should ask them why their token doesn't no no but like whatever unit swap just did that like it will always give them whatever","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2098s"},{"start_seconds":2105,"text":"minimum price or or fail sure so that's what the like penumbra type of thing does when they do batch","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2105s"},{"start_seconds":2114,"text":"auctions yeah effectively you could do it on the single transaction level they just do it on a mini transaction level","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2114s"},{"start_seconds":2121,"text":"um but if we're talking about like generally yeah yeah yeah yeah having the contracts themselves of course that yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2121s"},{"start_seconds":2129,"text":"because then people will like actually optimize this because right now it said like the five percent the problem is we're ignoring one user","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2129s"},{"start_seconds":2137,"text":"here which is the liquidity provider and they are losing out on this potentially but no but the contract can make money for liquidity Provider Services like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2137s"},{"start_seconds":2145,"text":"they can split the profit right right they have to say in a way in a way like right now you have this like you know you get","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2145s"},{"start_seconds":2153,"text":"I was like you know there's there's a price curve right like this and you're saying you know if you if you're buying then the price goes up if you're selling","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2153s"},{"start_seconds":2161,"text":"and the price goes up down but the reality is you can just say this is like you will you'll be going from here","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2161s"},{"start_seconds":2168,"text":"instead and this is your yeah the problem is the language that you design trades in unisoft doesn't","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2168s"},{"start_seconds":2175,"text":"give you a price you just say the language is trade size and slippage limits exactly it doesn't give you a price that you pin to yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2175s"},{"start_seconds":2184,"text":"um if you added the price you could sort of do this provided that like it is true this is sort of sort of like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2184s"},{"start_seconds":2191,"text":"adding like stop loss orders exactly well yeah well it's it's more like when when you trade you just say like I want","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2191s"},{"start_seconds":2200,"text":"I trade A to B and I want at least acts of B yeah yeah well which is how slippage units are","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2200s"},{"start_seconds":2209,"text":"defined exactly this is this is how and so you just get all these the X yeah yeah and","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2209s"},{"start_seconds":2217,"text":"so so the problem is the user might their transaction might fail many times because like someone but but this is true right now too if when somebody's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2217s"},{"start_seconds":2225,"text":"front running hopefully yeah yeah as long as you can enforce it so if if there's efficient value extractors like flashbot they you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2225s"},{"start_seconds":2234,"text":"will always get X yeah otherwise they're not efficient and they can extract more so so in reality you're already getting this except the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2234s"},{"start_seconds":2242,"text":"money are go to whoever runs Searchers instead of right LPS","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2242s"},{"start_seconds":2249,"text":"so why don't swap protocols just give it to a piece and their token holders","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2249s"},{"start_seconds":2258,"text":"they have that they could I guess the the weird thing about this borrow this like hey I'm I'm gonna take some of the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2258s"},{"start_seconds":2265,"text":"reserves and like use it to do the sandwich Taco sandwich is that it doesn't work at very low liquidity so like it long tail assets","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2265s"},{"start_seconds":2274,"text":"are fucked um but then it also like doesn't work for really large trades because they will like wipe out it'll have to borrow so much of this that will push the price","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2274s"},{"start_seconds":2282,"text":"like there is this trade-off between between like how much you're willing to borrow to do the sandwich versus like the trade size and it's unprofitable in some cases but you're right that you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2282s"},{"start_seconds":2291,"text":"could do it just on the trades it's guaranteed profitable for LPS yeah um so it just solved the MV is that no","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2291s"},{"start_seconds":2300,"text":"no there's other parts no I mean not this this is the sandwich we just saw sandwich text s pretty much all all deck all amms should just always return","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2300s"},{"start_seconds":2309,"text":"whatever minimum user said and make money for LPS yeah that's definitely true they should just sandwich themselves I mean people","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2309s"},{"start_seconds":2317,"text":"have made these I mean these uh uh MMS have done that but for some reason they've never been able to get liquidity because there's there's this","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2317s"},{"start_seconds":2325,"text":"like liquidity beginning liquidity effect of like people's wallets are already routing to you if like yeah I'm not I mean there's Network effects there's Network effects yeah but like I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2325s"},{"start_seconds":2334,"text":"think somehow so so so you actually talked about like originally and I know you wanted to uh flip another topic but the you know defining kind of it's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2334s"},{"start_seconds":2343,"text":"through maximum permutation yeah but like things like twap and other stuff that takes multiple blocks actually not","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2343s"},{"start_seconds":2350,"text":"that yes I guess so so it's really the the the the the the the the thing here is Max or permutations Max over","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2350s"},{"start_seconds":2359,"text":"transactions you can add Max or transactions you uh uh","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2359s"},{"start_seconds":2367,"text":"um such that you know the sum of all the transactions is less than the block limit","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2367s"},{"start_seconds":2376,"text":"but there's also a context of like you've been can be doing this for multiple blocks yeah yeah you you again","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2376s"},{"start_seconds":2383,"text":"that's true then you need to make sure this block limit thing takes advantage of that of value of mempool yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2383s"},{"start_seconds":2391,"text":"um so yeah so it is it is expensive I do think these um the amount people have","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2391s"},{"start_seconds":2400,"text":"so one question you might say is like suppose I gave you a flash loan that let's say flashbots offered a service where they lend you collateral over a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2400s"},{"start_seconds":2408,"text":"block so let's say you're a Searcher so a Searcher is a strategic user who who does a sandwich or does a liquidation whatever","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2408s"},{"start_seconds":2416,"text":"flashpot says hey we'll lend you 1 million you can do a bunch of transactions we just but we'll only it'll only be valid if we get back at","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2416s"},{"start_seconds":2425,"text":"least one million plus plus some interest reward yeah right uh but but you can buy arbitrary amounts in a block now you could imagine just","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2425s"},{"start_seconds":2434,"text":"doing that repeatedly and the cost of this t-wop attack just went down dramatically right so the question is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2434s"},{"start_seconds":2442,"text":"this is actually incentive compatible for the auctioneer because it's actually better for them to be lending you money right because they don't they actually","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2442s"},{"start_seconds":2448,"text":"don't earn any yield on right now yeah because I mean yeah right and for them this is free interest so the question is at what point does it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2448s"},{"start_seconds":2458,"text":"become does all the value go from the Oracle LPS to the auction and my suspicion is in the long run the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2458s"},{"start_seconds":2466,"text":"validators always hold the keys and they can all literally and they can literally always do this and there's no reason for them not to and if you're","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2466s"},{"start_seconds":2475,"text":"accelerationist validators should be selling these types of services but shouldn't vow they just be the oracles then because I hold the keys","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2475s"},{"start_seconds":2484,"text":"anyway yeah yeah exactly may as well just they should actually provide the data yeah yeah so uh eigenlayer which is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2484s"},{"start_seconds":2491,"text":"like this thing for eth2 for restaking so what it is is like let's say I'm an E2 validator I've staked 100 East","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2491s"},{"start_seconds":2499,"text":"and someone is like hey I'll pay you five percent a year if you take your 100","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2499s"},{"start_seconds":2507,"text":"Ethan these two and you restaked it in my Oracle protocol so what that means is I if I draw it it's like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2507s"},{"start_seconds":2515,"text":"I have my 100 East I deposited into staking contract","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2515s"},{"start_seconds":2523,"text":"and now have a hundred steak teeth I'll cut SC this is separated from STS because that's slightly different","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2523s"},{"start_seconds":2529,"text":"and what um what restaking does instead it says hey put your 100 Heath in the Oracle contract","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2529s"},{"start_seconds":2537,"text":"that will actually take it underneath yes and the Oracle deposits it there and then when you so so so the the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2537s"},{"start_seconds":2545,"text":"withdrawal address that the main protocol sees","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2545s"},{"start_seconds":2550,"text":"he's Oracle is the Oracle but the Oracle is a smart contract that guarantees that when you call withdrawal it atomically sends you back yeah so now you basically","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2550s"},{"start_seconds":2559,"text":"get this pass-through where you can earn extra interest as the validator by basically delegating your stake to a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2559s"},{"start_seconds":2566,"text":"contract that does good part put it in the main network but then also earns fees from you know whatever people calling the oracle","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2566s"},{"start_seconds":2574,"text":"so there's a sense in which that's the way I think that all of these services and validators could offer like like lending","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2574s"},{"start_seconds":2582,"text":"you could basically make a lending protocol like this um that where where the amount that's allowed to be lent effectively is like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2582s"},{"start_seconds":2592,"text":"the the the protocol say it takes so let's let's suppose we had a lending protocol version of lend they take 95 each","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2592s"},{"start_seconds":2600,"text":"and restake and they take five eth and put in the lending pool and the idea is maybe this is getting you you know seven percent","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2600s"},{"start_seconds":2608,"text":"fixed and the loans are getting you like five to ten percent variable right and like you can choose how much you want to do","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2608s"},{"start_seconds":2616,"text":"that yeah and then you would have then the validator would have the capital to like do this to that Glenn yeah but then the t-bop Oracle completely is ruined","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2616s"},{"start_seconds":2624,"text":"but but like what I mean but you know if they go further we just go to add this in on the protocol level where this I mean you could add these as Services","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2624s"},{"start_seconds":2632,"text":"directly yeah and then you can which I think is any amount of anything right","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2632s"},{"start_seconds":2642,"text":"you just borrow any amount like infinite amount of anything if you return more of it hey hey you win 64 has a max button","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2642s"},{"start_seconds":2650,"text":"well you 256 to begin also uh you can borrow as much as","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2650s"},{"start_seconds":2659,"text":"the limit of the of the integers yes um but like I think this is actually what","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2659s"},{"start_seconds":2668,"text":"will end up kind of defeating a lot of like on-chain trading as oracles like I think there's there's a lot a lot of","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2668s"},{"start_seconds":2676,"text":"people trying to build lending protocols they use Hue operacles and the moment validators start doing and like eth has already gone this way proposer Builder","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2676s"},{"start_seconds":2684,"text":"separation sort of screws over a lot of these um things that want to use t-ref oracles yeah so you might as well just shove it into the validator yeah there was no","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2684s"},{"start_seconds":2692,"text":"attacks yet on all the stats that depends on two up I think right now the validators can do whatever right like there have been a couple and most of","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2692s"},{"start_seconds":2701,"text":"them actually just have to do with people's using bad t-rep settings okay because like obviously they make the window Too Short it becomes really cheap","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2701s"},{"start_seconds":2709,"text":"they're really easy yeah um and so like yeah I I think uh another another kind of interesting","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2709s"},{"start_seconds":2716,"text":"liquidation game to consider is uh oh yeah sorry oh yeah cross chain um cross chain our cross chain auction","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2716s"},{"start_seconds":2724,"text":"design so this is something I'm working on now and it's formalized formally but like there's one example in there that's kind","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2724s"},{"start_seconds":2732,"text":"of interesting so suppose we have two chains chain X chain y","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2732s"},{"start_seconds":2739,"text":"and there's a amm here that is trading X versus synthetic y","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2739s"},{"start_seconds":2750,"text":"and there's something here trading synth X y","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2750s"},{"start_seconds":2758,"text":"okay so let's suppose the price here is P0 the price here is P1 P0 is less than P1","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2758s"},{"start_seconds":2766,"text":"let's suppose that there's validators no I should let me draw them as a little stick","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2766s"},{"start_seconds":2775,"text":"figures there's validators same validators of people they might not be the same they might be","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2775s"},{"start_seconds":2783,"text":"the same who knows and they can do one of three auctions one sell the Arbitrage so like you know","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2783s"},{"start_seconds":2793,"text":"tradex for since y go to Y redeem it trade y for syntax go across back so","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2793s"},{"start_seconds":2800,"text":"you can price the auction price the bundle in x","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2800s"},{"start_seconds":2809,"text":"price bundle in y I'm prize both or sell the legs separately yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2809s"},{"start_seconds":2817,"text":"and depending on the liquidity and the gas cost model when you do this trade here","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2817s"},{"start_seconds":2824,"text":"if you'd bid on them separately you're actually bidding on how much you're going to change your gas cost here because you're actually pushing down the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2824s"},{"start_seconds":2832,"text":"price why so if there's this price difference is really big then you actually can as the auctioneer earn higher Revenue by pricing separately","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2832s"},{"start_seconds":2841,"text":"versus pricing in one or the other and this is the type of stuff I think that like makes this cross chain Mev stuff much more complicated it's like actually sometimes the auctioneer should be","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2841s"},{"start_seconds":2849,"text":"offering you very different sets of bundles bidding languages well I mean this is where you like ideally you have some options that you can buy to like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2849s"},{"start_seconds":2857,"text":"yeah yeah yeah yeah sure sure I mean like Azure latency I'm saying like that there's certainly hopefully that but I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2857s"},{"start_seconds":2865,"text":"for a lot of coins that's not true right well I mean so this is I think one of the interesting things in general from for any multi-chain stuff is can you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2865s"},{"start_seconds":2873,"text":"because like there's a latency you know L that exists here and so what you want you want some options for like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2873s"},{"start_seconds":2881,"text":"2L plus you know some Epsilon that will guarantee you whatever you're doing here yeah and so having like a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2881s"},{"start_seconds":2889,"text":"facility that gives you such options like efficiently priced again this is another thing that validator should be selling you yeah especially if others","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2889s"},{"start_seconds":2897,"text":"are trying to cross all the chains right so so exactly so the difference in value so in a sort of no Arbitrage World which","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2897s"},{"start_seconds":2906,"text":"is obviously somewhat idealistic but it's not that idealistic because the validators if they're issuing the options it should be no Arbitrage like like by almost otherwise they fucked up","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2906s"},{"start_seconds":2915,"text":"that means that they're they wrote their code wrong uh then in that case if there are options these three should all be priced the same because these two will","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2915s"},{"start_seconds":2924,"text":"include options yeah right but but my point is right now that if you just look at the dexes that there's the the way","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2924s"},{"start_seconds":2931,"text":"muv is extracted is kind of um is is actually the the way people are designing how you bid on these things","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2931s"},{"start_seconds":2939,"text":"changes their revenue and I don't think anyone's very much solved that problem","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2939s"},{"start_seconds":2946,"text":"yeah I mean I think that there's an interesting like if we're talking about validator right like right now they're just running like a regular node yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2946s"},{"start_seconds":2953,"text":"and so already with flashbots that is like you run something that like uh you know proposes blocks yeah sidecar","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2953s"},{"start_seconds":2960,"text":"proposes block so the question is like should this be kind of a standardized facility to allow like for kind of","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2960s"},{"start_seconds":2968,"text":"customization of the almost like a block like block logic right like for you know","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2968s"},{"start_seconds":2976,"text":"flesh mints and kind of all these things and I think that's that's inevitable this is this is this is the direction I think all the cosmos Mev stuff is moving","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2976s"},{"start_seconds":2984,"text":"this direction and I'm gonna guess near Mev will move in this direction this is where it's different than these because eth is doing first proposer Builder","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2984s"},{"start_seconds":2991,"text":"separation which kind of complicates doing these sidecar things and because the block so the proposer is the person who it gets drawn from the stake","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=2991s"},{"start_seconds":3000,"text":"distribution the Builder is the person who proposes a block and so you have this auction where the proposer is given a bunch of blocks","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3000s"},{"start_seconds":3007,"text":"they can't see what the transactions are but they're bidding on you know a particular block so it's like no they're just picking whatever who pays them more","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3007s"},{"start_seconds":3015,"text":"pretty much and they they just they should be but I mean there's some weirdness here in that and I don't know why flashback people don't believe this but like the proposer and Builder could","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3015s"},{"start_seconds":3023,"text":"easily collude by being the same person uh so there's like Builders who propose the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3023s"},{"start_seconds":3032,"text":"number of Builders propose a block it was a block which is why it's confusing yeah with the six proposers to propose a block correct and then and then the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3032s"},{"start_seconds":3040,"text":"the validator let's just call them is the one who actually picks and so like naturally I mean ideally they should pick whatever is a pays them the highest","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3040s"},{"start_seconds":3048,"text":"yes but they can if they are the builder then they just there's something they're just lazy well they might want to choose the cheaper one because they have a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3048s"},{"start_seconds":3056,"text":"bunch of their own well there's a yeah there's like extracted value here which is higher than this price and so this again gets at this fact of like Fair","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3056s"},{"start_seconds":3065,"text":"ordering is fucking stupid like this thing will never be compatible with this idea that there exists some Global like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3065s"},{"start_seconds":3072,"text":"Kenneth Arrow won the fucking Nobel Prize for proving this impossibility theorem for ranked voting and like somehow we still want to like shove our shove ourselves into like pretending","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3072s"},{"start_seconds":3080,"text":"that that's not just like a fact of reality uh since there's no fairness sorry for destroying your world there's no","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3080s"},{"start_seconds":3088,"text":"difference there's a trade-off of fairness yeah there's a big problem with machine learning too right now big problem in both machine learning and crypto so like I actually think that's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3088s"},{"start_seconds":3096,"text":"that's where the intersection of research is I mean that was like the fairness thing of like how much fairness do you trade off for accuracy slash cost","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3096s"},{"start_seconds":3104,"text":"and latency and like yeah very hard problem but well that's yeah that's why there's but I do think people will make","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3104s"},{"start_seconds":3111,"text":"a node where there's sort of like a DSL or that like lets you like say hey I'm going to use this mainnet contract as my","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3111s"},{"start_seconds":3118,"text":"restaking mechanism and like you deploy these contracts like Oracle lending whatever that basically guarantee the execution for the validator","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3118s"},{"start_seconds":3126,"text":"yeah but well I don't think you need the restaking contract you just literally have some you just say like there's a facility of like pre-block plus block","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3126s"},{"start_seconds":3134,"text":"logic yeah that everybody just the whole blockchain just votes that we're gonna accept yeah this piece of code to run","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3134s"},{"start_seconds":3142,"text":"and like in Cosmos it's like everybody does that all the time well I think the restaking thing's kind of important because you yeah yeah I know the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3142s"},{"start_seconds":3149,"text":"pre-block post block header thing there is like a little bit that makes sense but I think like in Cosmos they just have that like they literally have that","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3149s"},{"start_seconds":3157,"text":"two pieces of I think the interesting thing here is that the Lend contract may actually want to Source liquidity not","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3157s"},{"start_seconds":3165,"text":"from the validators right the Lend contract might just be like hey it's the normal Ave pool yeah and you're just","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3165s"},{"start_seconds":3173,"text":"using the obvious if you don't have just flesh mints if you have flashes and that's what I'm saying like if you have just like facility to do whatever yeah I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3173s"},{"start_seconds":3181,"text":"mean it's that that's where like well it's at cloud and stuff like this but yeah but like generally saying right I mean","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3181s"},{"start_seconds":3189,"text":"this is where like if we have if we had resource programmable resources then you can have a flesh mint in the resource where like in x-blocks it needs to come","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3189s"},{"start_seconds":3197,"text":"back but I guess my question with the design you're saying earlier of like I have to wait another I have to wait each block yeah for the like how does Flash","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3197s"},{"start_seconds":3205,"text":"mitt work because like in Flashman but then the Flashman is stuck oh well yeah so this thing that's what I'm saying is programmable there's like a piece of logic there that says in X","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3205s"},{"start_seconds":3214,"text":"blocks this thing needs to come back and and call this function that will like flash pretty much minted I mean burn it and so what it doesn't matter where this","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3214s"},{"start_seconds":3223,"text":"resource stands up well it's that's that's where the guarantee by the runtime I see I see I see okay so so so in runtime there's a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3223s"},{"start_seconds":3231,"text":"new there's a new pack like a new place where it records all the resources that are there and iterates over there and says like is any of the resources need to come but it also says basically takes","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3231s"},{"start_seconds":3240,"text":"a lock on all these resources exactly yeah this is this is this is this is a mutex of resource that you can travel around this is this is how we were","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3240s"},{"start_seconds":3248,"text":"solving the train and hotel problem yeah and we have not implemented this because it is more complex but actually move is","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3248s"},{"start_seconds":3255,"text":"doing this this is where yeah it gets interesting because move is actually programming language that has the resources already yeah which are like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3255s"},{"start_seconds":3263,"text":"half conditions right I do think the problem with this stuff is like the uniswap style like Global State everyone is shitting in the same pool one day","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3263s"},{"start_seconds":3270,"text":"yeah you know you're executing doesn't work very well here because you have to have many of these running concurrently for each user in some sense which can be","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3270s"},{"start_seconds":3278,"text":"like a pain in the ass so you need to build a stuff to like manage like all the users like State tripsing and like then when there's you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3278s"},{"start_seconds":3286,"text":"know like the same block like you have some rules but this is where like usually something in unisol will just be one chain contract account yeah thing","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3286s"},{"start_seconds":3295,"text":"where you just synchronize everyone trade it and yeah synchronize but I just mean for developers that's quite a bit of overhead if they have to think about","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3295s"},{"start_seconds":3303,"text":"that they want to write fucking JavaScript man they do that's why we have now JavaScript well in JavaScript you do have callbacks","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3303s"},{"start_seconds":3312,"text":"and you know if you're writing this is actually this is literally how microservices work yeah yeah this is like you have each each contract on here is a microservice was a database and it","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3312s"},{"start_seconds":3320,"text":"receives incoming calls and it has callbacks but the question to me is actually more like the lock on the state that's touched like based on how you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3320s"},{"start_seconds":3329,"text":"want it it's a developer okay that's why we want to ask we wanted to add some facility like a standardized log facilities but we haven't is there a way","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3329s"},{"start_seconds":3337,"text":"to like wait can I control whether whether I have a view only resource first mutable resource of like you as a developer can Implement whatever you want you can literally resolve your own","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3337s"},{"start_seconds":3346,"text":"like blocks and everything so okay okay because that yeah that makes this seems like there's more Mev here honestly than there isn't even like I I know all the","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3346s"},{"start_seconds":3354,"text":"move people are like oh we have less mov bullshit like this actually seems like there's way more of like for the resources the locks the sequencing like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3354s"},{"start_seconds":3362,"text":"suppose I have like five resources let's suppose there's State one state two state three and like calculation one calculation two and we have five people","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3362s"},{"start_seconds":3370,"text":"and they that you know let's suppose we you know we have those sort of like complete bipartite graph on this and each of them is taking some path like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3370s"},{"start_seconds":3378,"text":"one that's doing that one is doing that one is doing that and and they have some they have some contention right like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3378s"},{"start_seconds":3385,"text":"they they'll reach the same state the resolution of those contentions is either random but the randomness is not really random","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3385s"},{"start_seconds":3393,"text":"there because it's you know the if you're if you know the validator code you can figure out what the they have to come to consensus on it so there must be some deterministic source of that so you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3393s"},{"start_seconds":3401,"text":"could try to basically simulate ahead the previous the the rules unless you unless you're pipeline it then it's the next block so this this is where like in","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3401s"},{"start_seconds":3410,"text":"our case we actually have we have a one bit of uh like validator can only affect one bit of Randomness right by not producing a block which then actually I","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3410s"},{"start_seconds":3418,"text":"see it perhaps their ability to do anything and and we actually had a fully like fully non-biased vrf uh implemented","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3418s"},{"start_seconds":3426,"text":"but not launched well how come there's no one thing I haven't understood because there's so many benefits to application developers is why no one has","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3426s"},{"start_seconds":3433,"text":"a vrf the application Level because like like to some extent the thing you were describing earlier where we're like hey we will you know we'll we'll let you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3433s"},{"start_seconds":3441,"text":"borrow a little bit yeah before right the contract does it itself is a sort of form of like hey the contract is collecting its own Mev or","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3441s"},{"start_seconds":3450,"text":"like there's application specific Mev but one of the things is like that's not quite easy to do right now and one thing that would make it easier is actually","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3450s"},{"start_seconds":3457,"text":"having just like a vrf you could call in your contract that's tied to the consensus so so we have that because we have because when you submit a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3457s"},{"start_seconds":3465,"text":"transaction it gets included and then it gets executed okay so by the time it gets executed you already had something","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3465s"},{"start_seconds":3471,"text":"that was like a consensus yeah I haven't made like numpy dot random for consensus Randomness like I want to sample","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3471s"},{"start_seconds":3479,"text":"gaussian I want to do the like you can do that on there I know but someone should actually make the library on that because like I feel like that will actually give application developers a","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3479s"},{"start_seconds":3486,"text":"lot even more easier easy control over like avoiding these so you're just saying like oh just give a random amount","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3486s"},{"start_seconds":3494,"text":"back pretty much within the range right but with some distribution like yeah it was it just like well you have you have a slippage and you just say well we're","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3494s"},{"start_seconds":3501,"text":"gonna give you yes random amount yeah yeah well so so we we wrote this paper proving how to get differential privacy","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3501s"},{"start_seconds":3508,"text":"which is sort of like a way of you know you can show for these amms you can't ever give pure privacy even if you had a ZK proof blocking the reserves because","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3508s"},{"start_seconds":3516,"text":"if you see the prices you can always invert the prices because the functions are determined yeah for how they change so the question is how do you add noise","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3516s"},{"start_seconds":3524,"text":"such that you know if I add x x bits of entropy to your trade which change your price by some amount of there's some bits of","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3524s"},{"start_seconds":3531,"text":"Entry to the random price how do I make sure that I I someone can't infer what your trade size was","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3531s"},{"start_seconds":3538,"text":"with more Precision than x but then I also don't move your price more than y right so there's like you know there's","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3538s"},{"start_seconds":3545,"text":"like the trade size space and then there's the sort of you know price and you know I want to add Randomness so","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3545s"},{"start_seconds":3553,"text":"you're in here but then I also don't want this this thing to be related right yeah and so there's this trade-off and if you had different distributions you","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3553s"},{"start_seconds":3560,"text":"can like add noise here with certain distributions to guarantee that this thing is bounded all right well there's a project right there for someone to","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3560s"},{"start_seconds":3567,"text":"build I think the library thing might be first numpy dot random well that's what I mean yeah like I mean because there's a source of Randomness you just need to like then build distributions yeah yeah","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3567s"},{"start_seconds":3575,"text":"you can actually you can just copy it you can actually run them on here right you could just copy that and just make sure it uses the correct to see code so","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3575s"},{"start_seconds":3584,"text":"you can just run this you just need to make sure it gets well the problem is your vrs 256","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3584s"},{"start_seconds":3594,"text":"my point and you probably want 256-bit Randomness so you might want to rewrite those to support u-256 but","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3594s"},{"start_seconds":3601,"text":"I think there's like lots of stuff like this unexplored territory for people all right well lots to build uh there's and loads","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3601s"},{"start_seconds":3610,"text":"to fix with existing protocols so I mean look he didn't think we'd have an hour of Mev content all right awesome thanks thanks tarun","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3610s"},{"start_seconds":3618,"text":"and uh please uh check out all the videos like it subscribe you know the usual YouTube stuff that I don't know","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3618s"},{"start_seconds":3625,"text":"what to do but thank you I mean I'm sure we can talk for like","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3625s"},{"start_seconds":3634,"text":"many hours to be clear like yeah I feel a lot of yeah no it's good","url":"https://www.youtube.com/watch?v=M3SoQfbqd5I&t=3634s"}],"youtube_url":"https://youtube.com/watch?v=M3SoQfbqd5I","url":"https://near-pedia.xyz/videos/M3SoQfbqd5I"}