AMA Recap: Volcanic Gems x DefiPlaza

Timan Rebel - December 30, 2021

Thursday, December 28, 2021, DOM.NFA from Volcanic Gems interviewed Jazzer, our main dev, about DefiPlaza and the technology and economics behind it. You can read the whole AMA on Volcanic Gems’ Telegram channel, we posted the Q&A unaltered here:


So I’d like to welcome Jazzer to the chat. We’ll be discussing his project, DeFi Plaza. For those who don’t know, DeFi Plaza is a DEX on Ethereum aimed at optimising capital efficiency and providing the lowest possible transaction cost to the end user. So initially can you tell us a little bit about your current role at DeFi Plaza, the inspiration for creating this DEX and any notable past experience that has made you suited for this endeavour?


Yeah sure! I’m the founder and still the main dev of the smart contract side of things at DefiPlaza. I’ve started work on the first version in April this year, together with another dev who took care of the front end.

The inspiration for it came when I realised from another DEX that it is actually possible to be cheaper than UniSwap v2 on trades. UniSwap is such a remarkably elegant piece of code, that it initially never occurred to me this could be an option.

When the seed was planted, I took the engineering approach to designing a DEX on Ethereum. Go down to the very lowest level and think what is the absolute minimum amount of operations you need to swap owners for tokens. That’s also my answer to the notable past experience, which is that I’m an engineer by education. I’m trained to build things as efficiently as possible.

When building DefiPlaza I didn’t start from another code base to trim it down, I started from the ground up to see in how little operations it could be done. Turns out, you can do it in 50-65% less gas than UniSwap typically.


So firstly we can touch on this. A key part of DeFi Plaza’s value proposition actually comes from the fact the exchange fees are currently a third of Uniswaps fees. Sitting at 0.1% compared to 0.3% offered at Uniswap. How did you decide upon this value specifically?


Well I thought we should find a value that is significantly less than UniSwap, so as to make it an actual incentive for people to move over. Then, I analysed how much is needed to compete with UniSwap for fees generated per unit of liquidity.

DefiPlaza is a 16-token AMM, which means that it needs equal liquidity for each of 16 listed tokens. In UniSwap, each pair has only 2 tokens. However, at DefiPlaza we can generate 120 unique trading pairs with these 16 units of liquidity, whereas at UniSwap you get only 1 trading pair for the 2 units of liquidity. Thus, there are 15 times more direct trading pairs possible with DefiPlaza.

However, not every trading pair is likely to get the same traffic. For example, we expect higher traffic on the ETH to USDT pair than the LINK to YFI pair.

The 0.1% is chosen as a factor 3 lower than the 0.3%, based on the estimate that the total fees generated per unit of liquidity would be at least the same once DefiPlaza is on everyones radar, integrated into the aggregators and attracting high liquidity and volumes.

So the driver really is to be still competitive for liquidity providers in terms of fees generated, while offering as low as possible fees to our customers.


Lots to develop on from that response, thank you. I read in a blog that it is possible in the future for you to consider dynamic fees, similar to some other DEX’s. Dynamic based on market share of the total trading volume. Is this still in consideration? What do you think the benefits are of doing this over a fixed rate fee?


Yes, ultimately the level of fees will be set to what we believe is the ‘optimal’ value for attracting liquidity. If we increase fees, that means more income per trade but at the same time we can expect less trades to happen.

There is a sweet spot, which I expect sits somewhere around the 0.1% fee but we’ll need to experiment to find the actual value.

It may even be dynamic based on market conditions.

We’ll need to formulate a strategy around it, once we have sufficient liquidity at the exchange to compete with the big boys for the vast majority of trades.

At our current liquidity we are the best deal for basically any trade up to ±5 k$ in traded value. If we can increase liquidity by a factor of 5 we’d be the best deal for any trade up to ±25k in traded value which would put us in a good place to capture a piece of the vast majority of trades happening in DeFi.

Once we’re at that position, we’ll use our governance mechanism to vote on trading fee strategy (as well as other things like which tokens to list and further DEX deployments).


The key issue with the 0.1% fee is of course that DEX’s with higher fees present a greater value proposition for liquidity providers. What is your key strategy to increase volume so that rewards can be competitive with 0.3%+ DEX’s?


Well, as stated, the capital efficiency of DefiPlaza is much greater. There are 120 trading pairs for 16 units of liquidity. Whereas with pair based exchanges you get 1 trading pair for 2 units of liquidity.

Thus, DefiPlaza is 15 times as efficient in allowing each unit of liquidity to be traded and generating fees.

Therefore, we expect a natural higher volume per unit of liquidity deployed just from that. The lower fee level should also help in attracting more volume.

Together, it is my estimate that the volume per unit of liquidity should be easily 3 times higher than in UniSwap. Thus our liquidity providers should be in a good position when it comes to revenue from fees.

You can intuitively see what happens by just looking at the ETH pairings. For UniSwap, if we want to have a pool with 1M in DAI and 1M in ETH, we need 2 M of liquidity. Then if we want to do the same for 14 other tokens apart from DAI we need 1M of ETH for each of them as well.

The total amount of liquidity locked up in UniSwap for those tokens would be 15M in ETH and 1M for each of the 15 other tokens, so 30M total. And that would only allow trading the tokens against ETH, if you want to trade USDT to USDC in that setting you’d need to go through ETH costing you extra fees.

In DefiPlaza, for the same level of slippage you’d only need the 1M in ETH because it gets ‘reused’ for each token. So that’s 14M less liquidity required right there. And now we can trade directly from USDT to USDC as well as all these other trading pairs.

This is basically making your liquidity work harder in earning fees than in pair based exchange like UniSwap.

That’s what we believe should make 0.1% fees still competitive.


Interesting, so technically it is very competitive with DEX’s like Uniswap due to the multi-asset pool system you implemented. I also wanted to touch a little on L2’s. You talked briefly about them in another blog. Do you believe L2 exchanges could eventually draw a lot of volume from ETH DEX’s? ie do you see it as a threat long term or just a temporary solution?


L2s are a bandaid in my opinion. The issue is fundamentally that none of the currently deployed L1 chains by themselves has the capacity to actually deal with the entire global financial market transactions.

Moving the transactions off-chain and settle them on an L2 is not ideal, as you lose some of the fundamental benefits of the blockchain technology.

And you get an enormous fracturing of the ecosystem. Some people go to Polygon, some go to Optimism, some go to Fantom and some go to Avalanche. None of these networks are communicating with one another so all of these become their own little silo of activity, which I think is not very good.

However, despite the high trading fees, the bulk of all liquidity still resides on Ethereum and still trades on Ethereum. So yeah, you can build a DEX on Fantom but good luck attracting 100s of M$ in liquidity to it.

So, for DefiPlaza we go where the liquidity is. That’s currently on Ethereum. If tomorrow everyone says we go to Polygon, we’ll go to Polygon as well. But I don’t think it’s very likely to happen as it doesn’t really fundamentally solve the problem. If everyone moves to Polygon, then that will clog up just as hard as Ethereum is clogged up at the moment.

What would really solve this is an L1 that scales while maintaining composability. That’s the big promise of Radix, the L1 specifically built for DeFi, but it’s still under development so we’ll have to wait for that.

Until then, we are probably stuck with Ethereum.


I agree with that. Obviously blockchains are fundamentally flawed at scale as of now but until an actual solution comes around we have to make do. I also understand that you made additional improvements to gas efficiency beyond the obvious benefits of the multi-asset pool bypassing additional swaps. Can you touch on the improvements you made on this front?


Yes, sure. If you go into the code, you can find 4 places where we’re saving most of the gas:

  1. We don’t use a router, everything is implemented in a single exchange contract so no external contract calls are required.
  2. We don’t use WETH (wrapped ETH), just plain ETH so no wrapping and unwrapping is required.
  3. Hard coding to 16 listed tokens allowing numerical optimizations in the code.
  4. We group several variables together in structs to do absolute minimum of blockchain read/writes. This is called struct packing.

If you go down to the nitty gritty and look at what costs gas, it’s mostly writes to the blockchain. And the next big consumer is reads from the blockchain.

As an example, adding 2 numbers costs 3 gas. Multiplying 2 numbers costs 6 gas. Moving variables around in memory costs 3 gas, and so on. Most basic operations cost <10 gas each.

Writing a single variable to the blockchain costs 5000 gas. Or even 20000 if it didn’t exist before. Reading from another contract costs 2000 gas for the first read. So really, the problem quickly reduces to how can I save as many reads/writes to the blockchain as fundamentally possible.

Wrapping ETH to WETH requires reads and writes to the WETH contract. So just don’t do that if you don’t really have to.

Ideally you only really need to write the updated balances and nothing else. I’ve tried to get as close as possible to that.


So your DEX really is much more capital-efficient than the competition it seems. So I’ll move on to some questions from the community, submitted on Twitter. Firstly, someone asked about how you are looking to expand your token selection? And similarly someone asked how this process would work ie if you would start a new DEX from scratch with a new asset pool, new token?


We’re constantly monitoring how the trading volume is distributed across our 16 listed tokens. The weaker brothers may end up getting replaced by higher volume token. Last month we replaced AAVE by SPELL, which has been great for trading volume and thus fee income at DefiPlaza.

But it’s based upon 1 out 1 in as the exchange is hard coded to 16 tokens.

Currently, our weakest volume tokens are UNI and YFI, so they are prime candidates to be replaced and we’ll be looking to have a governance vote on their replacements shortly.

If we want to offer more than the current 16 tokens, we need to deploy another DEX. The current DEX is intended as sort of the main DeFi index. It has all the high volume DeFi tokens listed.

Other exchanges we are looking at are StablePlaza (only stable coins), MoonPlaza (only microcaps) and DogePlaza (for fun). Each of these will have their own design specifics and which one we’ll end up deploying first will be decided by the community.

For now, the first priority is to attract more liquidity to the current exchange, which is promoted by a liquidity mining program with 230% APR currently. Anyone can add liquidity to the exchange, stake your liquidity token and collect the governance token at 230% APR.

In spirit with the philosophy of the project, all of these actions (swapping, adding/removing liquidity, staking) are highly gas optimised and will cost significantly less than you’d be used to from other DeFi projects.


Well I think we’ve covered almost everything. There’s just one last thing I remembered before we wrap up. I noticed you recently deployed an arbitrage bot. What was the reasoning for this and what utility does it serve?


Yes indeed. We’re running an arbitrage bot for the community. The idea is that the biggest drawback of supplying liquidity to any AMM is the risk of impermanent loss. This is no different at DefiPlaza, though the multi-token AMM design means that you’re somewhat protected from impermanent loss as it’s highly likely that token prices move up and down together.

Still, impermanent loss occurs when price differences lead to arbitrageurs trading on the exchange and taking some value off the table. We’re running a community arbitrage bot, where the recovered value is used to buy back and burn the governance token.

Arbitrage is open to everyone, so it’s not a guaranteed long lasting revenue stream but it’s still nice to have the community benefit from price movements this way as well.


Well I think we covered everything. Big thank you to you Jazzer. What you’ve accomplished so far certainly has potential to generate substantial volume with the right strategies going forward. It was a pleasure having you on.


Pleasure to have been here. 🙂