Latest updates from DefiPlaza
DefiPlaza Launches Radix-Ethereum Bridge
January 5, 2023
With the deployment of the DFP2 token to Radix, we launched the first-ever community-owned Ethereum → Radix bridge, allowing you to move your tokens from the Ethereum chain to the Radix...
DefiPlaza Launches cDEX on Radix
January 4, 2023
During the last few months of 2022, we have worked diligently to lay the foundation for DefiPlaza to branch out to the Radix chain. We are very enthusiastic about the potential of the Radix public...
The StablePlaza pool is now live on DefiPlaza!
July 14, 2022
With a lot of pride, we present the new StablePlaza pool on DefiPlaza! DefiPlaza now has two multi-token pools that are optimized to give the lowest trade cost and the highest capital efficiency...
White Paper StablePlaza released
July 12, 2022
As part of the launch of the upcoming StablePlaza pool, a white paper was created to explain the core principles in more detail. The StablePlaza pool will launch this Thursday, July...
DefiPlaza listed as exchange on CoinGecko
June 27, 2022
8 months after Coingecko was the first to list DFP2, CoinGecko now added us as an official listed Exchange! With help from CoinGecko, we created a set of custom API endpoints, to make it possible...
New Liquidity Dashboard
May 5, 2022
Upon launch most DEXes ship with a dashboard where you can get some more insight into the liquidity you provided. Ours did not, however, as we wanted to get DefiPlaza out and in your hands as quickly...
Launched WalletConnect support
April 19, 2022
Today, DefiPlaza released the much-requested support for WalletConnect! When DefiPlaza launched, its User Interface (UI – i.e. the actual website for the app) was built directly on top of...
DeFi Download DFP2 burn
April 3, 2022
To celebrate the release of the DeFi Download podcast featuring DefiPlaza (go listen to it if you haven’t yet!) the team has allocated another 0.5 ETH from the arbitrage bot to buy back DFP2...
Engineering better DEXs – Jazzer’s appearance on the DefiDownload Podcast
April 2, 2022
In this episode of the DeFi Download podcast, Piers Ridyard, CEO of Radix interviews Jazzer, the founder of DeFiPlaza. Jazzer discusses his path to developing DeFiPlaza, his engagement with...
Latest blog posts
-
Post Mortem of DefiPlaza Ethereum exploit
Jazzer - August 23, 2024
On Friday, July 5th, 2024, at 13:15 UTC, the DefiPlaza DEX on Ethereum suffered a devastating attack that drained all user funds. This post-mortem analysis aims to provide a detailed explanation of the exploit, the timeline of events, and the steps the team is taking moving forward. We are committed to full transparency and accountability to our community. Overview of the Exploit At block number 20240539 (July 5th, 2024, 13:15:35 UTC), a carefully crafted, complex transaction that exploited a vulnerability in the DefiPlaza V2 smart contract was executed. The transaction successfully drained all tokens from the liquidity pool, impacting all users. This transaction originated with a bad actor who was, however, careless. When the original attack transaction entered the Ethereum mempool, it was noticed by an MEV bot operated by a third party, Yoink. The MEV bot scouted the highly profitable transaction and front-ran it by paying the Ethereum validators for priority execution. All damage was done in that single transaction. Despite the best efforts of our team and multiple security firms who alerted us shortly after the incident, it was too late to intervene by pausing the protocol. Unfortunately, all funds in DefiPlaza on Ethereum were lost in the attack. Detailed Attack Structure The attack was complex, leveraging flash loans, token swaps, and a vulnerability in the removeLiquidity function of the contract. Below is a step-by-step breakdown: Step 1: Borrow $129.6M worth of various tokens (ETH, USDC, USDT, WBTC, DAI, MKR, CRV) from the Balancer vault using flash loans. Step 2: Swap out most of the other 10 tokens listed on DefiPlaza so that the ratios in the exchange are equal to those held by the attacker. Step 3: Add all tokens as liquidity to DefiPlaza, making the attacker the dominant liquidity provider (holding >94% of LP tokens). Step 4: Withdraw all LP tokens received in Step 3 into a single token (ETH), thereby completely emptying the ETH part of the pool ← This should not have been possible. Step 5: Swap 1 wei to drain SPELL. Step 6: Swap 10-18 SPELL to drain YFI. Step 7-19: Sequentially drain the other listed tokens by sequentially swapping tiny amounts of previously drained tokens. Step 20: Repay the initial flash loans. This highly orchestrated transaction consumed 7.8M gas (block limit is 30M gas total), demonstrating the intricate nature of the attack. Note: several token swaps were also part of the complete transaction, but for brevity, the list above is restricted to the steps most relevant to the attack vector. Root Cause: Technical Vulnerability The vulnerability lies in the removeLiquidity function of the DefiPlaza contract. Specifically, it involved a rounding error when inputting a LPamount that exceeded 15/16ths of the total LP amount. For sufficiently large input fractions, F_ it will be rounded down to zero at line 322. The result of this rounding error is that all liquidity for this token was removed. Under normal operations, it’s not possible to have zero holdings for any of the tokens, and the contract is not robustified for this situation, leading to an exploitable situation. This issue is highly unlikely to occur under normal operation, as removing a significant part of liquidity into one token is otherwise a very uneconomical thing to do. However, once the contract is in this state the attacker was able to leverage the zero-liquidity state to remove the liquidity from the other listed tokens one by one in a cleverly constructed ‘domino’ swap sequence. The attack required significant liquidity to achieve a dominant LP position. This was enabled by the interest-free flash loans that are available in the Ethereum ecosystem. This attack has always been possible to carry out but was only executed 3 years after deploying, holding significant liquidity across the entire period. Sophisticated actors are likely using newly available tools to scout for vulnerabilities in older contracts. Timeline of the Attack Jul-5th-2024, 13:15:35 UTC: The attacker ( 0x14B362d2E38250604F21A334D71C13E2eD478467) deployed a malicious contract (0xa4E8969BBa1e1d48c30c948de0884Cdff43e2d54). The attacker initiated the transaction that would drain DefiPlaza (0xe00b0998d71b0e657379be196babd1637a653c100e8162853ca6616c3970790d). An MEV bot, operated by Yoink, front-ran the attacker’s transaction. To do so, Yoink paid a substantial 62.5 ETH bribe to the validator processing the transaction (Lido). Yoink successfully captured approximately $24,000 worth of tokens from the transaction but promptly and graciously returned them to the DefiPlaza team within 30 minutes after being contacted (through Blockscan). The 62.5 ETH bribe was distributed to all Lido stakers according to their protocol’s MEV capture mechanism. Immediate Impact The result of this exploit was catastrophic for DefiPlaza: • All liquidity on Ethereum was drained, resulting in the total loss of user funds. As mentioned above, approximately 10% of the funds were quickly recovered and are currently held by the team. • The protocol is no longer operational on Ethereum, and there is currently no plan to restore liquidity on this chain. • The bridge to Radix was briefly paused to prevent potential further damage but has since been reopened. Next Steps and Recovery In response to this attack, we are exploring all available avenues for recovery. Our primary focus is to retrieve any stolen funds distributed through the Lido validator by proposing a DAO governance vote to recover the funds. If successful, any recovered assets will be redistributed to XDP2 token holders. Final Words This attack had a massive impact on the DefiPlaza team and is a harsh reminder of the challenges inherent in decentralized finance. We’re devastated by the impact on our community, the project, and ourselves. Although everyone is aware that code audits are no hard guarantee of security, after a successful audit and three years of problem-free operation, we were completely blindsided by this exploit. We will continue to share updates as we pursue recovery options. Thank you for your support! -
Keep CALM and ignite your liquidity – a new Liquidity Incentives program on Radix
Timan Rebel - March 8, 2024
Together with the Radix Foundation we are launching the biggest liquidity incentive program on Radix to increase the TVL of DefiPlaza on Radix with wrapped assets. It is called Project Ignition and it goes live on March 14. Up to 20% of your liquidity’s USD value will be immediately airdropped to your wallet once you lock your liquidity for 9 to 12 months. To make providing liquidity easier, a total of $10M is available in XRD (the native Radix asset) as counter liquidity, so you only have to provide the wrapped assets. TLDR; Bridge USDC, USDT, ETH, or wBTC from Ethereum to Radix Add single-sided liquidity and we add the needed XRD to the pair Receive up to 20% as an immediate airdrop by locking your liquidity for up to 12 months Earn fees on both your tokens and the XRD 100% protected from any XRD impermanent loss Table of Contents Guide: How to provide liquidity to DefiPlaza on Radix Why DefiPlaza Why Radix Details about the Impermament Loss protection Guide: How to provide liquidity to DefiPlaza on Radix If you are already on Radix, have the wallet installed, and own at least some XRD, you can proceed to step 3. Joining a new crypto network is often unfamiliar and a bit scary, because the UX is different from what you are familiar with. Therefor we wrote a step-by-step guide to onboard you to the beautiful world of Radix; a chain designed for user experience and token safety. So, lets dive right in! 1. Download the Radix wallet Radix is not an EVM chain and therefor has its own great mobile wallet, combined with a desktop browser extension. A mobile-0nly experience is set to launch in the coming months. Go to https://wallet.radixdlt.com to set up and download your Radix Wallet using the official links provided there. Create a new account and connect your wallet to the desktop extension to start interacting with dApps. Our friends at the HUG meme coin have created a great onboarding video on how to install the wallet. The video below starts at how to download the wallet and install the extension. 2. Get some XRD on to Radix Now you have your wallet, you need some XRD to pay for the fees. There are several exchanges available to buy XRD; we prefer RocketX.exchange and will use it in this guide. You can use RocketX to buy XRD with ETH on Ethereum, SOL on Solana, and many more token and chain combinations. Fees are very reasonable and cross-chain transactions are usually finalized within 30 mins. The minimum trade size on RocketX is around $30, while you probably only need around $1 or $2, but you can always buy some more assets to provide as liquidity. 3. KYC with Instapass to prepare for bridging Identity verification via Instapass is required, before you can bridge assets. Radix unfortunately does not have a trustless bridge yet, so this takes some extra time to get done. Instapass is an official KYC service of Radix that uses industry-leading data security practices and uses service providers, such as SumSub, who are ISO/IEC 27001 compliant. Please note: due to compliance reasons it is currently not possible to bridge assets if you are a cititzen of the United States of America. (If you need any assistance, you can contact [email protected]) 4. Bridge assets to Radix After KYC-ing you need to bridge your USDC, USDT, ETH or wBTCs to Radix. You could buy those assets on Radix, but there are not enough wrapped tokens to fulfill the $10M available incentives, so it is probably better to buy them on Ethereum and bridge them to Radix. Instabridge is an official Radix bridging service that allows you to send ETH, wBTC, USDC, and USDT to receive wrapped, one-to-one backed versions on Radix. All wrapped assets on the Radix network issued by Instabridge will be designated with an “x” at the beginning (e.g. xETH). Bridge ETH from Ethereum to Radix Since this is not a trustless bridge, it might take some time for your assets to become available on Radix. (If you need any assistance, you can contact [email protected]) 5. Provide liquidity to DefiPlaza The hard parts are over, one final step is left. DefiPlaza is a next-generation DEX specifically designed to reduce the risk of Impermanent Loss. To be eligible for the airdrops go to https://radix.defiplaza.net/ignition and pick a pool you want to provide your liquidity to. As said, you only have to provide your wrapped assets, we take care of any needed XRD to balance your position. Pick how long you’d like to lock your liquidity. A longer period will give you a higher immediate airdrop of up to 20% of the value you lock. After you click the button to provide liquidity, open your Radix wallet to approve the transaction. In the transaction preview, you can see how much you are providing, and what you will get back. Your locked position is represented by an NFT and the airdrop in XRD is visible here too. Congratulations! 🎉 Why provide liquidity to DefiPlaza? DefiPlaza is a DEX specifically designed to counter the risk of Impermanent Loss. DefiPlaza is audited, open-source, and has a white paper explaining the dynamics of our CALM algorithm. A TLDR Twitter thread is also available for a quick intro. After two years and $80M in trade volume on Ethereum, we learned that Impermanent Loss very regularly swamps any fees earned by Liquidity Providers. So we started on a quest to make a DEX that is sustainably profitable for LPs. We created CALM, an algorithm that treats trades that create IL differently from trades that reduce IL, thereby reducing the negative impact of impermanent loss. CALM vastly outperforms traditional methods in terms of bottom-line performance for liquidity providers and we have the numbers to prove it. Learn more about DefiPlaza at https://defiplaza.net. Why use Radix? Radix offers a radically better user and developer experience needed for everyone to confidently use Web3 & DeFi. Its groundbreaking wallet offers human-readable transaction manifests that make blind signing obsolete and prevent many of the most common mistakes when trading tokens. The native assets and easy and type-safe programming language Scrypto make creating dApps far easier. Discover why Radix is radically different at the RadFi 2022 presentation: Learn more about Radix at https://www.radixdlt.com. Details about the Impermament Loss protection DefiPlaza’s CALM algorithm is designed to reduce the risk of Impermanent Loss and works best with a lot of price volatility. It can’t however prevent all IL. Therefor RDX Works added extra IL protection on top of CALM. In the case of Impermanent Loss there are two scenarios that can happen after your lock-up period is over: Price of XRD has gone up relative to your assets The liquidity provider is 100% protected from any IL on XRD, the provided XRD by us takes the hit. So it doesn’t matter whether the price of XRD goes 2x, 20x, or 200x, it has no negative effect on your provided assets (it might even have a positive effect). Price of XRD has gone down relative to your assets If your assets out perform XRD, you receive a value guarantee for up to a 4x out-performance (vs XRD) of the asset you provided, and then a sliding amount of asset value protection beyond a 4x change. So the price of BTC could increase by over 400%, or the XRD price fall by over 75% before your position would be worth less than if you had just held the assets in your wallet. Or, if XRD rises by 2x, BTC can even rise by 8x before any noticable IL occurs. See here for the full terms and conditions of Project Ignition. -
DefiPlaza’s transition to Babylon
Timan Rebel - September 23, 2023
In less than 200 epochs, the Babylon upgrade of the Radix network will happen, and smart contracts will be enabled. Many things will change and become possible, so what can you expect from DefiPlaza? Today, we’d like to talk about two things: DefiPlaza DEX on Radix Native LP tokens on Radix Migrating DFP2 on Radix to enable Babylon features DefiPlaza DEX on Radix DefiPlaza will not launch on day one after the Babylon upgrade. The smart contracts are ready, and we are finishing up the UI and doing the final integration tests. However, we are waiting for the audits and will only launch with them to ensure our DEX is safe and secure. We expect DefiPlaza to launch on Radix around the half of October. DefiPlaza will launch with a novel algorithm that is actively trying to reduce IL and thus optimize the net income of LP providers after IL. On Ethereum, both the DefiPlaza pool and the StablePlaza pool have a fixed set of tokens, but on Radix, everyone can create their own pair. Create your own token pair on DefiPlaza. Liquidity can be provided single-sided; each pair features DFP2 as a counter token. DFP2 will act as an internal LP token to make hops between pairs possible. Add single-sided liquidity to DefiPlaza. Native LP tokens on Radix DefiPlaza uses native LP tokens on Radix. We haven’t announced this before; DefiPlaza will use the native liquidity pools offered by Radix! We found a way to support both single-sided and concentrated liquidity and still use the native pool units, which is really cool. Using the native LP tokens means that you will always see the value of your liquidity inside the official Radix wallet and will always be able to directly redeem your liqudity without going through the DefiPlaza dApp. Migrating DFP2 on Radix to enable Babylon features To use the latest features of Babylon, we have decided to migrate our current DFP2 token to a brand new “Babylon-upgraded” DFP2 token. We’ll enable burning of DFP2, slightly update our meta-data (yes, including a new token icon!), and ensure the token is future-proof. We could have kept the current DFP2 token, but it will limit us in the future. We see many other projects decided to upgrade their tokens, and we’ll take the opportunity to join. We’ll provide a link to migrate your Olympia DFP2 to Babylon DFP2 once the migration process is live after the Babylon upgrade. -
Our Plans for Babylon
Jazzer - January 4, 2023
It won’t be surprising to most that we have long thought about expanding to the up-and-coming Radix L1 chain. The move to become a multi-chain platform is not to be taken lightly, but in reality, we have planned for this since we went live with our DEX on Ethereum. And with the community unanimously voting in favor of this expansion, the time has come to unveil our plans for our Radix DEX! Building a Decentralized Exchange on Radix We are committed to deploying a decentralized exchange on the Radix public network as soon as the Babylon upgrade (which allows the implementation of smart contracts) goes live. The Radix team has announced Babylon is on track for a release in Q2 2023. That gives us a few months to design, build and test top-notch DEX infrastructure. Designing a DEX on Radix is a bit like building a flying car. The Radix Engine allows developers to think outside the box and easily build complex smart contracts that are inherently safe from many vulnerabilities that Ethereum suffers from, such as access control mishaps and reentrancy challenges. Moreover, the transaction cost is expected to play a much smaller role on Radix than it does currently on Ethereum. On Ethereum, the DefiPlaza USP is pretty clear: we are the most efficient DEX on the entire network. On Radix, everyone starts from scratch, and we don’t have many details about the exact fee model yet. It should be cheap for everyone forever is the commitment by RDX Works, but I’m sure that’s what they also thought when they deployed Ethereum.. 🙂 Sustainable DeFi On Radix, the design focus for DefiPlaza will be on sustainable DeFi. That is to say, DefiPlaza aims to provide the service of swapping tokens in a way that can be sustained over the long term by the income it generates. There is much the industry needs to improve in this regard. A recent analysis of the current market leader UniswapV3 has shown performance regarding LP gains is abysmal. For just the WETH/USDC pool alone, the combined losses by LPs have totaled 115M$ to date (end of 2022) as compared to them just holding the same WETH/USDC tokens. Yes, that’s after including LP income from fees! Total net LP losses in UniswapV3 WETH/USDC pool Even more recently, another study showed that the situation for WETH/WBTC is much more hopeful. Roughly 80% of LPs made a profit compared to just holding the same WETH & WBTC as long as they would provide liquidity for at least 6 months. The much better performance here is due to the price movement over time between ETH and BTC having positively correlated historically, which was one of the motivators for DefiPlaza to use a multi-token pool on Ethereum in the first place. Key Features For the design of DefiPlaza on Radix, we will use the insights from our exchange on Ethereum, combined with the insights from the recent studies on LP provision in general. Without going into specifics, we’ll be building on the shoulders of giants, borrowing concepts from Bancor, Dodo, and Curve combined with some new ideas of our own. The below represents an overview of features we are working to include in the exchange. Still, as development is an ongoing process, there may be changes between now and the final Babylon deployment. Multi-Token Trading In our Ethereum DEX, we have 16 tokens listed, which means you can trade between 120 unique token pairs without requiring hops from pool to pool as you would need on Uniswap, where liquidity is held in pairs. The DefiPlaza DEX offers direct trading between 124 pairs on Ethereum. The Radix Babylon exchange will offer even more direct trading pairs. On Radix, DefiPlaza will preserve the ability for users to swap between any two tokens and only pay trading fees once. Adding tokens to DefiPlaza may be done trustlessly by any user once the smart contract implementation is deployed. Users may swap between all the popular Radix tokens directly, paying the same single transaction fee. Single-Sided Liquidity On our Ethereum DEX, you can already supply and withdraw liquidity single-sided. Effectively you trade against LP tokens when you add/withdraw liquidity. However, while providing liquidity, you own the LP token, which represents a basket of tokens and thus is exposed to price movement for all tokens in that basket. For DefiPlaza on Radix, we’ll isolate the liquidity token by token. Internally, each token will be paired against DFP2. Thus, the liquidity providers will only be exposed to the price movements of the token provided and the price movement of DFP2. This means that DFP2 gains utility as it is used as the internal grease that keeps the exchange running. Demand for DFP2 will be directly coupled with the success of the exchange. Concentrated Liquidity Achieving high capital efficiency is the key to running an efficient exchange. The UniswapV2 algorithm was sustainably profitable originally but couldn’t compete against the high volumes drawn to UniswapV3 and others offering concentrated liquidity. However, getting the degree of liquidity concentration correct is very difficult, as discussed above with the LP performance for the UniswapV3 WETH/USDC pool. Concentrated liquidity, as popularized by Uniswap V3 Concentrated liquidity improves capital efficiency but equally increases the risk of Impermanent Loss. DefiPlaza on Radix will automate liquidity concentration and apply it to the degree deemed optimal based on available data and market conditions. Dynamic Fees The question of what fee to charge to swapping customers is critical to ensuring long-term sustainability. Set it too low, and fees may not outweigh Impermanent Loss. LP income consists of fee times volume. Maximizing this product means using a low fee when the markets are tranquil and a high fee when there is significant volatility. This is exactly what the DefiPlaza smart contracts will implement. Token Launch Platform Finally, a key feature of the Radix DEX will be an integrated token launch platform. This will allow third-party projects to raise funds by launching a new token through an auction mechanism. Successful completion of the auction will result in an immediate listing of the token on DefiPlaza.As mentioned above, under-the-hood listings are represented as pairs with DFP2. This means that a certain amount of DFP2 needs to be supplied when a token is listed to facilitate bidirectional trading. Experiment & Validate The above summarizes what we plan to implement once the Babylon upgrade becomes available. In the interim, we want to use the time for development, testing, and data gathering. Thus, the DefiPlaza team will deploy a centralized version of the DEX prior to launching the real deal! -
Introducing DFP2 on Radix
Jazzer - October 28, 2022
DefiPlaza is an Ethereum Decentralized Exchange that launched in 2021 to make DeFi affordable again. Since then, we’ve proven our technology and demonstrated consistently to be able to provide the lowest gas cost transactions on our two exchanges: DefiPlaza & StablePlaza. DefiPlaze is a multi-token exchange for 16 of the most-traded tokens on Ethereum and StablePlaza with a special form of concentrated liquidity specifically designed for stable tokens. As Jazzer (our founder) is a long-term Radix community member, the DefiPlaza community contains many Radix fans. With the completion of our staking program in October 2022 and the rapidly maturing Radix ecosystem, we found the time is right to introduce our DFP2 governance token on the Radix platform. The DFP2 Token Bridge The DFP2 token was largely distributed to the community through rewards for providing liquidity on the DefiPlaza exchange. That reward program has finished, which means that all 67,941,915 tokens that will ever exist are now in circulation (minus 251,412 tokens that were burnt by the team in several burn events). The circulating tokens represent voting and staking rights on DefiPlaza community governance proposals. The concept of the Ethereum → Radix bridge is that the community can move their tokens to Radix if they want to. This process doesn’t increase the circulating supply, as for every token released on Radix, one token is locked on Ethereum. DFP2 tokens and their associated governance voting power can now be transferred from Ethereum to Radix. Moving tokens from Ethereum to Radix is as easy as going to the bridge website, stating how many tokens you want to bridge and what Radix address. Then you’ll need to approve the bridge contract and execute the transaction on the Ethereum network. Once the transaction is completed, you’ll see the DFP2 tokens appear in your wallet on the Radix network within 24 hours (due to a manual check). The reverse path, moving DFP2 from Radix to Ethereum, is already technically possible but not yet integrated into the UI. This part will be implemented shortly to allow arbitrage both ways and ensure the Radix and Ethereum tokens truly reflect the same asset. Voting with DFP2 on Radix The DFP2 token is the governance token for the DefiPlaza project and, as such, holds voting power. On the Ethereum network, gasless voting is implemented through the snapshot.org service. DefiPlaza now has to count voting power on the Radix and the Ethereum networks with the bridge live. Presently, the Snapshot service doesn’t support the Radix network. Radix tokens can be counted, even though the network isn’t supported yet, by linking a Radix wallet to an Ethereum wallet which is then granted voting power equal to the number of tokens the Radix wallet holds at the time a governance vote is created. Linking a Radix wallet to an Ethereum wallet for governance voting Linking a Radix wallet to an Ethereum wallet can be done through the UI on the DefiPlaza website. The website connects with the Z3us wallet, which is used to prove ownership of the Radix wallet. Trading DFP2 on Radix It is our vision that DFP2 should be widely available to users and traded freely in as many places as possible. That’s why we’re working with the teams at DogeCubeX, OciSwap, and CaviarSwap to have trading pools available for DFP2 almost immediately after the launch of the bridge. These services offer centralized automated market makers and will become DEXes on Radix through the deployment of smart contracts when Radix Babylon is released to support smart contracts. We’re working with our friends at Radix to offer trading pools for DFP2 We believe there is plenty of space for multiple DEXes on Radix, especially if they aren’t mere clones of one another and offer different functionalities. The DefiPlaza team looks forward to the release of Babylon and aims to deploy a distinguishing DEX on Radix. How the Bridge Works There are three parts to the bridge implementation: the Ethereum smart contract, the Radix wallet, and the bridge UI. Users can call the bridge function on the smart contract via the UI on the website. When a bridge transaction is executed, the bridge contract pulls in the correct amount of DFP2 tokens and emits an event that is monitored by the team. Software was written that picks up on these events and automatically creates transactions that send the corresponding amount of Radix DFP2 tokens to the requested Radix address. There is a manual verification step for safety. The entire supply of DFP2 has already been emitted, and no more can be minted in the future. The total supply is 67,941,915 tokens. The same amount of DFP2 tokens were minted as a fixed supply token on Radix, held by the bridge wallet. Whenever someone bridges (i.e., locks) tokens on Ethereum, the corresponding amount of tokens is released from the bridge wallet on Radix. Note that the bridge contract and the Radix wallet are managed by the DefiPlaza team, i.e., the bridge implementation is currently not trustless as this isn’t technically possible yet without smart contracts on the Radix public network. -
The fee structure of the StablePlaza pool
Timan Rebel - July 9, 2022
If you like to learn more about the StablePlaza pool, we have a great Introduction to the StablePlaza pool. As a follow-up, we’ve written about the four stablecoins of the StablePlaza pool. The next part in our StablePlaza series dives deeper into the fee structure of the upcoming StablePlaza pool and how you could earn a part of those fees. This is not financial advice, but an objective explanation of the fee structure of StablePlaza. Swapping tokens To swap stablecoins on StablePlaza the user has to pay a fee. This fee is one part the network fee to execute transactions on the Ethereum network and is paid to the miners, and the other part is a transaction fee that StablePlaza charges for the use of the pool. Our goal with DefiPlaza, and thus with the new StablePlaza pool, is to offer a highly competitive trade cost to the end-user. Thanks to our greatly optimized smart contract, we are able to significantly lower the network fee a user has to pay when executing a transaction. Next to the network fee, we charge a transaction fee of only 0.03% of the value traded. If you would swap 10,000 USDC for BUSD, the transaction fee would only be $3. Providing Liquidity The StablePlaza pool can only operate if enough liquidity is provided to make swapping tokens possible. In return for providing liquidity, these liquidity providers receive a cut of the transaction fee as a reward. Two-thirds of the transaction fees are rewarded to the liquidity providers and one-third to the DFP2 holders who stake their DFP2 on the StablePlaza pool. Let us explain how that works with an example. If the TVL (total value locked) of the StablePlaza pool would be 1,000,000 USD, roughly 1,000,000 XSP was minted and given to the accounts that provided this liquidity. At this point, 1 XSP is 1 USD. After a while, a total of 100,000,000 USD is traded via the StablePlaza pool. With each swap, 0.03% of the input token is added to the liquidity pool, and 99.97% is converted into the output token. And one-third of the transaction fee is added to the total of unclaimed rewards for the staked DFP2. (More on that later). So, after 100 million USD of trade volume, 30,000 USD is added to the liquidity pool, increasing the TVL to 1,030,000 USD. To calculate the new price of XSP we have to take into account the staking rewards. The calculation would be: TVL / (total XSP including staking rewards) = 1,030,000 / (1,000,000 + 10,000) = 1.02 USD Which is a 2% reward with almost no risk of impermanent loss! Staking DFP2 Competing DeFi protocols regularly work with an ‘admin fee’ for each trade. In DefiPlaza, there is no admin fee, but some of the fees will be shared directly with the community. Anyone who wants to can stake their DFP2 governance tokens in return for a part of the generated StablePlaza fees, which makes this the first utility added to DFP2. It won’t be the last! As an extra feature holders can voluntarily lock their DFP2 for a period of up to 180 days to increase their cut of the fees. Without locking the cut is 1x for each DFP2, with voluntary locking that cut can go up to 3x. With the voluntary locking, DFP2 holders are rewarded for removing their liquidity from the market for a certain amount of time, decreasing the price volatility of DFP2 in the process. At any given time, with or without locking the DFP2, holders can claim their rewards. Rewards are minted in XSP, the liquidity token of the StablePlaza pool, and can be converted into any of the four stablecoins in the StablePlaza pool. Let us explain that with an extension of the example above. Of the generated 30,000 USD in fees, one-third is reserved for the staked DFP2. Say 100,000 DFP2 is staked by DFP2 holders. The 10,000 USD of generated fees will be divided over the 100k DFP2. If you staked 10,000 DFP2, you would receive 10% of those fees, which is 1,000 USD. That is if nobody locked their DFP2. The calculation becomes a bit more complex with the locking. Say one holder added 10,000 DFP2, which would be 10% of the total staked DFP2, and locked their DFP2 for the full 180 days, receiving the 200% bonus. If nobody else locked their DFP2, this holder would receive (DFP2 + bonus) / (total DFP2 + bonus) = (10,000 + 20,000) / (100,000 + 20,000) = 25% of the generated fees, which is 2,500 USD. What’s next? The upcoming WhitePaper will do a tech deep dive into the inner workings of the new StablePlaza pool, explaining in more detail the fee structure and how we anchor liquidity around 1 USD. It also reveals some unannounced features of the StablePlaza pool. The WhitePaper will go live on Monday, July 11, with the StablePlaza following closely on Thursday, July 14. LFG -
The 4 stable tokens in the StablePlaza pool
Timan Rebel - July 1, 2022
Curious to learn what the new StablePlaza pool is? Read our introduction to the upcoming StablePlaza pool. Because of the turbulence in the stable token market in the past few months, we had to think twice, even thrice about which tokens to include in our multi-token pool. The initial community proposal included UST and we are for sure happy we didn’t launch with that. The depegging of UST opened everyone’s eyes about the potential dangers of unstable stable tokens. That is the main reason we chose to only go with fully collateralized stables and not to include any form of algorithmic stable tokens for now. However, things might evolve over time, so we included a similar mechanism as we already have on the DefiPlaza pool to swap out tokens and swap in alternatives. For the upcoming StablePlaza pool, we selected USDC, USDT, DAI, and BUSD. The first three were a given, and BUSD was selected by our community after a governance proposal was created to choose between FRAX, MIM, and BUSD. But first, we’d like to explain why having stable stablecoins are so important and what happens when a stable token depegs. What happens at a depeg? Even in stable tokens, there is a certain price activity. The price is almost never perfectly in sync with 1 USD. There is a certain margin in which the price of each stable token fluctuates. The mechanism of arbitrage will synchronize the price between markets and the StablePlaza pool ends up with a bit less or a bit more of one token than the others. Arbitrage is an investment strategy in which an investor simultaneously buys and sells an asset in different markets to take advantage of a price difference and generate a profit.HBS These arbitrage transactions generate fees for the liquidity providers, while at the same time the arbitrageurs keep the pool perfectly balanced and earn a profit. When the price difference becomes bigger, the difference in the number of tokens in the pool will also enlarge. Especially when a stable token depegs, we could end up with only the depegged stable token in our pool, since arbitrageurs made a profit by buying all other stablecoins in the pool. Pegging is the practice of fixing the exchange rate of a currency to the value of another currency.A depeg is losing that peg to the value of the other currency. When the stable token restores its peg, arbitrageurs will see a new opportunity and will start buying the recovered token, supplying the depleted tokens in the process, to make a profit again. As long as stable tokens restore their peg we end up with a balanced StablePlaza pool again and an increase in the generated fees. That is why we selected the stablest stable tokens. A short-term depeg is fine, as long as the token recovers. Why USDC USD Coin ($USDC) is a fiat-collateralized stablecoin, which means it is backed by real assets. USDC is backed by cash and short-term U.S. government bonds. USDC is considered one of the safer stable tokens due to its transparency. Center, a consortium created by Circle and Coinbase to launch USDC, publishes monthly attestation reports, providing third-party assurance as to the size and composition of the USDC reserves. Circle is also a licensed money transmitter under U.S. state law. Why USDT Tether, as $USDT is officially called, is the world’s largest stablecoin. It is backed by cash, short-term corporate debt, and even some foreign government debt. Tether presents some more risks than USDC, because of its lack of transparency. There is no public auditing to check whether the reserves can fully back the USDT in circulation. Tether does however publishes an overview of its reserves daily on its own website. Tether also said it will undertake a full audit with a top 12 accounting firm to improve the transparency of its USDT reserves. Why DAI Unlike USDC and USDT, $Dai is not backed by traditional financial instruments like cash and bonds. DAI, created by The Maker Protocol, is backed by any Ethereum-based asset that has been approved by MKR holders. This makes DAI a true decentralized stable token since the collateral is not kept by a centralized entity. The Maker Protocol makes it possible to lock ETH and other crypto assets in order to generate new DAI tokens in the form of loans., with the ETH and other crypto-assets as the collateral for these loans. To counter the volatility of ETH and other crypto assets, DAI is over-collateralized. At the time of writing, the minimum collateralization ratio for ETH is set at 150%. DAI is not hard-pegged to the USD dollar due to its backing by crypto assets but is kept in sync by the ecosystem including internal economic incentives, policy tools controlled by MKR token holders, and arbitrageurs. DAI has proven itself to be robust across multiple boom and bust cycles in crypto token valuations, so we felt comfortable including it in the StablePlaza pool. Why BUSD Binance USD ($BUSD) is launched in collaboration between Binance and Paxos, a New York-regulated financial institution, and is a fiat-collateralized stable coin just like USDC. It is fully backed by cash held in Paxos-owned US bank accounts. BUSD is also approved by Wall Street regulators. Just like with USDC, monthly attestation reports are available, providing third-party assurance as to the size and composition of the BUSD reserves. -
Introducing the upcoming StablePlaza pool
Timan Rebel - June 29, 2022
Are we really introducing a new pool focused on stable coins in this turbulent stable token market? Yes! There is a lot of stable token volume going on and we believe we can take a cut of that. And let’s start with that elephant in the room. In the past few months, several major stable tokens have depegged, creating massive turbulence in the market. The biggest shockwave was of course caused by UST. But other stables have depegged as well but were luckily able to get back to their peg of 1 USD. That’s why we didn’t select the four stable tokens with the largest daily volume, but we selected the four stablest stable tokens available. For the four stable tokens in our pool, we looked at fully collateralized stable tokens and stayed away from any form of algorithmic stables. The four-token pool will consist of USDC, USDT, DAI, and BUSD. We explain more about why we selected these four in The 4 stable tokens in the StablePlaza pool. The upcoming StablePlaza pool When we launch the StablePlaza pool, DefiPlaza will have two multi-token pools. One is focused on blue-chip tokens, the other on stable tokens. And for each trade, we automatically select the pool that would result in the lowest trade fee for the end-user. As you might know, DefiPlaza is special thanks to its single-contract, multi-token, highly optimized DEX, designed to offer the lowest possible trade cost to the end-user. Gas costs per trade are the lowest in the industry, and thanks to the multi-token set up very capital efficient, while Impermanent Loss is minimized. The (current) DefiPlaza pool is a 16-token pool of blue-chip tokens and is 15 times more capital efficient than traditional pair-based DEXs, offering up to 15 times more fees per unit of liquidity at the same trading volume. Plus, all fees coming from the 120 trading pairs are collected in one pool. The StablePlaza pool will take the same highly optimized approach as the DefiPlaza pool to provide cheaper trades, with an even lower transaction fee of 0.03% of the value traded. While the DefiPlaza pool is up to 65% cheaper than Uniswap, the StablePlaza pool will be up to 25% cheaper than Curve, which isn’t as expensive as some of the pair-based DEXs to start with. It’s enough to say we are really proud of this! When we acquire enough liquidity and get integrated with 1inch, we can create significant volume with minimal, or no, impermanent loss since all four tokens in the pool are stables. To make even better use of the provided liquidity, we created our own type of concentrated liquidity. Concentrated liquidity refers to the ability for liquidity providers (LPs) to select a particular range along the price curve to provide liquidity.CoinMarketCap Instead of providing liquidity for a price going from 0 to infinity, concentrated liquidity makes it possible for liquidity providers to select a range which they want to provide liquidity for. For example from 500 to 1500 dollars for Ethereum. (At the moment of writing, the price of Ethereum is 1208 dollars). This way, the liquidity is used in a much more effective way, offering more fees per unit of liquidity provided. Since stable tokens tend to be stable, you could create a more extreme form of concentrated liquidity, anchored around 1 USD, plus and minus a margin. This is what we did for the StablePlaza pool, to make the pool highly capital efficient and create even more fees per unit of liquidity. But providing liquidity is not the only way to earn fees. DFP2 holders will be able to stake their DFP2 in the StablePlaza pool to earn 1/3rd of the generated fees. Two-thirds of the fees will go to the liquidity providers and one-third is divided between all staked DFP2 on the StablePlaza pool. If the holder decides to lock their DFP2 for up to 180 days, that stake will even receive up to two times their share of the fees. This new staking mechanism will give DFP2 a real first use case and the voluntary lockup period should reduce price volatility. We’re readying the launch of the StablePlaza pool and are dotting the i’s and crossing the t’s. In the next few days, we will release several more blog posts and then the StablePlaza white paper. So stay tuned! -
Everything we know so far about StablePlaza
Timan Rebel - March 23, 2022
An updated version of this article is available: Introducing the upcoming StablePlaza pool. On January 26, 2022, a governance vote was created by a community member asking us to build a second DEX next to DefiPlaza focused purely on stable tokens. The governance vote was accepted by our community, and Jazzer started the research into StablePlaza with the following requested features: – A smart contract with support for (at least) 4 stable tokens (USDc, USDT, DAI, MIM)– Zero slippage– A 0.03% fee– Return 0.02% to the pool and return 0.01% to DFP2 holders who choose to stake their tokens– Staked tokens should keep their voting rights for any proposals– If it is possible, keep the smart contract variable for number of coins in it. Over time other stables like TUSD may gain sufficient traction and we can add them into the pool easily. At the moment of writing, the research and math are nearly done, implementation is underway and the code audit is scheduled for April 25. Because we already get a lot of questions about what StablePlaza will look like, we’d like to explain as much as possible in this blog post. Some details might change during implementation and I’ll update this post if they do. Table of Contents Fee StructureConcentrated LiquidityStaking DFP2Variable Token AmountUniswap V2 compatibleCapital EfficiencySeparate AppTimeline Fee Structure As requested in the governance vote, we are proposing to launch StablePlaza with a 0.03% fee, sending 0.02% to the liquidity providers and 0.01% to the total amount of DFP2 staked (more on that below). This very low exchange fee combined with the efficient multi-token setup of DefiPlaza should make StablePlaza the DEX with the lowest possible cost and when 1inch and other aggregators implement StablePlaza it should be the de-facto place to swap stable tokens. Concentrated Liquidity The proposed Zero Slippage does not seem fully possible, due to the minor variances in price between the major stable tokens. Especially DAI does deviate up to 0.015 USD (1.5%) from the USD value compared to other stable tokens. That would mean that arbitrage would regularly cause the pool of DAI to be completely emptied as they can be sold elsewhere for more if DAI would indeed rise above 1.01 USD. As an alternative, we are looking at a concentrated liquidity setup similar to Uniswap V3 where the liquidity would be concentrated between 0.99 USD and 1.01 USD. If the price of one of the stable tokens would rise above a 1 percent difference with respect to the others it would run out of liquidity and no longer be available to buy. It can still be sold back into the pool bringing the prices back into balance. Staking DFP2 As said, 0.02% of every swap would go to the liquidity providers and 0.01% to the total pool of staked DFP2. That means that users will be able to lock their DFP2 in the smart contract and earn a reward. When a user unstakes they receive the same amount of DFP2 back, so there is no risk of impermanent loss as there is when providing liquidity against other tokens. What makes StablePlaza special is that it is paying out the rewards to both the liquidity providers and stakers in a stable token of their choice, and not in our own token that would become inflationary. Staked DFP2 will also retain its voting rights, in a similar way as unclaimed DFP2 rewards from DefiPlaza are available as voting power. Variable token amount After doing the math it turns out that having a variable amount of tokens versus a fixed amount of 4 or 8 stable tokens would have a negative impact on the gas fees as well as the complexity of the contract. Our current belief is therefore that we should stick to 4, maybe 8, stable tokens. We will, just like with DefiPlaza, add the ability to exchange tokens that are underperforming for new more promising stable tokens. Uniswap v2 compatible To make integrations with aggregators easier, we are working on making StablePlaza “Uniswap V2 compatible”, which means that the calls to swap on StablePlaza would be similar to how a contract would call the swap function on Uniswap V2 and receive a similar result. A 1inch would therefore not need to write any custom code and “only” add the StablePlaza contract address to add StablePlaza as a swapping destination. This makes integrating with aggregators easier and should thus increase the trade volume on StablePlaza significantly. Capital Efficiency Just like DefiPlaza, StablePlaza will be very capital efficient thanks to its multi-token pool setup. With 4 stable tokens, it would only need 4 pieces of liquidity to power 6 stable token pairs. Offering a 3x higher fee reward per provided liquidity as compared to traditional pair-based DEXes. Since a traditional pair-based DEX like Uniswap would need 12 pieces of liquidity to power 6 pairs. With 8 stable tokens, it would need 8 units of liquidity to provide 28 trading pairs. This potentially offers a 7x higher fee income when compared to pair-based DEXes, since a pair-based DEX would need 56 units of liquidity to provide the same 28 pairs. Separate app Since StablePlaza would feature its own swapping, liquidity, and staking functionality, we will launch StablePlaza as a separate app under the DefiPlaza brand. This will be done by deploying the new app to stable.defiplaza.net and making it clear to the user by using a different logo and background color that the user is now using StablePlaza and not DefiPlaza. That way we use the advantage of operating everything under one domain while separating the UI and making interacting with the two DEXes as easy as possible while at the same time reusing as much as possible of the existing UI. How we will market the new StablePlaza DEX on our website is still up for discussion and any tips are welcome. Timeline We scheduled the audit by Pessimistic.io for April 25, 2022. That gives us about five weeks to finish the smart contracts and adapt the DefiPlaza App to StablePlaza. We do believe this is possible and want to keep moving fast because StablePlaza is a huge opportunity for us and our community. The audit will probably take a week or two and we might need to update the smart contracts based on their feedback, but we are targeting a launch in mid-May. Since the math and engineering of StablePlaza are much more complex than DefiPlaza we are also planning to release a WhitePaper next to our usual extended Medium article upon launch, explaining all the details behind our decisions. -
The economics of providing liquidity on DefiPlaza
Jazzer - November 3, 2021
In the previous article we looked at why DefiPlaza makes for an attractive value proposition to end-users. If you haven’t read that, check it out! In this instalment we’ll take a closer look at the liquidity provider side of things. The economics for liquidity providers consist of two parts: revenue and costs. Providing liquidity is easy and can be done single sided. You will receive the index token XDP2 in return. The economics of providing liquidity The interaction that liquidity providers have with DefiPlaza is providing liquidity to the exchange, which is then used to allow customers to swap tokens against. At any point in the future, the liquidity provider may decide to withdraw their liquidity back into their own wallets. The question at hand is how much will they get back when they do. To understand what drives profit or loss in a multi-token AMM, let’s look at all components that factor into the value difference when depositing versus when withdrawing. Income from fees. The primary reason to provide liquidity to an AMM is that end-users can trade agains the liquidity in the pool for a fee. The fee on each trade (or liquidity add) on DefiPlaza is 0.1% of the input tokens. These fees accumulate in the DEX and result in a steady appreciation of the XDP2 index token over time.Price change of the underlying tokens. The DEX lists 16 tokens and for each of these tokens it holds a reserve. If the underlying tokens appreciate in value, so does the index token. If the underlying tokens depreciate in value, so does the index token.Impermanent loss. When the exchange is in balance, the dollar value of each token reserve in the DEX is equal. Suppose that one token suddenly doubles in value. In that the spot price on the DEX is no longer in balance with the external price, creating an arbitrage opportunity. After a while and a number of trades the exchange will once again be in balance and all 16 token reserves will be somewhat increased. However, the total value increase in XDP2 that this represents is not quite equal to the initial value increase of the single token which doubled in price. This difference is called impermanent loss and will be discussed in detail in the next section. When the liquidity provider withdraws his liquidity, the amount they will get back is the original amount they put in, plus the fees accumulated over time, plus the price change of the underlying tokens, minus the impermanent loss. Thus, to make a profit on the trade as compared to simply keeping the same portfolio of 16 tokens it is required that the fee income outweighs the impermanent loss in the long run. Let’s look at these two components in more detail. Fee income in a multi-token AMM Trading fees are generated by trades taking place against the liquidity held by the AMM. The fee is currently set to 0.1% of the value for every trade on the exchange. If there are more trading volume, there is more fee income. Arguably the most important performance metric for any AMM is the amount of fees generated per amount of liquidity in the AMM. As we saw in the previous article, more liquidity generates less slippage per trade, but at the same time more liquidity means less income per trade for the liquidity providers. How much liquidity does an AMM actually need to be optimally competitive? Let’s consider the largest UniSwap v2 pool with a USD component (USDC/ETH) as an example. As of July 2021 (when I did this analysis) that had around 320 M$ in liquidity. With the same total liquidity, DefiPlaza would have about 20 M$ per token spread evenly over the 16 tokens. UniSwap uses a 0.3% trading fee. DefiPlaza uses a 0.1% trading fee, so break even in trading fee cost to the consumer happens when DefiPlaza has 0.2% more slippage than UniSwap on any given trade. With 20 M$ liquidity per token, DefiPlaza reaches a slippage of 0.2% for a trade value of 40 k$. This means that for all trades with with values below 40 k$, DefiPlaza could provide a more competitive offering to the consumer than UniSwap regardless of how much liquidity UniSwap has for that pair. The lower the trade value, the less significant the slippage and the more attractive DefiPlaza will be versus UniSwap. So how many of those lower value trades are being done? Consider the trades for 100,000 consecutive blocks in July 2021 on the USDC/ETH pair, a dataset of ±108k trades. The data for these trades is plotted below: Impermanent loss generalised for N pooled tokens with beta price change per token The plot shows that >90% of the trades are below 40k USDC. Thus, DefiPlaza with the same 320M liquidity could outcompete UniSwap for 90% of the trades for the USDC/ETH pair, while also outcompeting UniSwap on 119 additional pairs for all trades <40k$ in size! That is the capital efficiency gain from pooling many assets together at work. The fraction of trades where DefiPlaza outcompetes UniSwap would be very large at 90%, but what does that mean for fee income? In the graph below we see the cumulative fraction of fee income plotted against the trade size in the same period as discussed above. What we can see in this graph is that roughly 30% of the fees of this pool are generated by the 90% of trades that are smaller than 40 k$ in size. At the lower fee percentage, those trades represent an equivalent income for DefiPlaza LPs of roughly 10% of the USDC/ETH UniSwap pool fee revenue. This means that in a transparent market DefiPlaza should be able to take 10% of the UniSwap v2 USDC/ETH trading fees at the same liquidity. If we then take into account the other 119 trading pairs that DefiPlaza offers with the same liquidity, the combined fee income should easily reach more than 100% of the UniSwap USDC/ETH liquidity provider income. The above comparison is only against the UniSwap v2 liquidity & volume, DefiPlaza should be able to take market share from other DEXes as well further increasing fee revenue. All this makes that we believe DefiPlaza can offer liquidity providers a competitive revenue even at a 0.1% fee level once it gains traction. Calculating impermanent loss At the cost side we have impermanent loss (IL) to consider. IL is something many people are aware exists but don’t quite fully understand. Put simply, as the market value of the liquidity reserves held by the DEX changes, arbitrage swaps occur along the x*y=k bonding curve to keep the spot prices on the exchange in balance with prices on the external market. As this happens the tokens held in reserve by the exchange slightly loose value as compared to the same portfolio held outside of the exchange. The loss is called impermanent because if the relative price between the tokens listed at the AMM returns to the same ratio as it was initially, these losses vanish completely. After one supplies liquidity to an AMM, the impermanent loss for that liquidity position moves up and down over time as the relative token prices change. When the liquidity is withdrawn the impermanent loss is realised into an actual loss. What we need to understand is how IL is likely to develop over time for our liquidity providers. Mathematically, it is possible to compute exactly how much the impermanent loss is as a function of the relative prices. If we take beta to be the price change for each token as compared to when the liquidity position was opened, one can work out the formula for generalised impermanent loss when N tokens are paired together (UniSwap N=2, DefiPlaza N=16) to the below: Impermanent loss generalised for N pooled tokens with beta price change per token Suppose we add $1000 in liquidity to DefiPlaza today. Then we will receive a certain amount of liquidity tokens XDP2 which represent our share in the reserves of all tokens held by the exchange. If we check back a month later, we might find that 2 tokens fell by 20% (beta=0.8), 4 tokens stayed the same price (beta=1), 8 tokens went +20% (beta=1.2) and 2 tokens went +50% (beta=1.5) in price. Then if we withdraw the liquidity tokens we initially received for our $1000 investment from DefiPlaza, we now would receive tokens worth ±$1120.70 on the external market. However, someone who held the same $1000 split over the same 16 tokens without providing them as liquidity would now have $1137.50 worth of tokens. The Impermanent Loss is the relative difference between these two amounts. It can be calculated with the formula above for arbitrary pool sizes and token price changes. For the example numbers above the resulting impermanent loss is ±1.48%. Impermanent loss example calculation The impermanent loss is zero if all betas are the same. Thus, if all tokens move up and down at the same rate, no impermanent loss will occur at all. If part of the tokens increase significantly in price while others fall in price the impermanent loss will be large. The more correlation there is in price movement between the listed tokens, the smaller will be the impermanent loss. Crypto markets have historically shown a high degree of correlation between token prices. With a larger basket of tokens, the risk of IL is effectively spread over the whole basket. If one token multiplies by 10x on price relative to the others, the IL will be less in a pool with 16 tokens than a pool with 2 tokens. If most of the tokens have similar price action, impermanent loss remains relatively small. Liquidity mining To be a compelling value proposition, the sum of fee revenue minus impermanent loss needs to be competitive as compared to other DEXes where people could provide liquidity. In the early stages after launch it is likely that trading volume will be relatively low. Thus, the revenue side of the equation is uncertain. To incentivise people to provide liquidity in this ramp-up period, DefiPlaza has a liquidity mining program. Over the period of 1 year, 50M governance tokens are released on quadratic curve (with more tokens releasing in the early stages). In the first 3 weeks this program has been very successful, with liquidity growing steadily and rewards fluctuating from 300% to 1400% over this period. It is expected that the income of the liquidity providers will initially be largely made up of liquidity rewards, ramping down gradually over the year such that at the end of the year the income will consist purely of trading fees. Conclusion DefiPlaza offers a competitive value proposition to liquidity providers by making it a fundamentally cheaper place to trade which should attract high volumes over time. The impermanent loss side of the equation is a bit more difficult to understand than in a pair-based exchange, but since it lists many tokens which may reasonably be expected to have correlated price action, the expected value for IL is actually less in DefiPlaza than for many trading pairs in pair based exchanges. The liquidity rewards are the cherry on the cake.