Meta
Your feedback means everything to us. This is a draft proposal – please let us know your thoughts by making a post below. If you’d like to have a synchronous discussion with us related to our proposal we can schedule a time through DM
Telegram: @nicholasevans
Twitter: @dualityxyz
Change Log
- [August 16th, 2023] Duality/Neutron merger proposal responce [Proposal ##][LAST CALL 07/21/2023] Launch Duality on Replicated Security - #88 by duality
- [June 23rd, 2023] Initial post to Cosmos Hub Forum
Summary
This proposal seeks to integrate Duality v1 with the ATOM Zone by securing it with Replicated Security.
It can be summarized by two major propositions:
- Deploying a novel user-aligned DEX that reduces liquidity fragmentation
- Aligning the deployment completely with the Cosmos Hub and its community
With the following outcomes in mind:
- Growing the activity and users of the entire interchain by integrating Duality with other highly active and decentralized communities
- Providing a public good for the Cosmos Hub with absolute value and community alignment
This proposal seeks to deploy Duality on the Cosmos Hub with Replicated Security, with 100% of any and all value being created from the protocol going back to the Cosmos Hub. Please see below for a breakdown of revenue sources for Duality.
For a quick summary of the benefits to the Cosmos Hub and Liquidity Providers:
- 100% of gas fees will go to the ATOM validators and delegators
- 100% of MEV revenues will go to ATOM validators and delegators (although in future proposals some of this value may be suggested as rebates to the liquidity providers who create it)
- Duality will launch without a token, so ATOM will be the default gas token
- Governance will be performed solely through ATOM for full incentive-alignment
- Liquidity providers will receive 100% of swap fees
If this proposal passes Duality will be added as a Replicated Security chain to the Cosmos Hub.
To help bootstrap Duality in making the ATOM Zone the entry point and center of economic activity in the interchain, a future community pool spend proposal for 500k ATOM will be raised for a separate vote. As a liquidity provider, the Cosmos Hub will own this liquidity and benefit from any and all value that it accrues. Please see the section on Liquidity Injection for more information.
This proposal and the functionalities listed are for Duality v1. Future proposals will outline improvements and collaborations through new features and partnerships.
About Duality
The vision for Duality is to take a major step towards building efficient and incentive-aligned markets that realize the original vision of decentralized finance: open and fair finance without middlemen. To do so requires full-stack control : custom logic for transaction inclusion and ordering, reduced block times to improve UX, modifications to fee markets to reduce network congestion and more. It’s also imperative that a new protocol should never sacrifice community, security, or decentralized decision making in this process. Duality is built with ICS, because ICS provides a solution to these needs by supporting new protocols with high-security, and a vibrant community.
Table of Contents
- Motivations for Replicated Security
- Duality Features
- Orderbook Functionality
- Good-till-canceled
- Immediate-or-cancel (partial fill)
- Fill or kill
- Dynamic Routing
- Approximate any AMM with concentrated liquidity
- Orderbook Functionality
- Duality’s Vision
- Growing the Pie
- Liquid Staking Tokens
- Unlocking On-chain exchange
- Optimizing interchain UX
- Breakdown of value sources
- Network
- Liquidity Provider Fees
- Governance
- Liquidity Injection
- Implementation Details
- Conclusion
- Info-links
- FAQs
Timeline
Duality is nearing completion. It has just finished a second round of audits with Informal Systems and is now live on the Replicated Security testnet.
Mainnet launch is targeted for early August.
Motivations for Replicated Security
One of the biggest problems for any new chain is security. If a chain’s security is low, users may not trust it despite innovative features or a strong product offering. The Cosmos Hub is one of the most secure blockchains by both its distribution of stake and economic security. Replicated security provides the best of both worlds: app-specific customization with Cosmos Hub security.
However despite the benefits, the equation doesn’t immediately seem balanced because Replicated Security chains should also add value to the Cosmos Hub. This is summarized by the question: “what do Replicated Security chains give back to the Cosmos Hub?”
After unpacking the multi-layered incentive structure between validators, ATOM holders, and Duality, it is clear that the best way to align a Duality deployment on the Hub is for the ATOM community to have full ownership over the deployment and all its revenue sources.
Embracing this conclusion led to building Duality as an open-source, public good while collaborating with the Hub and the teams comprising the ecosystem. If this proposal passes, Duality on ICS will launch in absolute alignment with the Cosmos Hub. Duality will be tokenless at launch, and as such all value generated on the chain will flow through and to the Cosmos Hub protocol.
Duality Features
Orderbook Functionality and Expansive Order Types
The base of Duality is an orderbook. To enhance their ability to express preferences, in addition to simple swaps and buy / sell orders, traders are able to place various order types to trade with on the orderbook.
-
Good-til-canceled: Market makers who don’t want to risk their orders being adversely selected can set a good-til-canceled order, where they can specify an end block number for when the order automatically rescinds if it hasn’t been fulfilled.
-
Immediate-or-cancel (partial fill): Traders who want to trade for as much of a token as possible below some amount or price can place Immediate-or-cancel orders. This can be useful for traders who want to buy as much of a token they can before others do.
-
Fill-or-Kill: Traders who want to trade exact amounts or nothing can place fill-or-kill orders. This can be useful for traders or integrations which prioritize exactness in their inputs or outputs.
For more information on order types check out the documentation.
Dynamic Routing
Typically, trades can be front-run when the route they take is broadcasted freely in the mempool. This is because the route tells more sophisticated participants the exact pools that the trade will swap through. This allows those more sophisticated participants to take that route first and make it more expensive for the participants afterwards. To prevent this, Duality introduces dynamic routing which allows traders to submit a list of routes. These routes are evaluated dynamically at execution and the one with the best execution price is chosen for the trade. If a sophisticated agent tries to front-run the trade, the route will dynamically respond to the drop in execution quality to choose the new best from the list.
For more information on dynamic routing check out the documentation.
Approximate Any AMM with Concentrated Liquidity
Instead of creating a different pool type for every type of AMM (eg. Stableswap, Weighted Pools…) Duality allows you to approximate any feasible AMM using the same underlying Duality pools. This is done by creating automated market making strategies on top of the base orderbook. This reduces liquidity fragmentation by reducing the need to silo liquidity for each different pool type as we can reuse the same underlying pools for different AMMs by just changing the liquidity distribution. Concentrated liquidity will also make Duality extremely capital efficient when providing liquidity for stable coin pairs or staked - unstaked asset pairs.
For more information on approximating market makers check out the documentation.
Duality’s Vision
Growing the Pie
The Cosmos Hub is a gateway into the interchain ecosystem. Because of its decentralization, history, security, and community, it is also incredibly well suited to host a vibrant economy. As LSTs, and native USDC unlock a wave of liquidity and activity throughout the interchain, the ecosystem could see unprecedented growth. While user acquisition is expected, user retention in Cosmos will require deep liquidity and smooth UX for new users. Duality will tap into liquidity that maximizes the growth of the interchain, with the Cosmos Hub acting as a key entry point at those cross-roads. This means prioritizing deep integrations with cross-chain protocols such as our integration with Squid’s cross-chain trade router on launch.
Liquid Staking Tokens
Liquid staking tokens will shift the way that people interact with their tokens within the interchain. Given the unique, wrapped, rebasing nature of liquid staking tokens, new protocols and user experiences will need to be built around LSTs to optimize their usage. Starting with and moving onward, Duality will aim to provide the best UX for all liquid staking activity by partnering closely with liquid staking teams and building liquid-staking focused protocols and experiences. This starts with working closely with Stride, a liquid staking chain (soon to be a Replicated Security chain), on figuring out how to best serve their users’ needs, aligning roadmaps, and then executing on big improvements. Such a collaboration will further strengthen the ATOM Zone.
Unlocking On-chain Exchange
Duality is the first step in tackling some of the major problems with DEXs today. The goal of Duality was to keep the learning curve low but push the ceiling regarding functionality, alignment and user expressiveness. To support experienced traders, Duality supports various order types (e.g., fill-or-kill, immediate-or-cancel, good-until, etc.) along with full order-book functionality. To support DeFi native users Duality has AMM functionality that allows any feasible AMM curve to be approximated and provided to without fragmenting liquidity.
Optimizing interchain UX
The future is interchain. Because of this Duality doubles down on IBC functionality. Duality has custom IBC middleware that facilitates cross-chain swaps via swap-and-forward, built in collaboration with Strangelove. Swap-and-forward allows users to perform a swap on Duality from any supported chain. Duality will also be launching Axelar’s general message passing middleware to unlock cross-chain interactions with other L1s such as Ethereum. This technology will be instrumental in bringing greatly improved cross-chain UX to the interchain and positioning the Cosmos Hub as a key trading hub at the crossroads of the decentralized communities in the ecosystem.
Breakdown of Duality’s Value Sources
Duality will launch without its own token. As such, the revenue sources and flows are planned as follows:
-
Network revenue is the value generated by gas fees and MEV. 100% of this would go back to the Hub. The distribution of 100% of MEV accrued from all sources after infrastructure cost will also be decided by the decentralized governance mechanisms on the Hub. In the future, Duality Labs recommends sustainable redistribution mechanisms to liquidity providers and traders who are creating that value.
-
Liquidity provider fees can be earned by users who provide liquidity at prices that traders swap at. All of these fees will be retained by liquidity providers in order to compensate them for the risk and utility of the services they provide to traders. This is in contrast to many other DEXs which take a cut of application fees.
-
Governance value is the value a Duality governance token would have if it existed. Since Duality does not have a governance token, any value a Duality governance token would have had should be absorbed by ATOM - including protocol ownership and governance.
Liquidity Injection
To help bootstrap Duality in making the ATOM Economic Zone the entry point and center of economic activity in Cosmos, the proposal requests a liquidity injection of 500k ATOM from the Community Pool.
The liquidity will neither be owned nor operated by the Duality Labs team. It will be delegated by the Community Pool to a trusted multisig of Hub validators and contributors (see below).
All value accrued from the corresponding liquidity position will be returned to the Community Pool upon withdrawal. Because 100% of network fees will also be routed back to the Cosmos Hub, the liquidity provider fees generated through any volume will go entirely back to the Cosmos Hub as Duality takes no cut of liquidity provider fees.
Implementation Details
Soft opt-out
Smaller validators with smaller profit margins have to pay the same infrastructure cost as larger validators with more capital. In order to ease this burden on smaller validators, a soft opt-out feature will be used in the proposed network code. This soft opt-out feature would protect the bottom 5% of validators from being slashed/jailed as a result of inactivity, giving them the option to not run the Duality binary.
The Trusted Multisig
The trusted multisig consists of validators. It will handle any liquidity released by the Cosmos Hub community pool and also be the sole controller of the Admin module. The Admin module allows for chain halts in the case of an emergency. Duality Labs will not participate in the multisig. The multisig can not be used to move users’ funds or edit protocol logic - it can only be used to rebalance the community pool funds it holds or temporarily halt the chain logic in case of emergency. To clarify, the admin module can not in any way alter, access, redirect, or interact with assets held within the protocol. It is worth noting that the halt can still be overridden by the validator set. As of writing, this multisig consists of the following teams: Simply Staking, Informal Systems, Imperator, Citadel One, DSRV, Polkachu, and Lavender Five. These are all reputable teams who are community oriented, and have the high operational experience needed to be trusted members of the multisig.
Future of the multisig
The multisig can expedite the execution of certain time-sensitive actions, such as initiating a chain halt in case of an emergency. However, for Duality to be fully ATOM-owned, the multisig’s role is meant to be temporary. There are a few approaches to mitigate the involvement of the multisig, increase its operational security in the future, and further align Duality with ATOM.
These are pending further research, but some of these approaches are as follows:
-
Group governance and multisig tasks together with an Optimistic Sub-Dao.
Akin to an Optimistic Rollup, an optimistic Sub-Dao would operate independently from the main governance system on the Cosmos HUB. The multi-sig’s functionality would be transferred to an optimistic sub-DAO.
But, any state-changing proposal would need to pass a fraud-proof period, which would take the form of a Cosmos Hub timelock period. During the timelock period, the Cosmos Hub validator set has time to veto any proposals raised by the Sub-Dao and block future Duality governance proposals. If a proposal is not vetoed during the timelock period, the proposal passes normally. In addition to this, the Groups module in Cosmos SDK 0.47 allows a group of members to manage an account, but also allows members to be added or removed and have their individual voting power modified. This unlocks further control over the composition of a subDAO. -
Alleviate the multisig’s operational overhead by utilizing Timewave’s Interchain Allocator. The Interchain Allocator is a protocol that aims to facilitate the handling of protocol-to-protocol liquidity. Although this isn’t live yet it could potentially provide a useful alternative for handling community pool funds.
Conclusion
This is a proposal to launch Duality, a novel DEX on the Cosmos Hub on Replicated Security. Our proposal attempts to take a different approach to launch than most consumer chains by proposing that all value created from Duality’s deployment go to the Cosmos Hub – 100% of governance value, gas fees, and MEV goes to the Cosmos Hub.
Duality Lab’s main focus right now is to help develop open-source software that creates value through improving the user experience, efficiency and incentive alignment around decentralized markets. As we see it, this is the best way to align with the Cosmos community and future success of the ecosystem.
Governance Votes
- Yes - You agree with this proposal and believe that 1) Duality would make a good addition to the list of Replicated Security chains that share the Hub’s security 2) Agree that Duality and the Cosmos Hub would benefit from an initial liquidity injection.
- No - You don’t agree with this proposal and don’t think Duality should be secured by the ATOM validator set.
- No with Veto - You believe this proposal either (1) is deemed to be spam, i.e., irrelevant to Cosmos Hub, (2) disproportionately infringes on minority interests, or (3) violates or encourages violation of the rules of engagement as currently set out by Cosmos Hub governance. If the number of ‘NoWithVeto’ votes is greater than a third of the total votes, the proposal is rejected and the deposits are burned.
- Abstain - You wish to contribute to the quorum but you formally decline to vote either for or against the proposal.
Info Links
FAQs
What’s in it for Duality Labs?
After explaining our proposal to various parties, the first question we kept getting was “this sounds great in theory, but what’s in it for Duality Labs?”. Given that we are proposing to receive absolutely no revenue, and offering the entire ownership over the ICS protocol to the ATOM community this is a reasonable reaction. So here’s our answer:
We believe that while the proliferation of decentralized technology into every facet of digital ownership is inevitable, it will play out on an extremely long timescale. Because of this we are very unconcerned about capturing value in the short-term.
Instead, we believe that it is more important to first create value (and a lot of it), before capturing any. This starts with building something that people want to use and own because it improves upon the current paradigm, as well as learning from users’ experiences and improving iteratively.
We also believe that any form of meaningful value capture in the long-term will be best accomplished through building a brand and culture known for building open-source, impact-driven software. Evidence for this can be seen through numerous success stories in crypto including: Satoshi, Informal Systems and the ICF, the Ethereum Foundation, and many more within the Cosmos and Crypto community. Hence our focus right now is to grow the pie instead of taking from it.
What else has Duality Labs done so far?
We started Duality Labs with the goal of building the world’s most efficient and incentive-aligned markets, but that often means tackling difficult problems. We can’t tackle everything at once, so picking our battles is important. Up to this point we’ve chosen to focus on MEV as it’s one of the biggest problems in incentive alignment plaguing most protocols today.
Since announcing the design of Multiplicity we have been hard at work implementing it in a collaboration with Skip, with additional help from Informal Systems. The design of Multiplicity was inspired by a paper co-authored by a member of the Duality Labs research team and advisor titled Censorship Resistance in On-chain Auctions.
Our goal is to not just bring these ideas to life for Duality, but for any builders who want to use them. Innovative research is one of our strong points, and we aim to tackle some of the hardest issues on-chain markets currently face.