Performance, Cost and Future Outlook of On-Chain Transactions on Derify
In the last two blogs, we talked about basic mechanism and operation model of Derify protocol. This blog will cover the topic that traders care most: transaction performance and cost, we are happy to share some of our thoughts on the topic to you.
Derify protocol will relentlessly chase better on-chain performance and lower trading cost. Performance and cost have much more significant influence on margin/derivatives trading than on spot trading — many trading strategy is time-sensitive; others have high requirements on frequency. From our perspective, we have two major needs: less time between trading and its aggregation into the blocks (less confirmation delay), lower transaction cost on the chain (which means lower trading fees).
Derify is launching on Ethereum, but we choose not to deploy on Ethereum Mainnet directly, because the gas price and transaction speed on layer 1 does not satisfy our needs mentioned above. This decision left us with three other possible solutions: side-chain, Optimistic-rollup and ZK-rollup. After thorough research, Optimistic-rollup was put aside for its relatively long fund withdrawal period (it takes 3–14 days to withdraw fund from layer 2 to Ethereum main net), while ZK-rollup was put aside for its high development cost of “circuit”. Thus, side-chain becomes our V1 solution to address our needs in performance and cost.
Among all ETH side-chains (or other EVM compatible para-chains), we decide to use BNB Chain for following reasons:
- BNB Chain supports metamask, its blockscout explorer allows easier user interaction with on-chain data.
- BNB Chain has good performance, with fast block time and transaction can be confirmed within 5 seconds.
- BNB Chain has low gas fee, with on-chain trading cost as low as $0.0001.
- Successful derivative DEX projects has proven its reliability, also has better DeFi ecosystem.
- BNB Chain Inter Blockchain Bridge like Omni Bridge and BSC Bridge allows easy navigation and migration between different blockchains, which is lacked from some of the competitors.
Although BNB Chain has lots of advantages, if we apply typical price calculation methods of typical decentralized exchange to derivatives trading, the confirmation speed of up to 5 seconds is still problematic. Because that means your transaction could be delayed, changed or even cancelled during the confirmation process, and the a lot more other dramatical things may happen during the period.
However, the unique ‘Contract Calculation’ feature of Derify protocol avoids this problem. As long as the on-chain trading confirmation speed is stable and expectable (which is obviously impossible on Ethereum Mainnet, since there are many factors that have an influence on the speed of confirmation, and the variance in trading fees may result in unexpectable confirmation speed), we could ignore the moment and time that a transaction is aggregated into the blockchain, but directly set the current price as the actual trading price, and do the calculation later by reviewing the state of the position during a certain period. Thus, we bypass the confirmation delay to satisfy our needs of less time. More details of Contract Calculation can be found in our whitepaper here.
In terms of the trading cost, the cost of BNB Chain is almost negligible, and it truly satisfies our needs of lower cost.
All being said, BNB Chain is not Ethereum mainnet, and its decentralization level is somewhat lower than that of Ethereum main net. Therefore, we plan to return to Ethereum main net once possible.
Currently, we are actively observing the adoption of Optimistic-rollup by other mature projects (like Uniswap), realization and development of ZK-rollup, and will probably choose whichever solution that successfully satisfy our needs first.
We are looking for different things from different solutions:
For Optimistic-rollup, it needs market adoption of mature projects and a positive market feedback for an important question: whether traders could endure extremely long fund withdrawal period? If traders approve the long period of fund withdrawal during the mass adoption, or there is a new solution that may fix this problem externally without much extra effort(like bridge loan pools), then Optimistic-rollup will be an excellent choice, from technical level.
On the other hand, ZK-rollup is another excellent solution. The only problem is we need a certain time to complete our self-developed solution. However, there is a good news recently (as of the written time of this blog), ZK-sync will launch a solution of ZK-rollup that supports EVM in May, 2021. We will eagerly wait and see how it plays out. If possible, we are willing to be the first testing partners.
Whether we choose Optimistic-rollup or ZK-rollup, if we migrate back to Ethereum main net, the trading fees will obviously increase a lot compared to that of BNB Chain. From this standpoint, we will carefully review the possibility of ultra compression options of the two layer-2 solutions mentioned above, hopefully to achieve an ideal compression ratio of 500–1000:1 to satisfy Derify’s requirements of on-chain trading fees. We will continue to do our research and follow up on this topic in the future, and share more thoughts in future updates with you.
For the transitional period before we move back to Ethereum main net, Derify plans to be compatible with other chains: Polygon and Arbitrum which are popular and widely used, Avalanche which has great price for performance, and other non EVM-compatible chains like Solana which is tailored for traders, Polkadot which has great scalability, etc (albeit a later adoption time).
This is our thoughts on performance, cost and future outlook of on-chain transactions on Derify. For traders, you probably only need to remember our highlights: 1. You trade with actual price you see, with fast and stable trading confirmation speed (5s on-chain confirmation); 2. As low as $0.0001 on-chain trading fees.
For trading with high performance and low cost! Cheers!
Please spread the words, for the future of DeFi community.
Follow/Subscribe us for more updates!
Important Links & Docs:
Audit Report: https://www.certik.com/projects/derify-protocol
You are more than welcome to share/like/comment this article. For the better future of DeFi!