Launch App

Sommelier Liquidity AMA With Yenwen and Nick From Perpetual Protocol

Sommelier Cofounder, Zaki Manian, recently spoke with Perpetual Protocol cofounders, Yenwen Feng and Nick Tong, who he notes are well-known for building a decentralized version of one of the killer centralized exchange protocols perpetual swaps.

About Yenwen Feng and Nick Tong

Yenwen says he fell down the crypto rabbit hole in 2017-18.

“When we saw the crypto TT, that was really amazing. I build games so I felt that we should be able to do something like crypto TT on blockchain. But after exploring I thought it’s really hard, so we pivoted, did lots of surveys, and then we wanted to build a derivative on Ethereum. In 2018 we designed a new protocol so you can trade options on Ethereum, which is a really interesting concept but we were too ahead of our time so we actually failed. We talked to Binance a lot so we joined Binance Lab’s incubator at that time and they were working on other things.

“Fast forward to 2019-20. We see the success of Uniswap and also Synthetics so we feel like we should go back to DeFi. This is where the growth is at so we go back to derivatives. After two years I think the concept of AMM is really great. We never thought about that in 2018 and we don’t think that we will get so much traction. So we ended up trying to design an AMM for derivatives and then we pick Perpetual Swap. So that’s kind of how we started.

“So fast forward again to now the POGO has launched over seven months and I think we got a pretty good chat chain so the total trading volume is over 20 billion. We took probably 70, 80 percent of the decentralized derivatives market. So, things are going well and we are working on the V2 right now.”

Heading into the evening in the UK, Nick Tong keeps his background superquick:

“I started in the crypto space in 2013, so I got Goxed and left for a bit. I came back in 2016 and ran a friends and family arbitrage fund, left again to join a fintech based out in Sydney and then finally, around just before Uniswap v2 launched, I started exploring the space and came back, started helping a bunch of projects, and then fell in love with DeFi and have been there ever since.”

An AMM for Perpetual Swap

Zaki hones in on the idea of an AMM for a derivative.

“The AMM for Perpetual Swap is a pretty different idea than the traditional AMM in the spot market. There’s a bunch of observations here. One of the things that’s interesting and observable about the crypto market structure is that in the centralized exchange world price discovery is all in derivatives. It’s all in perpetuals for most major crypto assets.

In the DeFi world, price discovery is still primarily in spot, and I think you could maybe attribute that to the success of the Uniswap style automated market maker for spot markets. What makes an AMM for perpetual perks special?

Yenwen reflects on the question and says:

“Let me start with the design. It’s actually more complicated than most of the AMMs you see in the spot market. Of course, I think Uniswap v3 is actually very complicated. I think there are different approaches that people, different teams, want to build a derivative AMM either on like Perpetual, I mean swap contract, or like options, or interest rate swap.

“But, I think the problem that most teams face is even at another dimension. Like, if you add leverage you need to think about lots of things only by adding leverage. So, like options they add the time component to that. Even just by changing a little bit just in one dimension you change a lot. But this is very interesting. This is one of the things we have been working on for a long time. So, I think we are really good at -- I try to create this virtual asset and then place those assets onto a traditional spot market AMM and then have leverage on top of it.

“As to the market, I think the spot market AMM still has the major market share. Mostly for the derivatives for the professional contracts we’re working on we are exactly behind the centralized exchange, especially on the useability. Kx provides more features, it’s faster, it’s more responsive, so I think we’re still behind our centralized counterpart. It still takes time for us to reach her. I mean there are lots of new improvements. We know more about how to design this AMM so we could add more features. So, definitely I think in probably one or two years we should be able to catch up to the central exchange.”

Nick says, “The only point to add is how the AMMs came about. Most of it has been

due to the underlying Ethereum blockchain and the constraints on it. Like, an order book doesn’t work on it so we’ve seen this innovation in the form of AMMs come out. And, I think that’s quite interesting and I suspect we’re going to see it continuing forward. We’re taking something old that may work in web2 or traditional finance, but may not work in the world we’re living in now.”

Could you expand on that a little bit?

Zaki’s interested in learning more about the direction AMMs are heading. Nick explains:

“If you think about how a regular exchange and the order book model requires extremely high throughput. And I guess by default Ethereum back in DeFi Summer gas costs skyrocketed all the way to 800 Gui in some instances. So even just removing liquidity and replacing it with an order book is just not feasible, and so the AMM was a construct that was born from it to allow for this kind of price discovery, I guess, without having to face the throughput limitations of Ethereum. Obviously, Ethereum’s getting better with Eth Layer 2 and L2s that are coming out but there’s still going to be these limitations. So, I think it will be really interesting if there are going to be similar kind of innovations that happen in the space and it will be better as a whole down the line.

Zaki jumps in. He’s been of this opinion for a while:

“AMMs, yes they function well in computational and constrained environments but the move towards concentrated liquidity has made AMMs much more like order books. What the real key think that I think is interesting is I think AMMs really took off when liquidity mining was introduced and that’s the thing that you can’t really do in a centralized order book, or an order book generally, is have this locked liquidity liquidity mining construct. And I think that’s one of the real keys to all of this. Do people incentivize liquidity on perpetual protocol today? Do projects incentivize price discovery on their perps on Perpetual Protocol like they do incentivized liquidity on Uniswap v2? Has that happened yet? Is there any reason you couldn’t incentivize LP shares? I could have a sticky engage contract.”

Yenwen says he also thinks that the centralized exchange can do this. “They actually incentivize the market makers. So, for the market maker they always have this kind of agreement that if you can keep the spread within a certain range and then you get a free discount. Just because they don’t do this aggressively like DeFi, I think they still can do this just in a way.”

Zaki says what’s cool about AMMs and liquidity mining is that in a centralized exchange finance can incentivize market makers because “they see everything and they have enough data to understand whether or not anyone is gaming their incentive program. They know who the market makers are.”

“But, he adds, “this model of paying market makers of projects when they launch and paying market makers to provide liquidity on decentralized exchange, it’s always been a tricky thing. It’s never really understood exactly what you were getting or what you were paying for as a project is trying to get a token out into the world. And I think the elegance of it is not Uniswap’s ability or Curve’s ability to provide liquidity mining, it’s been the third party project’s ability to incentivize that has been interesting. I think it’s an interesting question as to when that would also come to the perpetual market in DeFi.”

Yenwen says he totally agrees and explains::

“Traditionally, you cannot be a market maker, you know like a centralized exchange market maker makes a lot of money but it is always a private deal so you’re not able to participate in that. But, on Uniswap you can participate, you just have to provide equity. So, I think that actually changed a lot of things, especially on Uniswap v3. So, I think the same on perpetual, at least on like perpetual political because I think we have this very interesting design in our v1 that you don’t need a liquidity provider so that’s why we don’t have this kind of discount program. But, in v2 there will be liquidity providers so we definitely will run some programs for liquidity providers. And, the liquidity provider doesn’t need to be a market maker, or an institution, or a new, special role. Just everyone can be one and then everyone can earn the fee rebate. I also see not only Uniswap v3, Uniswap v2 or other projects the liquidity provider actually earns 100 percent of the fees, or maybe like 80 percent of the fees, but compared to the centralized exchange the liquidity provider or market maker they only get some rebates. So I think that’s also very different. On Uniswap v2 or v3 you have a very large design space that you can build an algorithm because the fee actually is 100 percent so you can actually do lots of things in order to earn the fees. So, I think that’s also very different from a centralized exchange environment.

AMMs without liquidity providers

Zaki wants to know how you can have an AMM without liquidity providers and why the Perpetual Protocol team is bringing in liquidity providers in v2.

Yenwen says:

“First, let me explain how it works in v1 first and then you will kind of see the reason that we are going to bring them back in v2. For Perpetual Protocol, if we look at the protocol itself we have two functional units. The first one is that the trader can put in collateral and then we mint virtual tokens. So, we have this unit that we will take the collateral and then store it in a vault. So, if you’re putting in 100 USBC, you want to have two as average, we will meet 200 virtual USDC for you. So that’s one part. The second part is a pricing engine. So, in v1 we have this the same as Uniswap v2, we have this SYK model. So previously we said 200 virtual USBC, we actually put that onto Uniswap v2 the curve and then we kept something. Let me give you a concrete example.

“Suppose that we are trading on a virtual ETH market, so ETH USDC, which means that we can mint virtual ETH and virtual USDC, so for example, Agnes wants to come in, she put in 100 USBC 2X average, we made 2200 virtual USDC for her and then she put in this SYK model. Suppose in this model there are already some tokens there. Let’s say that there are like 10,000 USDC and 100 ETH there, which means that this price is 100. We put in 200 virtual USDC in the virtual USDC pool and then take something out of the virtual ETH pool, so that’s actually your own position.

“It’s a little bit complicated. So, in this scenario, actually there is no liquidity provider because everything is virtual so the question is how much virtual ETH or virtual USBC we put in when we create this Uniswap pool. So we don’t change the tokens in the pool, actually we have this virtual liquidity and we don’t need any asset to pick that up, which also means that we don’t need a liquidity provider if we don’t want to change K. So, that’s how you decide and because Uniswap is SYK so it’s actually past independent wso we can make sure that all the long position -- I mean there are people taking long and short positions in this way and then once we close all the positions you were back to the original state, which means that everyone should be paid out. There is no P&L in the AMM. So that’s how the v1 is designed.

“But you also have some issues. So, for v2 the first thing we want to do is we want to be more capital efficient. Because in v1 we use this SYK, so it’s not so capital efficient, so we want to be more capital efficient. So, the second thing that we want to solve is that because we have this virtual liquidity the AMM doesn’t really participate in the market. So, the vault should have every character that pays back to the traders but at the funding time this will be different because of AMM at any given time if there are some traders opening any open positions then there should be more longs than shorts or more shorts than longs. Because funding payments you have to have equal amounts of long and short so AMM will participate in the funding payment that actually creates some risk to the system. So, bringing in liquidity providers can make sure that we have enough long and short, so remove AMM from the funding payment. So, that’s the second thing we want to fix. That’s basically about it. There are lots of details in the design but I hope it is planned well.”

Improving the user experience

Nick and Yenwen share their thoughts on the emerging L2 layer, L2 experience. Is Perpetual Protocol v2 going to launch on an L2? Nick explains:

“I think from a user experience perspective there are two angles we need to look at. The first one from a community perspective is non-DeFi native users. How do we get them in? And, I think there’s a lot of work that needs to be done even from a user experience and from an education perspective. If you talk to a lot of non-retail users and tell them that they have to basically trust their money in a Chrome extension, like MetaMask, they usually take a double take, right? But, if we then look at experience within the DeFi community, I think the one we’ve chosen for the time being at least is Arbitron. And, I think the key around here is composability, so the ability for individuals to go into an ecosystem and interact without having to change chains and kind of think about that I think that’s going to be the first really key point.

“And then the second point is then allowing for developers, who I guess is another type of user, to be able to build products with all these kind of financial products that are now composable. And, this opens up a design space that you normally haven’t seen in traditional finance before, where traditionally to get a partnership running it takes quite a long time, it’s quite permissioned and it’s only for a very limited number of parties. Whereas now you can basically take any three AMMs that you want, throw in a perpetual product plus some lending and off you go you can build some product on top of that.”

What’s coming up?

Yenwen says Perpetual Protocol v2 should be launching in the coming months:

“In v2, as I said before, it’s more capital efficient because we are building on top of Uniswap v3. So, liquidity providers can have their own strategy. They can build their own strategy just like a traditional market maker. And, then they still earn most of the fees from the platform so I think that’s really cool.

“The second thing we are going to have is permissionless market creation. So, in our v1, all the market we need to create a confidence vote and some insurance fund for the system then you can create the market that you want. So, any market like new tokens or meme tokens or anything so if there is someone who can provide some security or liquidity to that market then they can go to that market. Another thing that’s cool as well.

“And, the third thing that we want to improve is definitely the usability side. So, one thing is that we are moving from Askari to Arbitron. We definitely will increase the bandwidth of support that we have so we will be much faster. The second thing is we will be bringing more features like FKX, like close margin, like multicollaeral, so it will make the life of traders so easy. That’s definitely something we want to push out in this v2.”

Zaki observes, “Having more markets is just so exciting, especially for what Sommelier is building in terms of automated rebalancers. Right now I’m spending a lot of my time thinking about rebalancer profitability in the Uniswap v3 world where the challenge is really the losses you take from rebalancing -- rebalancing is a Loss-y function, you lose money on rebalancing that offsets your yields on profits from being a liquidity provider. I haven’t even begun to think about what that looks like in a world in which you’re providing liquidity to a perpetual rather than with leverage. My general insight into the spot market LP world is that none of this is really going to work at scale until we figure out a way to compose liquidity positions with options positions with futures basically, because the liquidity position in the spot market is basically short volatility and so you can be market neutral by being short volatility in spot and long volatility in the options market. And, that’s really going to be the key to making the spot market liquidity work. I think it’s beyond the scope of this conversation to try and think of what strategies will work in perpetual liquidity but I’d be very excited to continue this conversation.”

Yenwen agrees:

“Actually, yes, I think that’s like having a way to move the risk to other financial products. I think that’s definitely something the requisite provision on Uniswap v3 can do. One thing I wanted to add on the liquidity provision on perpetual political is that if you are interested in doing that it’s actually more like traditional market making. So, because on a perpetual market you can get a loan and show a position in the same market, I think your goal is more like you want to minimize the position you own. It’s a little bit different from Uniswap v3 so you should be able to bring the knowledge of traditional market making and then into perpetual market making. You can try to balance but using long and short. I think that’s more straightforward.”

More articles


This website does not constitute an offer to sell or a solicitation of interest to purchase any securities in any country or jurisdiction in which such offer or solicitation is not permitted by law. Nothing on this website is meant to be construed as investment advice and we do not provide investment advisory services, nor are we regulated or permitted to do so. This website is provided for convenience only. Sommelier does not manage any portfolios. You must make an independent judgment as to whether to add liquidity to portfolios.

Users of the Sommelier website should familiarize themselves with smart contracts to further consider the risks associated with smart contracts before adding liquidity to any portfolios.

Note that the website may change, and we are under no obligation to update or advise as to these changes. There is no guarantee that the Sommelier Mainnet, including any software, products or token use cases mentioned on the website, will be built, or offered by Sommelier. In particular, actual results and developments may be materially different from any forecast, opinion or expectation expressed in this website, or documents contained in it, and the past performance of any portfolio must not be relied on as a guide to its future performance.

To the extent permitted by law, the company and its directors, officers, employees, agents exclude all liability for any loss or damage arising from the use of, or reliance on, the material contained on this website whether or not caused by a negligent act or omission. The release, publication or distribution of this website and any materials herein may be restricted in some jurisdiction and therefore you must inform yourself of and observe any such restrictions.

© 2022 Sommelier by Bajanss OÜ –Maakri 36-50, Tallinn, Estonia 10145

Telegram
Discord
Twitter