What is Dyson Finance?
Dyson Finance is a decentralized exchange (DEX) that absorbs the complexity and uncertainty of liquidity provision, enabling anyone to easily become an LP and achieve higher and more predictable returns compared to other DEXs.
Key Features of Dyson Finance:
Dynamic AMM: The liquidity pools dynamically adjust trading fees, capturing MEV (Miner Extractable Value), maximizing protocol fee income, and fairly distributing the revenue to users.
Dual Investment: This widely embraced structured product, comprising options in the forex market, enables the protocol to efficiently acquire liquidity from investors. This simplifies decision-making and optimizes liquidity returns for investors.
Testing Dyson Finance
In this article, we will be testing the Dyson Finance.
What sets Dyson Finance apart?
Dyson Finance distinguishes itself from traditional DEX protocols, where providing liquidity is complex and earnings are unpredictable. Dyson Finance provides predictable ROI irrespective of various market conditions. This approach introduces different scenarios that necessitate testing and simulating Dyson Finance’s functionality.
Please note: To conduct a comprehensive review of Dyson Finance, it’s essential to test the protocol’s performance by manipulating time and the key factors it depends on. This end-to-end testing covers all market conditions through extensive system manipulation.
Dyson Fiance is currently live on the Sepolia Testnet. However, testing Dyson on the Sepolia Testnet presents several challenges:
Time considerations: Do we wait one month to obtain test results? If so, will this review still be relevant?
Inability to alter key protocol factors limits the scope of testing to simple scenarios.
Using a local Hardhat fork or an Anvil fork of the Sepolia Testnet also presents its own inconveniences, including:
Impersonating accounts to acquire ERC20 tokens for testing.
The absence of an explorer for debugging failed transactions.
The necessity to write custom scripts for providing liquidity and redeeming.
Consequently, none of these options are practical for our testing purposes.
Leveraging BuildBear for Testing
To tackle these challenges, we opted to utilize BuildBear.io to establish a private testnet of the Sepolia Testnet. This approach enabled us to efficiently employ Dyson Finance’s frontend and conduct comprehensive testing.
It’s important to note that, as premium users of BuildBear, the chainId obtained from the platform matches the chainId we are forking. For example, the private testnet we created on BuildBear, named “CIRCULAR SHAAK TI
" shares the chainId 11155111
, as it is a fork of the Sepolia Testnet. This was achievable through BuildBear's premium
account.
Set-up before the testing: Utilizing the BuildBear Private Testnet Faucet to mint ETH, USDC, and DYSN Tokens.
Transaction 1: Depositing 10,000 DYSN into the DYSN/USDC pool for 30 days at a total APR of 97.70% and an ROI of 8.02%. At maturity, we will receive 51,020.91 USDC if the fair price is greater than the strike price, or 10,802.46 DYSN if it’s the other way around.
Please Note:
Fair price: The fair price is determined by the pool’s status, taking into account the reserve of the two tokens and the size of the dynamic trading fee.
Strike price: This is the ratio of the reverse of token0 and token1 in the pool at the time of depositing the assets.
Transaction 2: Depositing 25,000 USDC into the ETH/USDC pool for 30 days at a total APR of 97.70% and an ROI of 8.02%. At maturity, we will receive 27,006.15 USDC if the fair price is greater than the strike price, or 0.049868 ETH if it’s the other way around.
The Real Test
To accurately determine the actual amount we would receive, we advanced time by one month using the BuildBear utility tools, which are accessible as part of the BuildBear premium account
services. This allowed us to simulate the passage of time and assess the final outcomes more realistically.
Executing Different Scenarios
To facilitate this, it is essential to have the following capabilities:
The ability to adjust the fair price of assets.
The ability to save the state of the Testnet at various testing points. This eliminates the necessity to create multiple Testnets for executing different scenarios. To achieve this, we utilized the BuildBear utility tool, as demonstrated below, to create a snapshot of the Testnet at the required points.
Case 1: The Fair Price of Tokens Remains Unchanged || The Simplest Test
Redeeming 51,021.98 USDC from the DYSN/USDC pool closely aligns with the projected amount of 51,020.91 USDC.
Redeeming the 0.049869 ETH from the ETH/USDC pool closely aligns with the projected amount of 0.049868 ETH.
Case 2: Altering the Fair Price of Tokens by Swapping Large Amounts of Tokens.
The fair price depends on the reserve and dynamic trading fee of the pool. To learn more, please read the docs.
By updating the fair price of the DYSN/USDC pool through a swap of 200,000 DYSON for USDC, the fair price has been reduced below the strike price of 4.72308 ( DYSN/USDC). This resulted in redeeming 10,802.74 DYSN, which is very close to the projected amount of 10,802.46 DYSN.
Similarly, Updating the fair price of the ETH/USDC pool by swapping 1000000 USDC for ETH, the fair price has been increased above the strike price of 541,554 ( ETH/USDC). This resulted in redeeming 27,006.84 USDC, which is very close to the projected amount of 27,006.15 USDC.
In Conclusion:
Upon thorough analysis of various scenarios, we have observed that the projected redemption amount closely aligns with the actual redemption results.
This comprehensive analysis has been made possible solely through the use of BuildBear. With BuildBear, we were able to fast-forward by one month and adjust the fair price.
Leverage BuildBear for Quality Assurance
If you are a DeFi Web3 App seeking to:
Establish an internal QA Environment for your team, or
Develop a private testing environment for your community prior to Mainnet release.
Feel free to reach out to us at team@buildbear.io. We are here to assist you in creating a fully customized testing environment tailored to your needs, ensuring a seamless experience.
NOTE: The information provided in this article should not be considered financial advice.