This week, Jack Zampolin, Sommelier’s VP of Product fills us in on changes on the protocol side not only to accommodate users on v3, but to improve performance with some interesting new properties.
NOTE: Sommelier Uniswap LP Impermanent Loss management application is live at https://app.sommelier.finance. Make LP positions and receive rewards from our pool partners announced each week!
Jack tells us that sharing project updates on our new YouTube broadcast Sommelier This Week is becoming the favorite part of his week. Here, he continues the discussion of addressing Uniswap v3 with the team’s changes to Sommelier on the protocol side rather than on the app side, which he addressed last week. This week, he fills us in on changes on the protocol side not only to accommodate users on v3, but to improve performance with some interesting new properties. “I think they are going to be really exciting,” says Jack, who reveals in today’s update a bit about a new experience Sommelier will be launching on May 5th.
But, first, a quick recap on the purpose of the Sommelier chain: We’re here to provide a best-in-class experience for liquidity providers. “If you’ve got a few thousand dollars, up to hundreds of thousands of dollars, and you want to deploy that liquidity over a number of Uniswap pools we at Sommelier want to provide you the best experience doing that,” says Jack. “With Uniswap v3 there’s a lot of active management that’s required and the Sommelier chain is going to provide that active management in return for some fees. And in order to get those fees we want to bring in as many liquidity providers as possible to run on top of our system. So providing accurate prices gives those liquidity providers more fees and, in turn, the system earns more.”
The first protocol-side change that happened this week is that validators now will be voting on where they want the liquidity in each of the pools that are managed by Sommelier to be deployed.
Jack explains what that means:
“In Uniswap v2 when you’re a liquidity provider you're providing liquidity over all possible price ranges within an asset pair. That has positives and negatives. The huge negative is impermanent loss, which is what we had designed the initial version of the Sommelier protocol to help protect against. We would automatically pull your liquidity out if the impermanent loss got to a certain percentage. But with Uniswap v3 you have to say ‘I want only to provide liquidity between these price ranges in this pool.’”
This is a feature called concentrated liquidity and the more you concentrate your liquidity, i.e., the tighter that price range is, the more fees you’re going to end up making. So, the best way to make money on Uniswap v3 is to move your liquidity to where the trading is happening and to do that dynamically. That obviously requires some knowledge of what’s going on in those markets as well as potentially other markets, and this is actually an unbounded data problem.
Jack explains the reason for the change: “The way we were doing it previously, bringing a very specific look at the Uniswap markets into consensus is not really scalable and it’s not going to work for 32,000 different pairs that exist on Uniswap. So instead what we’re going to do is have validators pull in data from a bunch of different sources and then use that to make a decision on where the liquidity they’re managing in a given pair needs to be deployed. In that way we can chase where the market is and deploy that liquidity in a way that’s going to maximize the amount of fees that our LPs in Sommelier are getting.”
Said another way, validators will have to compute where the future position on the price will be on their own. “We’ll give them some sort of puzzle, then they’ll submit their answer and we’ll average those, throw out some outliers and do a little clean up on that data,” Jack says. “We then compare their answers with where the liquidity actually is over in the Uniswap pool and then there’s a transaction that’s sent over to Ethereum to move that liquidity over to the new position.”
Let’s use the price range around $2,000 as an example. The validators would say, ‘We want to deploy all this liquidity between $1,900 and $2100’ and if the price starts going up and edging up toward that $2100 the validators would see that and their votes would say ‘ok the price is going up, we don’t want to risk being in a position where our position is inactive risk, there is risk of loss there as well as we’re losing opportunity cost, so we need to move where the liquidity is deployed from $1950 and then all the way up to $2150.’ And every period, like every five blocks or so, the validators might vote and if there’s enough votes for a new position then the position will be moved.
Jack points out something else he and the team are working on in Sommelier app protocol that will likely in v2 of the protocol will be “a back-testing oracle where we will also be bringing in price data from these various pairs into consensus and we’ll be rewarding validators based on them keeping their votes within the range where the price has actually ended up,” says Jack, “so we’ll do that on a back-testing basis. In much the way that a fund manager back-tests strategies, we will be back-testing the validator decisions on where to deploy this capital.”
Validators by their nature are going to have some tokens and those are going to be stake-earning rewards and a chunk of those rewards are going to come from fees from these pools. They are incentivized to get as much return out of this liquidity that they’re deploying on Uniswap as possible. So whatever sort of data that they can use to better calculate that will quickly spread throughout the entire validator set. However, the validators already are incentivized to deploy that liquidity in the most advantageous way possible.
The refactoring of Sommelier’s gravity bridge has been going on for a little while. ”The team has run into a couple of roadblocks,” Jack explains. “One is doing protobuf-based transactions in Rust, currently the orchestrator which is the piece that sits between Ethereum and Cosmos listens to events over on the Ethereum chain and submits them to the Cosmos chain.”
That piece of infrastructure is written in Rust and there is some work that needs to be done to enable transactions in the new Stargate format in the Rust code. “That’s been more of a blocker than we anticipated.” says Jack, “So, that’s taking some time in order to validate the new interface that we have that changes some naming and makes the system a lot more stable. That’s one slice of what’s going on. Justin from the Althea team, Tony from the Occlusion team, and Marco from Interchain Berlin are all working on that piece together right now and that’s progressing as quickly as it can.”
And, then on the other side of things, Sommelier co-founder, Federico Kunze, has also started on the internal state refactor, which is going to optimize as well as clean up a lot of the internal code and document it along the way. That’s happening in parallel.
When we’re talking about making cross-chain contract calls from inside modules and doing automated transactions over on Ethereum the gravity bridge is a really crucial piece to get right.
“The reliability needs to be extremely high,” observes Jack, “otherwise everything else we build on top of it will fail. So, we’re working really hard with a number of stakeholders across the ecosystem who also rely on this technology to ensure we get it right and we’re testing it with Sommelier’s own code as well so that work is moving along as quickly as it can. We’ve got a large group of stakeholders and we have the people we need to make the changes that are needed to make it as stable as it should be.”
The team also kicked off efforts to assist Uniswap this week. “We had a chat with the team and we are going to help them with the Uniswap v3 subgraph,” says Jack. Because of the work he and the team had done on v2, he says “we actually did quite a bit of performance engineering on the Uniswap v2 subgraph that led to a [$1MM] grant with the graph itself to help improve indexing performance. Through that work we gained some experience as a team building those subgraphs and modifying them.”
As soon as the Uniswap v3 contracts came out Jack says one of the first things the team said was: “Where is the subgraph?...because we need to use this data to hydrate the front end and to give users the data that they need to make good decisions about where to deploy their liquidity.”
In the app side Sommelier is going to be launching an experience on May 5th that allows users to submit liquidity to the Uniswap pools. “The way that we’re going to do that is by showing them data about these Uniswap pools and giving them the data that they need to make the decisions,” says Jack. “We’re also going to be using this on the protocol side. So this subgraph is a dependency on a lot of the things we need to do and the data formats that are coming out of it are going to determine direction for a few things. So that was a really critical piece to get right moving forward. We’ve worked closely with the Uniswap team to provide an initial version of that. Kevin Kennis from our team is doing that work and doing a great job. I also did a little bit of work on it.”
We have deployed an initial version of the v3 core subgraph on some internal infrastructure and are doing some testing on that. We should have a final version late this week, early next week. We’re still waiting for the v3 periphery contracts, which have some specific information around individual positions to finalize over on the Uniswap Repo.
And you could actually go over to the Uniswap Repo and look at those v3 periphery contracts and the team is pushing updates to those still. Good to see them doing some debugging and adding things like some safe math and migration utilities and things. That’s the kind of code that’s going in now, but as soon as those finalize we should also have a subgraph for those as well.
DEX Tech is a private Repo on additional data to help hydrate these front ends and to help users make good decisions about where to deploy their liquidity. One of the major issues we had in building on top of Uniswap v2 is how long it takes to index the subgraph.
“It is on the order of months right now if you want to index it for all Uniswap historical data,” says Jack. “We’re building an internal method to get some alternate price and volume data from Uniswap as a backup in case we’re not able to fully index the Uniswap v2 subgraph before launch. We want to show users what’s been happening in the markets over the last couple of weeks as a way to help them make their decision on where to deploy liquidity. Give you some moving averages, some Bollinger Bands, all of the fun stuff so that you will be able to see where the market has been, and where it might be going, and where you’ll want to deploy your liquidity.”
The protocol is undergoing a substantial refactor so Jack doesn't anticipate a test net before May 5th. “A lot of my time and some of the other folks on the protocol team we're working hard to shore up the data infrastructure that we have for that launch. And a lot of the protocol stuff that we have happening right now is in the design phase, and the spec phase. So we’ve made a lot of progress on specing out the Decision Module.”
This week and next week we’ll see progress on specing out the Cellar Module. This is the model where you’ll get a pool share. It’s going to make the experience of providing liquidity on Uniswap v3 a lot like it was on Uniswap v2.
In Uniswap v3 the liquidity positions are non-fungible tokens and they’re not immediately interchangeable. In Uniswap v2, when you deposited liquidity, you got back this ARC20 pool share token that represented a share of the fees in the pool. It’s not the same in Uniswap v3. And that fungibility of those pool shares has gone away.
What the cellar module does is makes liquidity in Uniswap v3, the stuff that Sommelier is managing, fungible again. So when you provide your liquidity to Sommelier, the chain will go and deploy it and it will give you back a share of this pool on Sommelier. The game plan is for users to be able to trade their shares of the pools on Sommelier.
“We’ve had some initial wireframes of the experience for depositing liquidity for Uniswap v3,” says Jack. “We’re going for a really minimal experience and trying to use data to drive the experience for end users. We want it to feel a lot like deploying liquidity on Uniswap v2 but still give users enough information to make accurate decisions and understand the risks of deploying their liquidity in v3. So, we’ve got the initial wireframes, we’re working really hard on the data structure to support this.”
We’ll have more to share soon. Join our Community to stay updated 👉 https://t.me/getsomm
NOTE: Sommelier is live at https://app.sommelier.finance. Make LP positions and receive rewards from our pool partners announced each week!
Is Speculation Killing Crypto’s Future?
Sommelier's Path Forward: Embracing Revenue Over Narrative
Sommelier January Update
Sommelier Upgrades Cellar Architecture to Enable the Most Powerful DeFi Strategies in the Market
Real Yield USD is Coming to Maximize Stablecoin Yield
Retrospective on 2022 and the Journey Ahead
FAQ - Patache Digital’s Steady Strategies
Patache Digital: Risk Management Discussion
Strategy Deep Dive: Patache Digital
Strategy Provider Spotlight: Patache Digital
User Guide: How to Participate in Strategies on Sommelier
Sommelier Ambassador Program
Strategy Tokens: What Are They and How Do They Work?
6 Core Principles of Sommelier
10/10/22 - Deep Dive on Cleargate Backtesting
Strategy Provider Spotlight: Seven Seas
Deep Dive on Trend and Momentum Strategies
Strategy Provider Spotlight: ClearGate
Supporting Strategy Providers on Sommelier
Sommelier Protocol Team Weekly Update #11
ELI-5 Explanation of the Data Science behind Sommelier’s First Aave Cellar
Sommelier Protocol Team Weekly Update #10
The Data Science Behind Sommelier’s First Aave Cellar
Sommelier Protocol Design Documents
Sommelier Protocol Team Weekly Update #9
Sommelier Protocol Team Weekly Update #8
Sommelier Protocol Team Weekly Update #7
Twitter Spaces With Sommelier: How to Launch a Cellar on Sommelier
Twitter Spaces With Sommelier: Protocol Upgrade and Community Update
Sommelier Protocol Team Weekly Update #4
Sommelier Protocol Team Weekly Update #6
Twitter Spaces With Sommelier: SOMM Airdrop Proposal Data Analysis
Twitter Spaces With Sommelier: Community Update on the First Cellars to Launch
Twitter Spaces With Sommelier: Exploring NFT Cellars
Sommelier Protocol Team Weekly Update #1
Sommelier Protocol Team Weekly Update #2
Sommelier Protocol Team Weekly Update #3
Three Things You Need to Know About Sommelier Governance This Week
Sommelier On the Road: PROOF OF…REPUTATION
Introducing Ukpai Ugochi - Working on The Sommelier Cellars Rebalancer
Sommelier Announces 23MM Series A Mainnet Round to launch Automated DeFi via the Cosmos
Twitter Spaces With Sommelier: Mainnet Launch & Gravity Bridge
Twitter Spaces With Sommelier: Introducing SOMM Tokenomics
Twitter Spaces With Sommelier: Mysten Labs AMA With Evan Cheng
Introducing SIPS and Sommelier’s Governance Structure
Twitter Spaces With Sommelier: End of Year AMA 2021
Twitter Spaces With Sommelier: Intro to SIPS & Lisbon Blockchain Week
Twitter Spaces With the Sommeliers: Mainnet Update and Governance Launch
Sommelier Partners With Mysten Labs to Make Sommelier and All Cosmos Blockchains the Fastest Protocols on the Planet
Twitter Spaces With the Sommeliers: Sushi AMA With Joseph Delong
Introducing the Sommelier Network Mainnet and Ethereum Gravity Bridge
The Top Five Features of the Sommelier Protocol
Call for Validators: The Two Step Process for 2021
Two New Features Launched to Test Liquidity Management on Uniswap v3
Uniswap v3 Remove Smart Contract Incident Post Mortem for Sommelier
Call for Validators: Road to Sommelier Mainnet
Sommelier Liquidity AMA With Yenwen and Nick From Perpetual Protocol
Sommelier Liquidity AMA With Tascha Pan From Alpha Finance
Sommelier Liquidity AMA With Loi Luu From Kyber Network
Sommelier Liquidity AMA With Alex From Peanut
Sommelier Liquidity AMA With JP From THORChain
Sommelier Liquidity AMA With Alan Chiu From OMGX Network
Sommelier Liquidity AMA With Ari From Gelato Network
Sommelier Liquidity AMA With Sunny Aggarwal From Osmosis
A Fine Sommelier Explanation of Bollinger Bands With Kevin Kennis
Sommelier Liquidity AMA With Mona El Isa From Enzyme
Sommelier Liquidity AMA With Haxor From Method Finance
Sommelier Liquidity AMA With Tor From Secret Network
Liquidity Provider Insights With Zaki Manian - Ep. 7 - DeFi Automation Space on Uniswap v3 and Where Sommelier’s Heading
Sommelier Liquidity AMA With Geralt From CyberFi
A Pairings Tutorial of Two Sided Liquidity Addition with Sommelier
Liquidity Provider Insights with Zaki Manian - Ep. 6 - Liquidity Providers Need to Gear Up for a Multi-Chain World
Three New Summer Features for Liquidity Providers
Sommelier Liquidity AMA with Tom C and Max W from Charm
Sommelier Liquidity AMA with Dereek69 & Shalaquiana from BIOPset
Sommelier This Week - June 3rd 2021: The Road to Mainnet
Sommelier Liquidity AMA with Federico Landini from DefiLab
Sommelier Liquidity AMA with Michael Egorov from Curve
Liquidity Provider Insights with Zaki Manian - Ep. 5 - A Bright Light at the End of a Long, Tough Weekend for Bitcoin
Sommelier This Week - May 27th 2021: What Aspiring Sommelier Validators Need to Know on Last Week’s Protocol and App Progress
Liquidity Provider Insights with Zaki Manian (Special Edition) - Ep. 4 - New Pairings Release
Sommelier R&D AMA With Yaniv Tal From the Graph
Sommelier Liquidity AMA with MacLane Wilkison from NuCypher
The Eight Steps to Become a Liquidity Provider with Pairings
Sommelier NFT Awards - May 18th, 2021
Pairings By Sommelier: The FAQ
Zaki Manian Breaks Down What Liquidity Providers Need to Know Under Uniswap v3
Sommelier This Week - May 6th 2021: How This Week’s Protocol and App Progress Weaves Together to Make a Product
Sommelier Liquidity AMA with Dan Thomson from InsurAce
Sommelier This Week - April 29th 2021: Weeks Away From a Taste of the Sommelier App Experience and How the Dev Team Stays on Track
Zaki Manian Breaks Down a Phase Change Liquidity Providers Need to Know About Automated Market Makers
Introducing Jehan Tremback: Sommelier Core Developer and Althea Co-Founder that pushes the Limits of the Blockchain Bridge with Gravity
Sommelier This Week - April 22nd 2021: An Inside Look at Progress on Coordinating Sommelier Components That Contribute to the Chain
Sommelier This Week - April 15th 2021: Providing a Best-in-Class Experience for Uniswap Liquidity Providers
Sommelier Announces $1M R&D Grant from The Graph Foundation
Introducing LP Rewards: This Week With Cellframe
Introducing Deborah Simpier: Althea CEO and Sommelier Co-Founder Who Brought the Gravity Bridge to Life in The Cosmos
Sommelier This Week - April 8th 2021: What Uniswap v3 Means For Sommelier Architecture and Validators
Introducing Sommelier LP Rewards Program
Sommelier This Week - April 1st 2021: Gravity Bridge and Private Testnets
Blockchain startup decides to acquire a California winery and host NFT wine parties
Introducing Justin Kilpatrick: The Blockchain Bridge Wizard Who Maintains Gravity
Five Ways UniswapV3 changes the world for Liquidity Providers on the AMM
Introducing Jack Zampolin: On Becoming A Sommelier in The Cosmos
Sommelier: Welcome To The New CoProcessor For Ethereum
© 2024 Somm by Bajanss OÜ –Maakri 36-50, Tallinn, Estonia 10145