Joey Zacherl: KeeperDAO – The On-Chain Liquidity Underwriter #383
20 Mar 2021 · 1:13:55
Joey Zacherl, co-founder of KeeperDAO, joins Epicenter hosts Friederike Ernst and Meher Roy to explain how the protocol pools user funds so keepers can capture on-chain arbitrage and liquidation profits cooperatively rather than competing against each other. He covers the grim trigger and hiding game strategies that keep keepers honest, how the ROOK token factors into governance, and the risk that keepers could act maliciously.
Speakers
Topics
Transcript
this is episode 383 hello and welcome to epicenter i am federica ernst i'm meher roy and we're here with joey zacker today joey is the co-founder of keeper dao a fascinating new project that describes itself as an on-chain liquidity underwriter for defy and we will explore what that means in a bit so joey welcome to the show
can you can you tell us what you did before you fell into the web 3 rabbit hole and then we'll take it from there sure absolutely and thank you for having me on the show um so i i have a background as an engineer and i just generally enjoy building things um my most you know recent projects have all involved some form of automation but i got started doing cyber security and a lot of low-level programming and then kind of transitioned more into the the user interactive space and building mobile apps but once i got hooked on automation there's really been no turning back ever since so i've done automation platforms like iot automation
platforms for home automation i've done a lot of video game bots online poker bots and then i once i discovered crypto and went down the ethereum rabbit hole my kind of automation you know went in that direction um and you know i was most fascinated with the concept of decentralized trade from the mount gox incident back in 2014 um and i feel like those those events demonstrated the value of of trustless exchange and it really inspired me to kind of take my automation skills toward decentralized trade and help facilitate the the growing need for you know trustless asset exchange yeah that makes total sense i think coming from the automate automation world it's kind of a very seamless
transition into web3 so the the first thing you actually did in the web web 3 space um was wally fire which as i understand it is um a dex market maker and a smart contract service provider what drew you to that so it you know it really started as my first step into actually building something in the crypto space you know i always liked bitcoin but there really wasn't anything for me to do with it you know early on and so when ethereum came around and these decentralized exchange protocols started popping up um i noticed very quickly that they were extremely powerful but there was just no liquidity and you know i knew i knew enough about
trading to be dangerous so i kind of went down the rabbit hole of you know using my automation skills to start building out some components and you know started you know sharpening my my trading skills and you know before i knew it within just a few months i actually had the first you know market maker on ethereum up and running it was working really well um and ever since then i've just been you know building up trading integrations you know market making providing liquidity services um and you know on one hand it it does well because it you know makes money but on the other hand it provides a service and kind of helps um you know provide that like i guess life blood into these systems you know because a lot of the early protocols didn't have any liquidity and
they failed mainly from that and maybe some of them may have failed because they were hard to use but but you know quite a few of them failed because they didn't have any liquidity and so it's nice to kind of provide that liquidity and kind of be that trading partner for that first user that comes on board on day one you know when they when they trying to find a trading partner and there isn't one you know it's good to have that ready to go and so i think um a big part of that really is is just about you know having um a nice a nice protocol a nice automation platform that can plug into it so you know you need good apis um and then you have lots of liquidity requirements too people want to trade more than just one token you know so
there's there's kind of a variety of things that go into making that work and that's um that's basically how volleyfire came about and today um you know flat you know fast forward to 2021 so a lot has changed there's a lot of protocols you know volley fire has about 10 dex integrations at the moment a 0x being the biggest one so uh we operate the largest xerox staking pool uh and it's it's great to see kind of dals kind of come back around and start you know taking their their place again because for a while you know dowels were kind of like a meme and people started kind of veering away from them but now they're starting to kind of come back and it's it's nice to see that the staking pool
you know that xerox has created um working and and working well and it's incentivizing market makers to kind of come in and provide a service you know whereas back when i started the only incentive was any profit that you can capture you know whereas now there's kind of more mechanisms for you to play with and it's it's even gotten to the point now where you know there's there's certain cases where you can actually bank on that profit being there so you can actually potentially trade at break even or even a loss because you know you know there's a staking reward coming um and so it's it's nice to see the space evolve um and um there's obviously a lot more in store for volley fire in the future but um i'm kind of even more excited to talk about keeper dao which is what we're here
today to speak about so what if i you're continuing with the operations and the market makers keep running and keeper dao is a different venture that you're pursuing with a different set of co-founders yes that is correct um and what's interesting though is they do tend to interact on the blockchain quite frequently um you know for example our keeper bot and keeper dow does regularly fill orders that were signed by volleyfire so you know they're totally separate but they do have a lot of interactions so so let's talk about um keeper dao so keeper dao's safe description is that it is an on-chain liquidity underwriter
for defy so there's a lot to unpack there how would you describe what keeper dao does and what its mission is sure so the goal of keeper dao is to capture profit opportunities on chain and distribute them to the various participants involved um what's interesting about that is there's there's a lot of participants you know today that actually don't see any of this profit even though they participate in making it possible you know so for example the participants we could kind of break them down into several categories we have users which could just be a d5 product user maybe they're making a trade or a limit order or using a dex aggregator you have
liquidity providers who are staking some liquidity hoping to gain a yield you have keepers which are these traders operating these bots and then you have um you know for for us you know integration partners which would be partnering with these various d5 products um you know today when there's profit captured you know the majority of it goes typically to one of two places either the keeper or the miner um you know and so what we would like to do and what we've already begun doing is to kind of redistribute that and also get the user involved and even d5 products involved you know so say if there's a profit opportunity but maybe this user was responsible for you know creating that profit opportunity let's make sure to let them share in the profit and so you
know the first thing that keeper dao is is doing is is capturing some of this profit and helping to redistribute it uh the second big thing is is coordinating all of these various participants and there's a lot of factors in coordination here because you could coordinate keepers and liquidity providers and have a you know a flash loan pool but you could also coordinate users and keepers and and essentially have them kind of collude together to you know share this profit rather than all of it just going to keepers and minors um you could also you know coordinate keepers with other keepers and basically say hey you know if you take this one i'll take that one or hey we'll agree to not grim trigger each other and if we do we do somehow get out of line then there'll be a system in place to prevent
us from doing that you know going forward something like that and then the last goal really is to kind of create this entity as a dow on chain and enable all the participants to govern the system and that's something that we're we're working towards you know it's not a doubt today but it's something that we're working towards one step at a time and that should be coming in you know soon tm as everyone likes to say maybe just to illustrate you know like these uh these roles so you mentioned a few different roles like users keepers miners maybe some other roles right could you go through a practical example of an either a liquidation or an arbitrage opportunity
and just cover uh these different roles in that particular opportunity and how it works today sure yeah so today it's common for a user to say they submit a transaction to uniswap directly or it could be a dex aggregator that ultimately goes through unit swap there are a lot of bots on chain that will use that transaction to extract profit from and it could be at the expense of the user or maybe it could be at the expense of something else but it in in one example let's say the user defines a slippage parameter um and this bot could essentially you know
sandwich attack them in such a way that it pushes their slippage to the max and then they extract profit and now the user who essentially created this trading opportunity that did not exist before they broadcasted their trade um you know has now been essentially exploited for profit right and so you know one of the goals is to you know if if the user is going to provide a trading opportunity and profit results from it to share that profit directly back from the user um and another another simple example would be you know let's just say there's arbitrage that's mined into a block and at any moment um you know somebody could arbitrage uniswap and sushi swap you know a keeper will make a bid to try to capture that profit and let's just say there's a hundred
dollars profit available the first keeper might bid 20 another keeper might see his transaction mempool and bid you know forty dollars and then you know a third keeper might come in and see both of them and they might bid sixty dollars and that bit will go all the way up um in a lot of cases it'll go up to near a hundred percent um and you know in some cases it'll grim trigger and actually go over 100 in other cases you know maybe it'll just get mined in quickly and it'll kind of stay around the you know 60 70 marker and so there's a lot of different types of these opportunities out there and you know the miners and the keepers tend to capture the majority of that that value and in some types of opportunities most of the value goes to the miners
and other types of opportunities most of the value goes to the actual trader themselves and it gets it gets trickier too when something like a liquidation is involved because you have price oracles and there's potential for price oracle manipulation and other things there so there's there's you know a lot of different um a lot of different examples but all of them kind of revolve around you know the user getting nothing even though the user was participating in the system so um to kind of look at this from another angle what keeper dao kind of proposes is that liquidity providers kind of pool their funds together and then keepers
use that liquidity to execute these arbitrage opportunities whatever the arbitrage opportunity is right so basically there's is there any constraint other than that it has to be executed within the same block so today that is a big constraint so when we talk about you know using pooled funds for trading um as from a keeper's perspective you know keepers can actually trade with their own funds as well you know so if we're talking about a small trade that's maybe a couple thousand dollars of volume you know a keeper may use their own funds in their own smart contract to
trade but if we're talking about a large trade maybe it's liquidation or maybe it's just a massive arbitrage you know the keeper typically is required to flash loan um in order to facilitate trade for that because most keepers don't have you know millions of dollars in in a variety of tokens laying around and that's that's where the flash loan pool comes in and provides a lot of value um you know today it is that limitation to where this execution has to happen in in one block um you know due to you know the way flash loans work we are you know thinking through a way for you know keepers to have a reputation and basically say you know okay this keeper can you know perform some sort of action over multiple blocks
based on his reputation um but then it gets a little tricky because um you know now it's like what happens if they don't return the funds or what happens if they just return them late you know you need you need kind of need something to slash whether it's reputation or maybe maybe some staked assets somewhere but then it gets even trickier because you know if if the keeper has to stake a bunch of assets in order for that reputation they could have just used that asset instead of flash loaning you know so there's a lot of details to work out there and we are currently working them out but we don't have that system in place yet it's something that we're working on for the future but yeah as of today the limitation does exist where you know the flash loan has to happen within one block
okay so basically what what keeper dao does it gives the keeper access to capital right and you also talked about something called trim grim triggering uh earlier can we talk about what that is sure yeah so a grip trigger is is essentially a trading technique where one party pushes the trade all the way to break even or even beyond and so in the earlier example i gave where there was a 100 profit opportunity you know for for one of the traders to groom trigger they're basically saying i'm willing to spend a hundred dollars or maybe even 105 dollars to capture that 100 and they kind of make it uh you know a
losing trade for everyone else so they're they're essentially signaling to the other traders um you know that they they can't capture this so grip triggering is is an interesting mechanic because on one hand you know if we talk about keeper dao as a trading pool um that that technique could be used to signal to other traders or potentially even other trading pools that you know it's time to work together and coordinate or else there will be no profit um but you know with all of the different um you know techniques that are coming out for mev and arbitrage in general um it's it's very clear that there's really no one mechanism that that can succeed you know because if you have
if you have you know traders and miners kind of colluding together in an organized or unorganized way in certain cases um group triggering won't even be effective because that's kind of you know sliding under you know since if the miner doesn't want a mine in your transaction they can just ignore it you know so there there are quite a few um you know techniques in play here at the same time my current imagination of keeper tao is let's say there's a there's an opportunity where you know this usdc pool on uni swap and there's an eth usdc pool on sushi swap and the prices are slightly diverging maybe you can imagine it 1800 on one and 1900
dollars for each on the other so so in theory if i have usdc i can go and buy it from the cheaper pool and sell it to the more expensive pool and i can get some extra usdc back there's some profit profit opportunity so every per eat that you cycle there's a hundred dollar profit opportunity but you can cycle hundreds of ethan you can multiply that profit opportunity as as big as it gets now um what keeper now is allowing is that let's say i'm an independent keeper sovereign keeper then in order to do this this loop and realize the 100
profit i'm going to need to start with some usdc i own myself and that's a constraint so one way to imagine keeper dow is it's a pool of usdc where i can borrow usdc at the beginning of a transaction i can do this loop then i can basically return all the usdc and the profit that i make will be split according to some governance logic of the dao yes that that's that's correct and that that would be essentially one feature of keeper dal that would be just the liquidity pool feature and yes we have a lot of parameters that you know our team
has has set initially and will be kind of tweaking over time but the goal is to have the dow control all of these parameters and so just to go back to you know the the different features that we have so you know the liquidity providers providing liquidity into a pool that's that's a flash loan pool is essentially just one feature right we also you know have keepers you know that will be coordinating together we also have essentially the hiding game which is our mechanism to allow users and keepers to collude together to kind of hide arbitrage to return that back to users um and these things can can to in some cases they can work independently of one another in other cases they can work all
together you know so in one example if somebody wants to just use our flash loan pool to to flash loan they can do that for whatever purpose they're doing whether it's an arbitrage or for some other purpose but if somebody is say a keeper wants to use the flash lone pool within the hiding game to work with a user to facilitate the user's trade and also capture profit they can do that as well so these things can kind of be used together or independently so one way to look at this is by looking at the competit at the competition between different keepers right so basically by having the scrim triggering mechanism that you in inevitably have on the blockchain because things are public you can you can ensure that you can
erase someone else's profit even if you can't take that profit yourself but you can make sure that the other person doesn't have it right so basically that's in essence what this grim triggering is you can't you can't take it away from someone but you can make sure that they don't get it so basically what you kind of need is you kind of need to find a coordination point for the community basically like a shelling point where people feel like this is this is kind of the most just mechanism or this is the mechanism that we can all that we are all comfortable coordinating with in order to have people not kind of take each other's profits away
without actually getting them so basically who actually gets them is the miner typically um who's typically at this level not participating in this game will get to the involvement of the the miner later so how do you make sure that the keeper dao is actually the selling point how do you make sure that you're the shelling dao how do you make sure that you are seen as as the dao that should govern how these profits are um distributed between the different stakeholders yeah great question the grim trigger itself is essentially a signal you know to to other traders which they're kind of feeling in the in the profit margin for certain types of trades
right for just pure arbitrages you know if if your profit margin is going towards zero you know you're essentially getting signaled that it's time for coordination i mean coordination is a natural evolution of this this type of trading right i mean people can't grim trigger forever i mean you can't you can't break break even and have small losses forever you'll eventually want to coordinate into pools right you know we're still um we're still evolving our trading strategies that that happen in the wild in working towards this but we're also still monitoring you know some other other strategies that people are implementing whether it's kind of
concluding with minors or using other other techniques you know so it's i i can't really give you an answer today as to you know how you know we're essentially using grim trigger as kind of like a you know an advertisement for keeper dow mainly because at the moment we're actually focused our we're focusing our you know development time and our energy on on the hiding game and kind of transitioning towards a dow and preparing for the coordination game and our actually our first um implementation of the coordination game will be coordinating the hiding game we would like to also coordinate trades in the wild it is it is quite a bit more complex um because you know as you mentioned it does involve a lot of grim triggering and it does involve
a lot of um scenarios where you don't control as much like when when you're trading in the hiding game you control more because you kind of control the ecosystem i mean you have the users who are colluding with you but when you're trading in the wild you know you don't really control the users and you don't necessarily control the other bots you know so it is it is trickier so um you know grim triggering in the wild is is a lot trickier to handle and implement properly which is why coordinating in the wild is not our number one priority at the moment but we will work towards that and who knows maybe maybe once we are kind of happy with the hiding game and we have that kind of coordinating amongst a variety of keepers
we may we may ultimately decide like some other projects have where when it comes time to coordinating in the wild maybe that does involve coordinating with mining pools we may get to that point as well so i'm actually trying to understand these two concept which is like grim triggering and then the the other thing is the height other thing is the hiding game triggering first right so so the problem is something like in the uni swaps sushi swap example right like there's a hundred dollars profit to be made but imagine a world in which like keeper dao was simply like a flash loan pool the only utility
it offered was i could take a flashlight so in that case if i am a keeper i want to take a flashlight and execute this another keeper can also take a flashlight and try to execute the same thing and these two keepers will end up competing with each other because they want to put higher and higher transaction fees onto their transactions and the end result of it is that the hundred dollar profit is going to be allocated to a combination of the miner and the flash known poll and the keepers will end up making very little right so essentially the need for coordination here arises
in the sense that if you have two keepers a and b you want some kind of game to emerge where a and b like decide to collaborate and split up the profits for all such trades in the future so if there are like a thousand trades to happen they can collaborate pay lower transaction fees and split the profits 50 50. so that is the collaboration you're trying to build uh yes that's correct so our collaboration mechanism um between keepers will be you know initially introduced in the hiding game because it's much simpler to introduce it there introducing it into the wild is very tricky because
you can imagine a scenario where you have say you have five keepers who are you know playing by the rules and and behaving properly you could have five more keepers who are not that are groom triggering the ones who are behaving so then you know you you end up with a gas auction anyways so it does it does get very tricky when you're talking about something in an uncontrolled environment in the wild when it's uniswap sushi swap arbitrage so so then the question because what is this hiding game that you're you're referring to sure um so the hiding game is essentially our implementation to where we align incentives between users and keepers and so the idea is to um take actions that users
like to perform um that end up resulting in you know profit opportunities that get gas auctioned or you know get sandwich traded and take some of those actions put them you know in in such a way that the user and the keeper can actually collude together and prevent that gas auction from ever happening or prevent that sandwich trade from ever happening and do it in such a way that now the user gets some of that profit when profit is captured so imagine a user wanting to place a limit order instead of making this limit order fillable by anyone in the world because that would lead to a gas auction make this fillable by only keeper dow keepers now keeper dow keepers can look at that and say okay
it's it's my turn i'm gonna i'm gonna capture this one and fill that um and oh by the way there was a hundred dollar profit captured um today we're actually giving all of that profit back to the user um in in rook tokens and then the the underlying token that was captured goes into the the keeper dow treasury um you know in the future we will take the you know the participants involved and give them each a share based on the percentage that is you know essentially decided by you know governance um so that way rook holders can determine you know how much how much of that profit should the user keep versus the keeper versus you know maybe the partner because maybe um a a dex aggregator or maybe a dex actually
was the user in this case or facilitated trade for the user because maybe this user didn't go to keeperdale.com maybe this user went to some decks or some dex aggregator and they traded through there and it actually got routed through the hiding game um so you know so some of that may actually go back to the the defy project in that case so and the goal here is to do this not only for for dextres but other other common um features that that users use for example let's say they're going to take out a position they're going to borrow you know some some asset and they're going to open up a lending position um you know today if a user's position goes underwater and they get liquidated the user doesn't see any of that profit that gets captured by the bot
but you know our our goal is to implement a system such that when the user gets liquidated they actually participate in that that profit capture you know they're they're basically you know and this gets back to your your question before about the on chain underwriter and essentially if we're acting as the underwriter in this case we can you know work with the user and say look you know if you open up your position through us directly instead of the protocol directly we will share the profit with you and essentially incentivize them to run their positions through us instead of the protocol directly so if you if you look at this closely you say i totally understand where the arbitrage opportunities come from say if i go to uni swap directly so
basically i'll shift the price and people will want to background me if i trade on limit order decks people will want to front run me if i go to a dex aggregator say mata one inch or power swap they will kind of they show you the route that they will route your trade they will kind of use a linear combination out of all of these different sorts of things and that still opens up the potential for minor extractable value of basically being back or front run despite the fact that you're going via dex aggregator right so basically my my question is how does keeper dao protocol kind of fit in with
this so basically is keeper now integrated with the dex aggregators and basically the dex aggregator will route me via so basically i go to paris swap and it will it will route me via keeper dow or how how exactly do i become keeper dao's user keeper dao is actually not integrating with the dex aggregators themselves so um technically any keeper bot could integrate however they want to if a keeper bot wanted to integrate with dex aggregator i i suppose they could um ours natively integrates with each individual protocol probably the same exact way that a dex aggregator integrates with each native protocol themselves
right so you know if a user if a user goes to you know the hiding game and wants to trade or goes to one of our integration partners and opens up a limit order our bot essentially has its own router that decides what the most optimal route to make that trade would be and that trade may be through uniswap or maybe through sushi swap or it may actually be through another hiding game user as well so we can essentially match hiding game users with each other um which does open up a lot of possibilities there because now essentially you could have market makers who are market making on the hiding game and facilitating trade that way um and then you know that would add more liquidity and add more value there too but yeah i mean it's similar to you know today we don't
show the path to the user like a one inch does which is which is a great feature and that's definitely something that we could consider adding and it would be possible too that the tricky thing would be you know we want to coordinate many keepers to kind of have a nice um a nice kind of deep layer of redundancy that way if say one keeper goes offline for some reason there's another keeper that can facilitate trade or if maybe one keeper doesn't see arbitrage in a certain spot another keeper does go with the one that does see it you know certain keepers may have different integrations right so the first keeper may have 10 integrations and the second one may only have five right so the first keeper may see more opportunities than the second one so it's nice to kind of have that
redundancy but the tricky thing about that is now say if you want to show the path to the user we would now need um you know a a new line of communication to each keeper where they kind of respond and say oh by the way i'm filling this trade and here's the path but that would kind of be like after the fact you know so it would be it would be a great uh feature idea to kind of have when the user is just first considering a trade it would be nice to kind of see that path that would be a nice feature so in the hiding game what happens in effect is the the routing itself that is currently done in a centralized fashion by the likes of one inch in paris swap and matcha
um is actually itself decentralized is that a fair way of putting it it's done by the keepers yeah which which would essentially be decentralized based on how many keepers you have you know so today the hiding game only supports one keeper which is our internal keeper bot um you know but you know soon we would like to start onboarding more keepers and that that adds a nice layer of decentralization because then you know the community isn't dependent on our keeper bot which our keeper bot has been you know running and iterated over for many years which is great but still you you kind of don't want to be dependent on just one keeper bot you want to have many of them with many different integrations and you know have unique characteristics of
each and maybe some are more effective than others and maybe some are less effective than others but that'll kind of work itself out over time okay i see i i think i kind of understand the hiding game now to a certain extent what does it mean to be an underwriter for the hiding game or on keeper dao the example that i gave earlier about the liquidation is a perfect example of that and so say say a user wants to come in and open up a lending position maybe they want to borrow an erc20 token having the user kind of giving that underwriting capability to keyboard owl is advantageous for them and what that would mean is
is the user would open their their position through our smart contract and then we would then in turn open that position through the protocol that they chose and let's say it's compound for example instead of the user borrowing from compound directly they would borrow through us and we would borrow from compound for them and the advantage is um if there is a liquidation our keeper will execute that liquidation in such a way that there is no gas auction possible and then when there's profit captured assuming that there is we will share that profit directly back with the user so the user is actually now you know getting a huge advantage here because instead of losing you know in some cases that you you'll
you'll read about you know someone got liquidated and lost you know thousands or millions of dollars in this case they get a good percentage of that back and you know initially we we've been setting those parameters to to give 100 back to the user and over time we'll kind of let the dow decide you know so keeper should get this percent and the user should get this percent um and then in this case too if there's a partner involved let's say that user didn't go through keeperdow.com let's say they they went through a partner's website you know we would give that partner some as well let me be clear about how i become a user of keeper dao so basically say i i have a maker cdp that is almost under water so i open that on
oasis.borrow and how do i make sure that your underwriters are keeping me safe if you did open that on oasis then we wouldn't be keeping you safe what we could do is we could we could have a feature that allows you with you know very minimal clicks and very minimal transactions convert your position from there through keeper down instead um the other alternative is instead of opening it through oasis you just open it through us but um you know the the feature would be such that your position ultimately does go through compound um you know it's just kind of routed through our contract where our keeper bots and you know any any keeper bot on the
network is is kind of watching for you and participating in that for you and the nice thing about you know that redundancy layer is you know you're not worried about just one company's one keeper bot protecting that for you you now have a variety of them all over the world and what's what's the gas cost incurred by going through your contracts because i mean if you look at the current gas prices then any contract interaction that can be avoided but best be avoided except for really large transactions so what's what's the cost that i incur by going through you guys so as far as the um the borrowing side i don't have any gas figures
on me at the moment but it would cost you know slightly more gas to open the position through us than it would to open it directly through compound for example mainly because we have to do a little bit of overhead um you know so if you open it with them directly that would be the most efficient way to do it but the good news is this overhead you know a little bit of overhead gas cost um and it's it's not going to be significant um you know and i don't want to quote an exact number but let's say it's maybe 50k gas cost of additional overhead you know so that that may increase your gas cost of opening the position by you know 10 or 20 or something like that and so i guess the the probably that the highest gas cost there would be
if you wanted to convert a regular position into a keeper down position because that would essentially be like kind of um closing your position and then opening it through keeper dow again which is ultimately opening it through you know compound again that that one would probably be you know a combined kind of like a withdrawal deposit or i guess a close open you know sort of a mechanism which would cost some gas but yeah it's tough when gas prices are high it's tough to do you know say a hundred dollar position when gas is a hundred dollars that's that's hard yeah yeah i totally see that so let's kind of wind back a little bit so um let's see let's say i'm a liquidity provider for keeper dao
and what happens to my capital when it's idle right there's only ever so much that you could that you can use um for arbitrage trades right that's correct so when you deposit liquidity um you receive a k token which is kind of like your receipt for that liquidity um and the the holder of that k token is essentially receiving a reward for depositing liquidity and putting your liquidity to use and today you'll earn that reward in rook tokens um but the pool the liquidity pool today is being used for flash loans by keepers to generate profit we are taking the profit that's captured and
put into the treasury um and you know today the treasury is also being used to stake back into keeper dow to um you know generate a yield for you know rook holders who are essentially governing the treasury um and so we have we have plans to use the liquidity pool for a variety of yield generation activities um we are just now beginning to to do that and actually implement that um you know the very first thing we've done with that is to take the the treasury funds which which are not the the lp funds but to take the treasury funds and essentially stake them to to have a larger flashlight pool
um so in the future for as far as the liquidity pool itself goes in the future we would actually like the rook holders to be able to decide what happens there and i i actually imagine a dashboard where users can see you know here's what's been flash loaned the last week here's what's been flashed in last month and maybe maybe dye gets flashlight more than usdc or maybe rapt ether gets flash loaned more than you know uh run bitcoin and and so you can decide like okay we should put 50 of our you know uh ren bitcoin and stake it into this protocol because we'll gain this yield and you know over time you know people can make proposals and
recalls can vote and decide on on what's to be done you know in the short term you know we just kind of you know do a a quick kind of you know discussion in the community and we just kind of make the decisions ourselves but in the future the recorders will be able to make all of those decisions and i think um a dashboard will really empower people to get data and say like what is efficient like how many you know how many ether does does you know keeper now actually need to perform these trades and these liquidations is this too much and and what else can do we know what are the opportunity costs and where can we put that and i think um you know i think we're we're still a little bit away from having this dashboard and all of this information
available for users so that's something that that will come with time whenever we kind of you know get get more more fully fledged tools and dashboards out there a lot of the opportunities in the in the d5 yield farming space are fairly short-lived so i would assume that making these decisions as a dow is inherently difficult because you don't want to be spammed so you have like an attention bandwidth problem and but at the same time you also don't want to give give a small group of people executive control because i mean that would kind of defy the purpose of the dao right so how do you see this um playing out yeah that's that's a really good point and these are things that all dowels are
trying to work through so for from what i've seen you know dallas tend to make i guess longer term or what's funny is i guess a long a long-term decision in the crypto space is probably a medium-term decision you know so i guess they're making more medium-term decisions at a slower pace right and yeah i agree with you that you can't necessarily just jump on the new protocol that's farming at over 100 every other day um because it's it's hard to make those decisions quickly although um we actually see a good opportunity with um you know our on-chain underwriter for the next feature that's coming out for the hiding game as potentially one of those opportunities that that
kind of has a higher uh reward um mechanism to it so you know like today kind of taking our treasury and staking it back in the the keeper dow lp pool is one option but you know we may see our next pool that that's being launched may generate even a higher yield you know depending on how well that does so it's like we may internally you know have some good opportunities for that kind of just staking on ourselves but then yeah externally it's hard because you kind of have to make a slower more methodical decision just you know from the process of these dowels and voting and making sure that you you know you don't want to have votes too often because then you know people are just going to kind of start ignoring them you know but you want to have them often enough that
that you know the community is happy with the funds being put to use because you definitely don't want idle funds nobody likes to see that in d5 this is fascinating so you you said earlier that the keeper dao governance currently is still done mostly in-house by your guys but you're going to transition to a dao soon so what's what's the road map on that so there's a few things that need to fall in place um first the road map on that is is not clearly defined because we're still kind of working through a few of these we'll call them like short-term challenges um and while some of them are presenting themselves more clearly than others um you know we're trying to
kind of let the pieces fall where i think where i think the dow voting comes into high value in the short term would be um setting things setting parameters like where to allocate hiding game profit and then also as you mentioned um where to allocate um idle funds say our flashlight pool is just too large where to allocate that i think in the short term those are those are good values for that you know and so we what we need to do is we need to transition into uh you know a mechanism that allows you know rook holders to make those decisions as opposed to just us internally making those decisions that's something we're still working out the details for
um but i guess the next factor which is kind of like a slightly you know longer term uh you know solution that we're working on would be staking rook to keepers right so once we introduce the coordination game and we have multiple keepers coordinating together we essentially want to allow rook holders to determine reputation of keepers because let's say you have let's say you have three keepers if you allow rook holders to stake their rook on these keepers they could essentially earn rook based on performance of these keepers and so these rook holders would be incentivized to choose wisely and maybe kind of do their own research with the help of all these tools and
dashboards that kind of see into what's going on you know maybe viewing the trades and viewing the profitability viewing the efficiency of these keepers and that's nice because it also kind of encouraged the community to build better tools to um you know look at the efficiency of keepers engage them and so say say one keeper may have more integrations than another but maybe maybe the other keeper also does liquidations whereas that first keeper only does arbitrage you know and so this this will kind of add into it and maybe maybe one keeper um you know just isn't very efficient for whatever reason so that you know they they would potentially be staked less and potentially even lose their turns if they just they turn off for a long period of time i mean so this will be a nice mechanism but i also feel like that that may
involve um you know some dow features as well there may be some dependencies there as well cool so basically all of this um the entire incentivization governance is uh depends on the rook token right so how was the rook token distributed so basically who are the rook token holders and how do i become one if i want to partake in this the rook token economics are based on you know users participating in the system and rook holders participating in the system or if you're not a recorder you could just become a user and essentially start accruing them from your your behaviors right so um when we initially launched the token we had a token distribution
um mechanism where you could provide liquidity and start accruing rook and you could also share trading profits with the pool to start accruing rook as well and that was that was kind of an initial distribution mechanism that that got the attention of a lot of liquidity providers and keepers um and today you can also accrue rook by you know participating in the hiding game as a user so we we don't yet have our borrowing underwriter feature out yet but that should be out soon you know today we have our dextrading feature which allows users to place limit orders and when arbitrage is captured by executing your limit order you
share in the profit and so you know if if you wanted to today you know you could essentially you know buy rook on a decks or or you could just essentially participate you know by lending out your you know tokens depositing it to our flashlight pool and you'll you'll accumulate rook and then the other option would be to just make your trades through keeberdale.com and so if you if you launch our app and click on the trade button and let's say you wanted to you know just swap wrapped ether for usdc for example you would you know make your limit order you would set your price um set your duration and and fire that off and it heads to our order book which is basically orders that are only fillable by keeper
dow keepers and today that is only our keeper and once we launch the coordination game that'll be multiple keepers um and then you know once that trade gets executed if your trade gets arbitraged in any way and generates a profit that arbitrage 100 of that goes back to the user um in rook tokens and depending on you know how much was how many arbitrages were captured that day and how much that value is um most days you'll actually get more value than your arbitrage so most days let's say if you capture a hundred dollars of arbitrage through your trade you may get say a hundred and ten dollars of rook tokens back so uh one question is like in the
future do you imagine the the software for the keepers as being standardized across all your keepers or do you rather imagine your keepers as being as developing their own intellectual property and like hiding the operations of this of their system from other keepers yeah that's a great question i actually see it going both ways um and so today i'd say you know probably 99 of the best traders out there keep their software you know in a proprietary fashion where they kind of maintain it and they don't share it with other people um there are you know a few bots floating around and i've heard good things about some people using them
you know but it's it's hard because um you know like picturing just like purely open source keeper software it's it's tough because it's changing so fast and it's um it requires a pretty high level of you know engineering expertise to kind of build and maintain this um you know so i think the the ones who are most successful at it are kind of so busy just kind of keeping up that they don't quite have time to like put into fully open sourcing it you know the software is very complex um you know so it's kind of hard to you know take something like this and fully open source it and plus it's also interesting because there's a lot of different ways to build this software you know some some people rely on a lot of third-party um software
whether it's node services mempool services you know it could just be a coin market cap you know api anything like that whereas other people try to minimize those apis and you do as much as possible on their own and other people just actually build their bots you know right into node infrastructure rather than kind of having them manage them separately you know so there's a lot of different ways to go about it i actually appreciate that there's a variety of different techniques because that way you know like if one api goes offline all the bots aren't just broken now you know something like that could potentially be a problem so it is kind of nice to have the redundancy of different approaches and different strategies that being said um there are a lot of types of trading that would do well in like a standardized piece of software
similar to just downloading a geth node and running it um and we we do have plans to do something like that but um it may not be for dex trading at least not anytime soon um we're we're considering doing something like that for our uh liquidation uh keeper bot but we haven't yet decided if if we're going to to do that because you know obviously if we release a keeper bot you know a piece of software for keepers to use um we want to make sure it's done well and it's it's easy to use and it's and it's ready to be released you know because keeper bots they change so often and it could be mostly because of you know front running and trading patterns and
and uh trading strategies you know but if if you're talking about like the hiding game like something that's specific to the hiding game where where front running isn't really an issue then i think that that's definitely more applicable you know so our keeper bot that does dex trading you know it it was designed to trade in the wild it trades in both the wild and in the hiding game so i i don't think that's a good candidate to open source just because it's way too complicated you know but i think a bot that specifically targets say um you know uh unchained underwriting for the hiding game i think that one could potentially be um and that i i definitely i definitely see this this happening at some point in the future um hopefully it's not the distant future hopefully sooner rather than later because it
it would be nice to you know have people be able to just essentially download a node and run it and on on that note though there may be another opportunity for for people to do that sort of a thing maybe you know like i actually envision um trading in the future to be kind of more modular because today keepers have to do everything right they have to you know do node infrastructure they have to do you know front running and mempool um they have to write arbitrage algorithms they have to integrate with all these dexes they have to write smart contracts like i i would like to envision you know a future where all of these things are modular and you could actually just specialize in one part and maybe you specialize in just writing smart contract integrations that are
incredibly gas efficient or maybe you specialize in writing software that just purely does you know node infrastructure um or maybe you specialize in just purely arbitrage algorithms and then kind of by each component plug these together somehow and you know maybe there's maybe there's an open source piece of software for this and an open source piece of software for that and and whether this is a node you run or maybe just some component you just download um you know from github but i i would like to see you know a way where where keepers don't have to kind of you know be a jack of all trades and they could specialize and kind of come together and you know so this this one person who does this one thing really well he gets rewarded for that one thing and you know now we may be talking like
a fraction of a fraction of of the profit instead of the whole fraction you know because let's say if some percentage goes to keepers now he may be getting a percentage of that percentage but still i feel like that that may be a better ecosystem for everybody um and and i see you know um features like the hiding game that's going to be much simpler to do than it would be in the wild where you have you know gas auctions in front running and you know more complexity you know so i i do i do see that becoming possible it's just a matter of kind of working through the details but i'd say the first step for the coordination game is coordinating different keepers with different bots with different capabilities and that's actually one of the big challenges with the coordination game is is we want it to be simple enough so
that some random person who has a javascript bot can coordinate with a random person with a python bot with a random person whose bot is running right in geth you know they all need to kind of work together and it needs to be a very simple protocol they can all work together even though they have different integrations and you know different features and maybe even different timings maybe one bot's more efficient than the other you know so assuming that you know all these things can come together we you know we don't want the coordination game to add too much friction to each individual keeper you know it should be it should be a pretty lightweight integration for them to kind of trade through their own smart contracts but still be a part of you know the coordination game so if you zoom out from here and you
look at the coordination game happening between the different keepers and users the party who truly loses here are the miners right so do you expect resistance on that front i i would say yes and no i would say that so if for let's maybe keep a short-term lens on and let's say that the hiding game is incredibly successful because i guess in the very short-term um lens the hiding game would do exactly what you described um so if if the popularity just grows massively and there could there could be some you know resistance there maybe we could see mining pools not mining a hiding game transaction
for example and maybe there's some percentage of mining pools that just don't mind hiding game transactions or they could even you know generalize you know front run it in a generalized fashion and kind of accrue the profits to themselves right because you guys are not you're not a mining pool right so you you don't include transactions in the blockchain and as soon as you actually broadcast them anyone could take them and kind of change them a little bit so that they are the beneficiary of that transaction no well if if we're if we're able to kind of wrap our um you know trades within our one single transaction like you know we and i guess you know
for the hiding game we're not submitting multiple transactions um and depending on them to be in a certain order it would just be essentially one single transaction then that wouldn't be an issue but um i guess if if like you know if if we were arbitraging a hiding game user against unit swap um they could they could the miner in theory could manipulate uniswap to do something so that ours would fail but it would be easier for them i think to just ignore our transaction altogether but then you know another mining pool would find it but i guess so like if you look at you know on chain underwriting for example we would do all of that in one single transaction so like say the user was going to get liquidated and we were going to share the profit
with the user that all happens in one transaction so the miner couldn't um there's not like multiple transactions for them to reorder essentially but they could still place your order at a convenient location in the block right in the worst possible location for you in the block they could they could um you know but i i think there's a there's a lot of cases where that's that's not a huge issue for us so let's say the way that our just-in-time underwriting would work is we would actually liquidate the user just a hair sooner than you know getting liquidated elsewhere um but the exchanges as they capture in that that they share in that profit
capture right so it's like if as long as we're configured correctly um the you the any any public i guess any public bot wouldn't be able to liquidate that only our transaction would so even if they put our transaction as the very last one in the block you know as long as we're configured properly we would be the keeper dow would be the only ones able to execute that liquidation at that point okay so if i'm a malicious keeper is there any way i could submit a malicious keeper strategy um and kind of harm users or other keepers or the liquidity providers i would say there's a way that you could
attempt to do it but i i don't think it would be very fruitful and so i'll give you an example so let's say that we have the coordination game running and there's three keepers right so um we our our system involves you know taking turns and it also involves redundancy so let's say keeper a has an opportunity and he's up first it's his turn so he takes it it succeeds everything's good keeper b has the next opportunity it's his turn he takes it he succeeds everything's good keeper c is the malicious keeper now he's up he's supposed to make a trade but he decides to not he just this is you know this is i guess one one way of being malicious is to just not do your job right so he decides to not do his
job and you know a few seconds will go by and the system essentially the coordinate the coordinating system the the users will decide okay he's missed his chance let's let's just say that's 15 seconds for example he he had 15 seconds to perform his task and he missed it so now it goes back to keeper a again since keeper c didn't do his job within 15 seconds now keeper a can now execute that trade and so the user the user's experience didn't really get degraded i mean i guess his order got filled 15 seconds later but it still got filled and also the nice thing about since we're using the xerox protocol um and you know the the user signed the price right so a keeper can't fill the order at a wrong price because
you know the signature would be invalid right so the the even if a keeper wants to be malicious if they're filling the order they're helping the user right so the keeper can't really be that be malicious by filling the ordering correctly it's like either they fill it or they don't you know so from that perspective um they can't really be malicious but what what a keeper could do to to attempt to be malicious is they could essentially grim trigger other keepers right so let's say it was keeper a's turn but keeper c out of turn jumped in and tried to take an order and fill it and then he went as far as taking the profit that was going to be captured and he grim triggered it so now there's no profit so what would happen is you know the coordinating keepers would agree that
this user is acting out of turn so he would get punished and he would get his turns reduced right so for the user this is actually okay the user actually doesn't care because i mean i guess technically the user does care because so the user's order got filled and that's the goal the first goal is to have the user's order gets filled i guess technically the user got got degraded service here because they were probably going to get a reward if the system had behaved correctly but because there was a grim trigger now there was no reward you know so i guess in this case you know the user service got degraded temporarily but what happens is when a keeper acts out and the you know the coordinating keepers agree that this this keeper is acting out um his his turns get slashed so the
number of turns he gets you know like think of his his share of of turns gets reduced and the more he acts out the more it gets reduced until eventually he's completely kicked out and he he now can't be a keeper anymore and so our our reputation system will be such that we want it to be friendly enough to give new and aspiring keepers chances give them opportunities to prove themselves but if they get too many strikes in a row you're out and you you get your turns reduced to zero and you're booted out and then if you want to if you want an opportunity again you know you have to try again and kind of work your way up but it's it's going to be one of those things where um you know if there's a potentially risky
keeper or maybe a keeper with zero reputation or negative reputation or something and they want an opportunity it's like maybe we'll we'll give them an opportunity some small percentage of the time um but then as soon as they fail say they fail that 15 second window we're going to immediately put up a high reputation keeper to kind of make sure that goes through that way the user's experience isn't degraded um and you know i guess the worst thing that could happen really is the user's reward gets degraded because there should have been profit but you know keeper kind of acted out and and maybe there's even a way we can handle that like maybe maybe we could somehow detect that and then part of slashing the keeper goes to paying for that reward although that mechanism does sound quite complex that could be possible i think
so from the point of keeper dao what's the worst case scenario is it like a keeper dow two that colludes with a mining pool or is it a keeper dow two that colludes with um a client what do you would be the worst case yeah so i i think it's actually i think it's actually not not bad if if other say trading pools kind of start popping up because i think just as much as as keepers can coordinate with each other i think other trading pools can coordinate with each other you know so if there is you know some other keeper dowel keeper now 2.0 that pops up um even if they claim to be better you know i definitely see a dynamic where pools can can work together and coordinate together
you know and maybe they even have their own hiding game where it's like we have our hiding game where it's only keepered out and they have their hiding game where it's only you know their their their keepers but then in the wild i definitely see a dynamic where where this sort of thing can can happen um but it does get tricky because i also feel like in the wild um you know we use the the term collusion which i think has kind of like a negative connotation to it but at the end of the day you know that's kind of what it is but like uh you know working together in collusion they're kind of similar like so so say it's it's a trading pool working together with a mining pool um because it's you know it's it it can be very efficient that way that may
that may be what is most successful in the wild is is working together with mining pools you know i guess you could call it colluding but you know not to sound negative because it just may be the most efficient way maybe just kind of rebrand that to you know coordinating you know traders and mining pools coordinating again i i could see in the wild i could see multiple pools working together and i could also see you know multiple um you know traders working together with miners and we've actually had discussions with with some minors and that's definitely one of the interesting dynamics that has popped up in some of our discussions is you know it's like if if one mining pool is working together with this group of traders what happens when another group of traders come on now you have a mining
pool are they working with two traders or are they kind of married to one trader and the only way they can you know switch to the other one is if as if they're no longer working with us this trader you know so it's a lot of interesting dynamics coming through here so if if you look at the latest in the latest relationship between traders and miners what comes to mind to me um is the tai chi network that was recently launched by um sparkful which is kind of a white glove service where a u.s user can transmit um your transaction directly um to that um network uh without publicizing it and basically sparkful
will include it in the next block that they mine basically it it it shields you from being front run or background or basically if you have any sort of exploit it heals you from from being generally front run so where do you see this trend going because i mean if you look at if you look at this and if you actually think this further what will happen is you will have a small number or you will have some number of trusted ethereum endpoints to whom you would give your transaction to be mined without ever publicizing it directly and this would increase the barrier to entry for any
other miner immeasurably right because there'd be no free that that be no transactions in the mempool so to speak so how do you see this playing out do you think the mev issue is going to be what breaks the decentralization of ethereum or do you think basically we'll end up in a state where we will divide the right from mining the block from the right to ordering the transactions within that block or how do you think this is going to to play out it's it's really hard to see one particular feature or strategy succeeding i think we'll ultimately have a lot a lot it'll just be a combination of you know
features or strategies succeeding together and and it could be it could just kind of go back to you know the roots of mining pools you know and and how they're essentially independent from one another you know you may have some mining pools use this solution this strategy other mining pools use this solution in this strategy and maybe certain mining pools you know kind of uh work together to capture me in this way and other ones do it a different way um but generally i really like the the tai chi network and what they're doing there today you know in its current form today it works great when you don't necessarily need a transaction to get mined into the very next block or the next two or three blocks just because you're kind of limited on hash rate there that's the only downside
so like maybe one evolution here that that i would love to see would be say a similar tai chi network for every single mining pool like even having this feature kind of standard within node infrastructure would be nice because then you know no matter which you know miner you're speaking to you know you you could have this level of privacy but it's like technically the mining pool can do whatever they want so you know not all of them might go for that you know maybe only some fraction of them would go for that so we may only see a fraction of the hash rate have this sort of private solution and then i guess the other problem too is i mean what's to stopping am i what's stopping a mining pool from claiming that it's private when they're still
just front running it anyway you know so it's kind of like it's tricky like i i do i do i appreciate that um you know nodes and mining pools are kind of able to kind of have the flexibility flexibility to do it their own way i mean that's kind of what makes it decentralized you know hopefully hopefully we can get to a point to where either say something like a tai chi network the hash power of that feature grows dramatically like even if if you could say like have like you know 70 or 80 of the network has some sort of a trusted solution um then you just need to when you're broadcasting your your private transaction you just send it to 80 of the the network and you know the other 20 you just say well if they mine
the next block oh well you know that that would be kind of nice but um yeah i as far as like all of these solutions in general go i kind of see them finding a way to to co-exist i think multiple solutions will probably win in the end and we'll just be using multiple solutions in the future um it's it's hard to say if if any one particular one will trump everything else it's tricky because you know if you look at you know you know these profit opportunities today i mean they're they're going to be changing so much over the next few years and they really have over the last few years and with layer two solutions coming on board and these two coming on board i mean there's just it's i think it's going to get even more complex than it already is it like
unfortunately i don't really see it being completely solved i think it just becomes more complex especially with all these different layer twos and you know you'll have people arbitraging between various layer twos between layer one and layer two and you know between other blockchains and in ethereum and so i i unfortunately i don't really see it getting any simpler or any you know more complete it might just grow more complex but maybe we have you know decent solutions where you know a user can just simply make a trade to uni-swap in a private fashion without having to go through all these other steps and and like i said maybe maybe it's just as simple as maybe instead of just one tai chi network we have you know some good percentage of hash rate and they can say you know what i don't care if my transaction gets mined
in the next block because if i've got 50 hash rate hopefully it'll be mined in within the next two and they'll be fine you know so something like that hopefully we'll pan out so you don't think meb is going to break ethereum i like some of the solutions and and proposals that have been coming out i don't necessarily think it's going to break it because i i think it's just kind of a part of having a decentralized network with assets being traded i mean it's it's kind of natural i don't necessarily think it's going to kill it because i hopefully hopefully we can kind of stay ahead of the cat and mouse game and it doesn't kind of bring it to a screeching halt you know like for example um you know the the first in first out
upgrade that was made uh helped prevent a lot of the um you know tailgating strategies from spamming the networks um that was that was i think last year and then you know some some of the solutions like proposed to kind of i guess eliminate the the gas token so to speak is kind of helpful too because that kind of prevents that if we can if we can kind of kind of work towards it and then also just kind of implement solutions to kind of help you know streamline this process to to capture the value and distribute it you know to to parties involved i think that's good i don't necessarily think mev is going to bring ethereum down to its knees and completely you know destroy it no do you think um commit and reveal
schemes where basically you commit a an encrypted order or something and then basically it's committed and then you have to reveal it later do you think that's going to alleviate the problem to a certain extent um that's a good question i don't know um i don't know if i've really studied that enough to kind of offer an opinion on it but it's possible um i i also wonder like i don't know how efficient that is do you have an example because i'm curious about the the efficiency of that in terms of you know i guess from a trader's perspective i mean there's different ways you could do it right so basically you could encrypt a trade with them say three different i mean basically there are these
distributed key generation things where where you can you can encrypt with a number of keys and you can decrypt with any number of any subset of a number of these private keys right so basically you could have these schemes where you encrypt your order and it gets committed and then basically there are these uh revealers and a subset of these revealers need to decode it in order for it to become a valid order on the blockchain um so you can't basically no single revita can kind of block it and it's kind of out of your hands all of these cryptographic solutions are typically fairly gas intensive so that's what i was going to wonder is like i wonder you know
it sounds like it may actually involve multiple transactions and then it may also be gas intensive which is but it's it's you know it it may be yeah it may be effective because if you're if you're dealing with like a massive massive arbitrage you know what's a million gas you know what does that matter but i guess if if you're pushing thin profit margins it may not work but but again if you know if you're if you're looking to capture a million dollars then spending a million gas at 200 g way doesn't really mean anything so it may very well be yeah i'll have to do some more research on it i continue to be fascinated by how even putting together fairly basic elements of you know the trading uh the trading world kind of results
in such enormously complex games where where you can include and collaborate and kind of grieve someone else and so so on i think it's it's endlessly fascinating i'm i'm super curious to see how it plays out over say the next year or two yeah absolutely well super good to have you on joey thank you so much yeah thank you so much i really enjoy this thank you for joining us on this week's episode we release new episodes every week you can find and subscribe to the show on itunes spotify youtube soundcloud or wherever you listen to podcasts and if you have a google home or alexa device you can tell it to listen to the latest episode of the episode podcast go to epicenter.tv subscribe for a full
list of places where you can watch and listen and while you're there be sure to sign up for the newsletter so you get new episodes in your inbox as they're released if you want to interact with us guests or other podcast listeners you can follow us on twitter and please leave us a review on itunes it helps people find the show and we're always happy to read them so thanks so much and we look forward to being back next week [Music] you