Cross-ecosystem apps are the most capable in Web3 / Manian

EthPrague 2023 · June 2023 · 20:19

Sommelier Finance co-founder Zaki Manian explains the architecture behind Sommelier, a decentralized asset manager that combines a Cosmos chain with ERC-4626 vault contracts on Ethereum and other EVM chains. He describes how strategists propose trades, how validators running Steward check them before they reach the vaults, and why tokens are never bridged, so contract-level limits still protect users if a bridge, the validator set or a strategist fails. He also points to shared security tools such as EigenLayer as a future option.

Speakers

Topics

From EthPrague 2023, hosted by ETHPrague.

Transcript

all right hello I'm Zaki co-founder of sommelier Finance uh so if you saw my uh D5 Summit talk uh similar content but maybe a little bit of a different emphasis uh for D5 Summit I was mostly showing the strategies and the yields and the performance this talk is more like showing the architecture that we do motivated a little bit by like when we started building this complicated piece of Machinery that is familiar a lot of people ask the question like is all of this complexity necessary now that the system has been generating sort of superior returns uh for most of the year uh has been through

a bunch of stress tests uh and you know Black Swan events like the usdc depeg uh I think that the the architecture has already validated uh what the complexity is for uh and so this is this talk is mostly trying to explain uh why build things this way um and frankly it's substantially easier to build a system like similia today than it was when we started two years ago uh but uh and you know a lot of our code is just like out there to be forked um so you know encouraging people to experience with this so what is the problem sommelier solves uh similier is a crypto native decentralized asset

manager or it's like an infrastructure for doing that it's basically the observation was that the killer app of the last cycle was cd5 but cd5 rugs you inevitably Celsius Voyager et cetera and how do you build a system that has the uh core functionality of cd5 I.E the ability to you know deposit your funds once be confident that you're getting the best possible returns but still have transparency permissionless composability all of the things that we love about defy um so as I said this talk is mostly uh showing the architecture this is a diagram the architecture we'll break it

down later in the talk but mental model of this is a novel system in which we have combined a cosmos blockchain A bunch of smart contracts on ethereum and other EVMS Bridges to achieve a this digital asset manager so where we sort of think of ourselves as urine and similar Protocols are not Market adaptive they are dust missing many opportunities uh that exists for yield and then we have uh sort of actively managed optimized vaults but are run by multisigs and you know that

is just sort of a regulatory time mom that is waiting to happen and requires sort of an excessive amount of trust um so to solve this problem we built sommelier um simelier's adaptive structure allows for vaults that do you know prediction react optimize and evolve um wall retaining decentralization so the general point of this is by building this architecture we've been able to produce vaults that outperform anything else on ethereum uh real yield eat has been the highest source of each denominated yield uh since Inception uh you know and it continues to be battle tested like you know we just went through a bunch of uh liquid sticking

derivatives small dpegs uh in the last two days because of the market movements uh strategy continues to be doing just fine this architecture has also been one of the uh top performing liquid uh LPS on uniswap uh using uh one of the top performing LPS on uniswap uh even though it rebalances far less frequently than uh other LP uh like other unit swap liquidity providers in like a super competitive pool uh the usdc usdd pool um so by doing things this way there's a lot of options and then we just launched this new uh set of yield opportunity communities for uh like uh link uni ens uh the link Vault just had a hit 100K

over the weekend uh there's still very low gas prices to enter these vaults because uh of the market volatility we have these walls haven't yet deployed funds so yeah like the other option the other point is right right like there are a lot of opportunities especially as more sophisticated money has left the ecosystem there are a lot of uncaptured Arbitrage opportunities in defy there isn't tooling to allow uh anyone to sort of participate in like a thesis-driven bet so the thesis is that there is this Arbitrage opportunity between uh what it

costs to borrow uh uh eat in defy and what you can earn in a protocol like really old eth we can take advantage of that Arbitrage opportunity and we can uh allow people to earn yield on wink or uni that they can't earn today so it's really from my point of view the point of similier is making like a thesis driven essentially hedge fund style bets but available natively within defy okay so as I said pointed this talk was less about showing the yields the yields are the motivation for like hey like building this incredibly complicated system uh was actually worth it

um yeah so I think this is a laser pointer cool all right so what's kind of like you can kind of work two ways from ethereum through this similarly aging to the strategist and let's try that as like a way of of thinking about this so there are a bunch of defy protocols on ethereum they are they settle the largest amount they're you know the largest D5 protocols by tvl they represent the largest amount of real economic activity um there's spectacular opportunities to generate real yield um and ethereum's transition to proof of stake has also opened up a huge amount of sort of uh stake Phi opportunities

that are existing so similier spent you know you have been through multiple versions of essentially a set of smart contracts um what do these smart so the smart contracts are erc4626 vaults um and adapters that allow you to sort of take the strategies to take potentially any position in D5 we need an adapter smart contract uh and a way of pricing the D5 position um but we also are protecting users with these with these contracts so the whole point of you know of this architecture is I didn't want to try like trust the validator set for everything it's like oh we're just going to have a proof of stake validators that

we're going to trust them they're not going to uh run away with everyone's money uh we can do better than that um so the defenses that exist within the smart contract are like things like uh whether or not the strategist or the protocol can take fees uh the uh amount of fees uh what D5 protocols the strategy actually can interact with um whether or not uh like sort of uh Health factors on leveraged positions are are fall below their minimum uh all of these things can be actually implemented as uh uh as protections within the smart contract therefore giving like most of the benefits of you know a pure each secured system and it

basically means that like again we one of the most important principles was not Bridging the tokens it would be unnecessary to bridge the tokens and therefore you're not taking on any sort of custodial Bridge risk so like you know let's say the bridge gets hacked let's say the validator set gets compromised let's say our strategists to turn evil the uh the the smart contracts are still there protecting the user um well and like what the strategist with the smart contracts can't do is they can't you know guarantee or protect your ability to generate returns but they can guarantee your ability to withdraw funds they can guarantee your ability uh the transparency of like what is the strategy actually doing um and it can constrain so like there's

this constant tension in the architecture between how much flexibility we have in the smart contracts um and how much trust we have in the other layers of the system all right so then we have an app chain um so app chain built with the cosmos SDK been working on Cosmos for uh uh for you know almost a decade what I would say is similier is very much a proof point for what I've said for a long time which is that Cosmos is not an alternative to ethereum Cosmos is uh like an accelerator or uh uh you know the um the co-processor uh meme start I think similier was like the first team to use

that but now you have like Axiom and Herodotus and all using the coprocessor meme uh we like a cosmos chain is simply a way of coordinating between a set of validators um you can use it for implementing the kinds of logic that would be infeasible to implement on a pure each system um and you know again this is similarious chain it's not we're not like a competing general purpose L1 we are a true app chain uh for strategists um you know the other thing that is really great about using similier from our point of view is that like if you're a user of a song chain you don't need like if you're a user of a similarious strategy you don't know that the cosmos chain even exists um you will enter a

strategy via metamask uh you will see all your positions on Smart contracts your erc4626 tokens will be issued uh on the ethyl one or on an ALT evm that we run on so the entire sort of purpose and point of the system has been you know get the like use the cosmos chain in that place where it makes the biggest difference which is like Distributing fees to some stickers and strategists selecting a validator set coordinating that validator said doing governance uh but use ethereum where it is best which is defy composability uh access to a large and like a large amount of economic flows and a lot of counterparties all right

um so the next point of this whole system is again we'll just do this I can all right so on the submit like again whole vision of the system is built build a system that cannot rug so we have the uh uh we have we don't Bridge tokens so like some Lea validators that gets compromised it's not going to run with uh economic attacks on the sound validator set not going to run away with everyone's money uh we have Protections in the smart contracts themselves so you know the strategists can't just like wake up and uh ape into a D5 protocol that was launched yesterday uh or like steal all

the money themselves uh via a call uh but we want more protection like the whole point of this thing is so we built this application called Steward and Steward is by far like the most exciting security mechanism that exists within the similier stack uh Stuart is a process it runs on every validator when a strategist wants to essentially make a trade rebalance um they are basically telling the validator Set uh the route like the position that they want to change to um so let's say you know you have uh you know a bunch of uh uh uniswap LP positions and you want to change you may

need to swap tokens to take on inventory to change what like the balance of tokens uh all of that gets executed and constructed by a steward what we can do with Steward is we can make potentially malicious things that the validator could do if like for uh or like the strategist could do so if if we just gave like the strategist the ability to submit arbitrary API calls like arbitrary trading messages to there's a lot of things that like still would be bad like they could route all the liquidity uh through a low liquidity pool uh uh they could you know do other things uh that could potentially harm users we can prevent all of that through the steward reference implementation

like Steward can do things like simulate the transaction against like Foundry uh or like a commercial API like tenderly uh it can make uh certain like it can restrict the route like the routes and the pools uh the strategist is allowed to access for a given strategy um and you know basically the interaction between Steward and governance can also do things like you know if a new D5 protocol needs to be added it has to go through a governance vote all of that is maintained through this like off chain second like uh sort of every validator must run Steward architecture um and essentially the point of like the psalm token uh is to enable the credible decentralization of the system uh so

that you aren't relying on a centralized counterparty to do this so let's go back to the architecture so smart contracts Bridge like the bridge is essentially the least interesting part of the system at this point um like we right now we launched with our own uh implementation of cosmos's gravity Bridge we're about to adopt axolar for a lot of alt EVMS um there are a lot of bridging options to choose from that could potentially use could be potentially used if you were building a system like this um then you have the stimulator blockchain and validator set which runs Steward and then you have the and then

you have the uh strategy providers strategy providers are off-chain non-decentralized computation like they're single entities uh or like Gauss of one kind or another um they are running invisible like you don't know how they're like how what their model is uh why they're doing the trades that they're doing uh certainly all the trading information is public but you can like watch like the strategist uh sort of Alpha and model and thesis can be proprietary um and so this is like or sort of a balance of concerns from a bunch of different race one is like the argument is is that like a lot of traditional

checks and balances that are in fund Administration are are sort of operating in the protocol itself uh so the investor protection the user protection against you know when do you take fees how much do you how much fees you take are they calculated correctly Pro rata um like are you using a are you potentially picking like bad trading venues Etc the architecture as a whole is able to mitigate most of that most if not all of that and thus we are able to safely use these sort of dynamic off-chain strategists who are able to come up with strategies and pursue opportunities that generate the sort of outsized yields and potentially and like

returns and could be real be used to build indexes or automation Frameworks or any number of things uh using this like common architecture so just finally did I kill it maybe all right so like what does the Som token do oh thanks foreign token do Psalm it's Cosmo staking token non-inflationary uh which is somewhat unique in the cosmos space we've had a lot of problems uh of late in the cosmos ecosystem with various terrible things

that happen due to the various hyperinflationary tokens uh some was always conceived as a non-inflationary token uh basically what like there's this inherent sort of uh mechanism by which the psalm Dao is sort of critical to the operating of this entire infrastructure um you know it's essential for the kinds of user protections that we talked about earlier um and basically what happens is the goal of Psalm is to generate staking rewards from the real users of the protocol and from the economic value that is produced uh essentially the profit of the strategies we're not there yet we probably break even around 300 million TVO we're at about 15 million right now but we keep launching all of

these new strategies we we have a Bitcoin yield strategy coming soon for wbtc uh and there's a pretty reasonable way in which we sort of get to making this thing a truly economically sustainable uh system uh so thank you very much I think I have two minutes for questions [Applause] um hi um it seems like you can do all this on the evm Chang what's the purpose of plugging you know where what is going to coordinate your validator set like where is Stuart going to run on an evm chain

um look from my understanding is that it seems like the um you just provide a a instruction on through the bridge into you know the vow to about where the strategies are gonna go I mean yeah like that part seems like the only reason through your diagram um it's currently used okay so I think you missed a key point the key point is steward the strategist never get to talk to the smart contracts directly if the status could could talk to the smart contracts directly this the strategist could generate trading

instructions that would harm users that would lose money that could potentially arm users Steward is the key piece of this whole architecture Steward is the system by which validators uh run a system that checks proposed trades and and uh automatically analyzes them and like mitigates the possibility of a strategist generating a trade that would obviously harm users uh by like swapping through like a super low liquidity unit swap pool that trust mechanism that Mitigation Of Trust between strategists is like core to the safety properties of the system and basically I don't see an uh a way of of uh of sort of doing it with ethereum today you could build a system like this

on top of eigenware but that's like that is a system that is not launched yet um anyways assuming people are rational and will deposit to winning uh vaults is there some kind of performance review that the Dow performs or something yeah we we do that there's a governance vote for every new strategy and there's been a governance supposed to like deprecate strategies in the past that were underperforming okay and is there an intention to replace some or all of these with AI agents in the future or although yeah that would be really cool okay thank you very much [Music]