'The MEV Game on L2: Bots, Users, Sequencers Dynamics' - MEV Panelists
ETHGlobal·Sat, Oct 9, 2021, 12:00 AM
Stani Kulechov (Aave), Georgios Konstantopoulos (Paradigm), David Goldberg (Synthetix) and Barry Whitehat (Ethereum Foundation) talk about block sequencing and validator interactions on L2. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.co Email us at: hello@ethglobal.co
Transcript
i believe everyone is here and georgios actually prepared extensively a set of questions so props to that as well as david from uh tech from synthetics also prepared some notes um that we shared in the agenda uh as well as some highlights uh on their consideration with uh l2 implementation so all of this can be uh can be uh found uh in the agenda so drawer deals go ahead yep so again ko see you again um it would be nice to get uh a quick intro from our panelists uh starting with uh barry maybe is barring around yeah hey joining us i'm here uh yeah so i'm barry i did um a lot of work on l2 stuff and i have done some work on the miva stuff the minor expectable value auctions so i'm excited to chat with the kind of more deaf i focus people and get their opinions on that nice stanley hey everyone i'm stannie kulechov i'm the founder of avi protocol which is a interest rate market on ethereum l1 and now in matic as well i've been building financial decentralized financial applications for a few years now and starting with it lynn back a few years ago mainly i'm pretty much involved in the in the products uh side and also building incentive models and uh also kind of like helping on the uh risk assessment side of and creating the of a risk framework and yeah that's about it nice thank you and david hey everyone i'm david uh so i joined synthetics as a core contributor earlier this year um i first got involved with their project going back to 2018 when they were called haven so they since rebranded i used to i was the founder of a smart contract auditing company called blocktrax and then after that i ended up working on a database company so it wasn't necessarily in crypto and then uh very excited to be back in d5 so i'm looking forward to going over kind of uh we're building a lot on optimism on l2 so uh very excited to share with some of the learnings challenges and and stuff we're really excited about as we move forward i thank you very much so kind of to kick start the discussion it would be nice to hear from stanny and david like some things about what kinds of mev do major defy platforms exposed today i imagine that both ava and synthetics have some things to stay on that maybe starting with stanley yeah sure well two kind of occasions i would say uh usually uh in in occasion of liquidations for example so uh obviously protocol has uh uh we have we have a collateralization system so when you deposit into the protocol uh then you can borrow value out of the protocol against your plateau and and to keep that collateral position uh you you might need to refill depending how the market moves so if it's moved substantially the market decreases you might have to refill the collateral or it might get liquidated and how the liquidation network works uh in other protocol and and pretty much across the whole dfi ecosystem is that uh there's certain type of incentives available for the uh liquidators so whoever actually takes that position and replaces the collateral with the borrowed funds uh will also get a a margin uh for that particular uh transaction now what's interesting here is that uh the liquidators that are uh in in all they are also liquidating other positions in in other protocols as well and and depending on the incentives and because it's an open network everyone is kind of like a finding on getting that particular incentive model and and because these uh some of the assets are uh very volatile in the sense as crypto native as by itself uh what happens is that the incentives are quite uh wide in their uh spread for example and we have a fixed incentive system to kind of ensure that uh when the market decreases substantially uh we have enough liquidators coming and actually fighting to get that uh jersey uh incentive and and this is kind of like an interesting part because many of the uh liquidations actually happens with flash loans which practically means that you might not need upfront capital uh to to do certain type of uh uh liquidation but you can actually flash borrow from the protocol make the liquidation don't use any capital and just collect the spread and this is where the mev actually has its has its own risk i would say and in general what it when it comes to flash loans so other protocol is a flashlight protocol so you can not just borrow against a collateral but you can borrow for one particular transaction with sub-transactions uh doing for example arbitrage uh let's say that you borrow from ave you buy an asset the market one market that's a uni-swap and you sell it in another market hybrid for example and and this is also kind of like a community opportunity where uh the value can be extra extracted by by the miners so at least those two cases are uh something that's very familiar to uh to to us and david yeah so um so if you're familiar with synthetics at all i mean one of the the biggest challenges any d5 protocol faces is getting liquidity in the system and so the way we've designed our our liquidity system is um snx stakers come on to the platform they stake their snx and then they mint uh susd which is kind of the entry point into the synths world on synthetics and so on synthetics we support a number of different synthetic assets anything from you know synthetic and synthetic bitcoin to synthetic currencies you know we have a synthetic oil and there's you know commodities now we've added equities such as you know synthetic tesla and coinbase etc and so how the liquidity for those assets gets created is through the stakers and we have this thing called the debt pool so when people stake debt gets created in the system and when traders come on and they trade let's say you wanted to go from s e to s bitcoin um or i guess lately you'd probably want to go from s b t c to s eth which is pretty exciting you would essentially be trading against the deadpool right there is no like counterparty you're trading peer-to-contract right um and in that sense the um the risk the risk for front-running the risk for people taking advantage of you know price discrepancies and price oracles and stuff like that um the risk is borne by the stakers so it's a little bit of a unique problem that's specific to synthetics um normally if you were you know trading on something like uniswap um the trader would be at risk for for front running and other um you know mev uh risk areas so it's a bit different for us um and so because of that we've had to deal with several challenges around the user experience so this is a big kind of ongoing trade-off between how do you really nail the user experience especially for us as as people come on to do trading different uh with different trading strategies um with uh security and making sure that you know the stakers and the people providing liquidity to the system aren't getting uh taken advantage of and so uh on l1 we had to introduce this thing called fee reclamation which um it has you know obviously the benefit of not being front runnable because we basically when you make a trade you basically have to wait six minutes for the trade to settle and when you wait six minutes we basically are looking for price changes during that period and we'll take those into account um you know whether you you know depending on the price that you get so that the point there is um that hurts from the ux like no trader really wants to wait six minutes for the trade to settle and then also for composability right like if we wanted to integrate with ave it becomes you know challenging because of that that waiting period and so um as we look to move to l2 we're trying to do everything we can to get rid of fee reclamation and feel confident that our system is not and the stakers aren't exposed to unnecessary risk so a couple of the differences between l1 and l2 is on l2 so we're building on top of optimism and there's no mempool um you know on optimism and so because of that that relieves one you know attack vector where people could look at the transactions coming in the queue you know and they can basically say i'm gonna pay a higher gas price and i'm going to basically have my transaction execute before this and so the transactions are just going directly into the sequencer on l2 which is um you know obviously there's there's there's benefits to that the cons of that is that currently optimism is running the sequencer and so there's some centralization aspect to to it in today's um state and so there's been a lot of discussion like carl just gave a presentation on neva and then there's you know uh conversation from chain link around fair sequencing and stuff like that um and those those mechanisms are designed to help bring more decentralization to um the sequencer not being able to order transactions right because optimism has every reason not to shoot themselves in the foot in terms of messing with the order of transactions but once you know the plan is to move optimism away from running the sequencer to bring more de centralization where anyone could run the sequencer but when that happens we have to make sure that they can't you know just order the transactions the way that they want therefore affecting the system so that's one kind of attack factor slash thing we're working with the other area is around price oracle latency and this specifically again is a huge problem for synthetics because the way the deadpool like i explained with the liquidity is structured and so with that some of the things we're doing is we are working with chain link to try to get the deviation threshold down so the way that that works is let's say the deviation threshold on for a chain link price oracle is 0.3 right that means that when there's a move in price that's sorry uh not yeah 30 bips right um so i guess that would be like you know your 0.3 percent and so um if there's a move above that it causes the price oracle to update the price right and so you want that to be as low as possible because that means you'll get more frequent price updates in the sense that there's you know price movement so we're kind of we're working to get those down um another thing we're doing is we're trying to um we have a heartbeat the heartbeat's less relevant as far as the stuff goes but you know the the heartbeat is like if the price hasn't gone above that threshold right there needs to be something that triggers a a new price and so the lower the heartbeat is the better the problem is that it gets expensive right if it's if it's pretty low so we're aiming for like a one-hour heartbeat um and stuff like that um and then i would say the last thing to kind of keep in mind there that's been been something we're trying to do is so we're launching with higher fees than we'd like to have because higher fees you know obviously is not ideal again this is this trade-off between user experience for the traders and everything but it does bring more security because um so for example we're launching with like 75 bips which is a 0.75 percent you know um structure at least that's what we're thinking um and obviously that helps make it so front running is not even worth it right for people and so but we want to bring our goal is to bring that down to like 30 bips you know over time um so those are some other things and then i guess um yeah i mean you know just a fair amount of talking so yeah thank you very much that was very extensive i think that you know people will kind of look back at this kind of segment as a as how mv and synthetics interact with each other on the on the thing that you just said about optimism just to ask the questions by um what do you think about the mv auction so yes you were very early into like designing the mechanism i earlier said some things about like not liking them so much so i wonder what your thoughts are on mev options and how they will define kind of the player to block producer election game oh fun okay so yeah so okay let me just give a little quick introduction to it so i think that like mev is a serious problem and we should do all we can to remove as much mvp as possible but we should also try and mitigate the problem of mbb so i see me by auctions maybe extractable value options as a way of mitigation um so that's kind of what i think what like georgios what are your concerns about it um basically that the it just doesn't solve much in a way you just use it to elect your sequencer and then yes the sequencer of course receives all the mev and then then what well okay so theoretically like because you have this option to elect to the sequencer the value that they're the profit that they're making like the majority of that profit should just be destroyed or else donated to some public goods uh the idea is that like you're although mav still exists in the system what you're doing is you're capturing like some subset of it and and when you're doing that you're kind of reducing the severity of it yeah does that make sense to some extent although it still seems to me that you know having some form of more low level randomization scheme or separation between execution and ordering would be a more robust solution but it seems like that maybe maybe these two are complementary yeah i think we should have both i mean we can dig into this more but i i've also had some thoughts about the random ordering but i'm not sure if that's the direction i want to take it in the panel i mean i think i think i think everybody would be interested in hearing how like random ordering and uh kind of like these mechanisms interact or will affect rather the rest of the d5 ecosystem on layer two so maybe maybe kind of worth scoping down like your thoughts into this uh okay okay cool cool yeah so i'm a little bit con like okay so you do random ordering where like the block producer orders the transactions before they know what they what the transactions are but like there are certain situations where this will be really bad right for example if someone on synthetics or ave is getting liquidated and let's say the reward for that is like a hundred heath then people are incentivized to create like a hundred e's worth of transactions and just randomly put those out there on the off chance that they will get be the first one it turns it into this kind of lottery situation where where you get this like burst of transactions appearing because people know that oh i probably won't get there but if i do it's like winning the lottery so that's for me is one concern of the random ordering i think someone raised that earlier during ellie's talk but i'm not sure if it really got described correctly so i think that like the solution that i prefer is actually the time lock approach where so basically what you do is you say okay here's my order uh i'm going to place this order and it's going to be processed after some time delay and the reason you have to use a time lock is because you don't want people to be able to place orders and then really say that okay i'm not actually going to reveal that order yeah so i i think it's important to do both but i'm skeptical about the random random ordering approach um but i know other people have other opinions on that i'd be interested to hear guys it's interesting you mentioned like the um kind of the the liquidations use case because um so in terms of our roadmap i don't know if you can pull up the second slide um that i had but this definitely becomes relevant if you think about like our what we'll be rolling out um so currently uh we just have staking right on l2 on mainnet um we'll be rolling out um uh exchanging like uh next and then after that shorts shorting um since um and then futures right and futures the way we're designing the system is sort of like perpetuals where you can specify leverage and so once you start to specify you know five times leverage on a position the liquidations become like somewhat tricky and and can be um so i think there is like a potential attack vector kind of like barry was saying there so i think that's that's a pretty interesting thing i'd i'd like to give more thought to one thing one thing i'm taking as well kind of like one solution would be i mean it's kind of like it's it's not an optimal solution because uh in one way and theoretically is that you can you can create governance based permissions for liquidators so practically certain type of liquidators can uh can liquidate uh and and that could be that could be one option that you have have this like permissionless ability that will be one way but then again like we're going against the permissions permissionless nature of the the blockchains and and uh the deliver itself but uh to some extent that can be uh one way to do it especially if you do if you use governance for this kind of solution that might be um pretty pretty interesting another thing chain links talked about in their like fair sequencing stuff that they've been thinking about is um basically encrypting the transactions um so that the content the transaction contents only revealed after the ordering has been agreed on so that that's another kind of interesting thing um it's you know i don't know that much necessarily about it but i know that that's something they've been they've been trying to figure out so yeah so my concern with this approach is that like what you have to do is you have to make sure that people are forced to reveal their order because otherwise what i can do is i can make like potential orders and then refuse to reveal them if it's gonna lose me money so yeah that's my thinking there there has to be some mechanism to force the reveal of the order i agree with that critique yeah exactly it's a free option um maybe moving forward like because we're kind of running on time um when uh like evaluating in the layer two protocol because um standing you have the play deployed yourselves on uh matic and i don't know what the rest of your plans are um and david like you've chosen optimism i wonder did do you take mvv mitigation or you know the strategy of the project um around the mev um into account does it matter what's the what's the deal does that movie matter for you or is it like um like yeah just an extra nice to have maybe starting last time personally and kind of like in in i would say that it matters uh quite a lot because i mean it's a it's definitely like uh like like an issue but when it comes to deployments of a protocol in different let's say site change layer uh their twos and and other maybe blockchains what's kind of like what you usually follow is is pretty much like uh what the community wants to do like what what kind of uh i mean it's not like the the the biggest uh decisive uh thing but also like uh when when we deploy uh contracts into other uh networks like it's part of the kind of like a technicality is that like how how the functioning will be and it's not just the mev but there's other kind of things like how how easy it is to deploy contracts for example i mean whether there's a ebn compatibility and so forth so it plays some factor but but then again uh i somehow see the space now a bit saturated with different kinds of chains and many of the l2 solutions are not super ripe yet i mean it's still kind of like very early but definitely that would be something that affects quite a lot especially if you see more and more issues related to mav and and uh uh incur but i guess like for us the the the most kind of like a key part where it might happen is the liquidations and as as long as most of the liquidations work it's not a problem but the kind of risk is that if if kind of the liquidators incentives are are lost and in that sense the there's less and less liquidators coming into the uh uh spot when you actually need them the most so that's kind of like a the uh problematic part i would say but yeah i mean it's a consideration and but but still it's just part of the the tech we're we're we're looking and assessing when we deployed the protocols yeah i would just say you know i think it's definitely a consideration i think if if i kind of think about like why did we choose optimism um in the first place so um you know the way we kind of looked at it was like how do we mitigate risk as a whole right so obviously you know maybe i mean mev falls in into one category in that but i think the biggest thing for us was like not having to maintain two code bases right using our existing solidity code um and then the way that optimism's been approaching like their ovm is they're trying to leverage as much as possible um from like the evm and like what exists and what's super secure today and so um you know there for example i think they're like compilers like a 200 line diff or something like that right so these are those were all considerations we were taking into account and then you know i think we just really like their team and we're we're really excited about working with them um you know at the same time we're trying to stay we want to be at the the bleeding edge and so i think one question we've been getting a lot is like what's our overall l2 strategy um right so we love we love the optimism team we love what they're doing um i think as things you know continue to change we're certainly excited about like you know just being on l2 in general and making sure that like we're at the forefront of the way like the community is moving um and then again it's just a lot of it's social too right like there's where is the liquidity going to be is something we've been we've been thinking about and trying to figure out and so um you know to me all those things kind of went into our initial like like our main decision and then yeah obviously risk mitigation and this type of stuff is an important factor as well but i think the other stuff maybe even um not to say was like this isn't important or anything it seems like those other things were kind of the things that were dictating you know our decision nice thank you very much david and stanley and barry i think that at this point we're quite over time so i think we can wrap it up here thank you very much everyone tina kartik and the rest and we'll see you around yeah thank you georgios thank you uh everyone on this panel um and uh any uh i guess uh uh i guess summary and next step or open questions from justin or uh and phil kartek uh anyone who's on this call uh as we are uh uh uh planning our next mev rest uh a mega event that will focus a lot more on these kind of microstructure questions and also things that we touched on but didn't dive into such as um fairness debate um extraction versus uh mitigation um we will uh do a more systematic deep dive into those but uh want to see if there's any uh remaining open questions that anyone wants to suggest as well or takeaways justin r rose master um i don't have any specific questions um i mean i'm i'm glad i've been learning about you know flashbacks for the last week or two um and i'm sure i'll have more questions as i do a more deep dive but in general i'd say that i'm very impressed with some of the principles that flashbot has taken um you know around decentralization around ethics uh around open sourcing around um you know all these all this this this good stuff you know eliminating the the forest et cetera et cetera um you know i still think there's a there's a lot of work on the actual product but um i think the the cultural foundations are extremely strong which is which is fantastic thank you awesome well i want to thank as we wrap this up i want to thank justin for being our roastmaster and tina we're coordinating this event in the flashbacks team for just making sure that all these amazing conversations happen today so um i personally got to learn a lot of new things and a lot of interesting topics and it seems like just from the conversation today there's already enough content for uh what comes up for the next roast in june so hopefully everybody on the chat uh in on the panel also got to uh participate in a lot of interesting discussions and got some new insights out of this so i want to thank everybody here from our panelists to everybody watched all 100 plus of you and just everybody who participated and engaged with all of our speakers
Automatic transcript — names and jargon may be misspelled.