Statemint Update / Roadmap

Rae, if there is no dedicated team building liquidity here, there won’t be any liquidity for people to place orders against. I don’t see how a DEX can fulfill “bulk trades” with thin liquidity. Thin liquidity might solve the “I just need 1 DOT to keep my account from getting closed” issue for users, but bulk trades by definition require lots of liquidity or high slippage will result.

Hey, Atticus here; core contributor to the largest DEX on Moonbeam (& Polkadot) right now.
Appreciate highlighting the roadmap, and great to see a lengthy discussion so far.

It seems that the core argument for instituting a DEX on a common good parachain is the synchronous handling of DOT fee to asset fee conversion directly on statemint since the following (crucial) point has been addressed in the above discussions;

  • Pain point of asset withdrawl from Custodian > Statemint > Parachain can be addressed through a business relationship between Parity <> CEXs for users to specify target/destination parachain on the withdrawal transaction

If we agree on the above, then the argument for a DEX takes a secondary step since there are various ways to achieve the intended objective – allowance for (other) asset fee conversion on Statemint – which is ultimately, one of the UX aspect on Polkadot that, while we agree requires optimizations, should not drain Polkadot of the massive resources (time, resources, funds) required to operate a fully functional DEX that encompass emissions mgmt, governance, support, maintenance etc. Even if say, the operations is outsourced to a stateDEX, the design decisions around liquidity management and the economical/political vectors would create a rabbit hole that’ll just undermine the premise of Polkadot.

The main contention of enhancing the UX via asset fee conversion on Statemint doesn’t justify the corresponding (cumulative) work required for effective liquidity management, which should be an objective undertaken by specialized liquidity hubs operating on each parachain, as with any L1s in DeFi. If I may, perhaps an equivalent parallel on how StellaSwap addressed the same issue is via our feature of “Swap-for-Gas”, which essentially allows first time users that do not have any GLMR (Moonbeam’s native token) when bridging their assets to Moonbeam to perform gasless swaps of their first-time-bridged-asset (e.g. USDC/USDT/ETH/WBTC) into GLMR. This transaction, since gasless, doesn’t require GLMR and therefore, there is no need for a user to have GLMR to start transacting on Moonbeam. This feature radically enhances UX, as outlined in the objective of this thread, but still, it is a secondary feature.

And btw, we spent a tremendous amount of time internally and top protocols like Moonwell in developing a liquidtiy plan for Moonbeam during the public grants process. Our grant proposal (which passed), can be seen here: grants/MBGP1.md at 1efdeeb04d7d3d58350c270e616057252296e99b · moonbeam-foundation/grants · GitHub. Perhaps this is useful in understanding the extent and depth of creating baseline liquidity for the ecosystem; merging it with the resource requirements and economical+political risk vectors would be a good benchmark in understanding the need for a stateDEX for UX optimization.

2 Likes

Thanks everyone for engaging so much on this thread. Will focus this reply on the DEX part. I think there are three main questions:

  1. Should Statemint have a DEX? What would the goals be?
  2. If yes, what properties should it have?
  3. Who should build it? (And, what is “it”? What are the objective functions?)

First, I see this brought up all the time. Some examples here, here, here, here. I think everyone wants the Treasury to award proposals in stablecoins (one discussion here). I’ve heard from investors that they think Polkadot is not a viable ecosystem because it doesn’t have a DEX in the core protocol, and this hurts teams trying to get funding to start their project on Polkadot. SR Labs has also raised a few issues (one related to fee payment mentioned here), all of which are solved by the ability of synchronous asset conversion. I’ve argued against a Statemint DEX for a long time, but I have to say now that I believe any time not having one is hurting the entire ecosystem.

Second, I think a DEX on Statemint, as part of the Polkadot protocol must be trustless (ideally no privileged functions, and any of them granted to Relay Chain governance tracks), credibly neutral (not prevent any asset from being used), have a third-party security audit, and be usable with only DOT (but possible with other assets too).

Third, who should build it? But first, what is “it”? As people have pointed out (I think @alice_und_bob said it best), a DEX pallet is the easiest part of the entire thing. It needs tooling, an XCM interface for interaction with other paras, compatibility with permissionless access means (light clients, wallets), UIs/access points that cannot censor users/transactions (or at least enough access points such that users have a credible expectation of always finding one avenue), liquidity participation, and probably more.

I never said that Parity would do all that. And that’s one of the reasons we’re having this discussion. If it has any hope of meeting its intended goals, it needs effort from a lot of different groups. Yes, Parity can make a pallet, but that’s only a fraction of the work. There’s really no argument or delusion from me on this point.

Finally, I understand DEXs compete for liquidity and users. And I know that the simple xyk style is not optimal. A DEX on Statemint should optimize for security (buying execution, absolute permissionlessness), neutrality, and a means for the Treasury to reliably grant proposals in stablecoins. But I don’t expect it to optimize for competition with other options in the ecosystem.

2 Likes

It seems incredible to me that we’ve seen this exact situation within the past year, and nobody has brought it up yet.

CosmosHub (ATOM’s native chain) was created as a credibly neutral hub for the Cosmos ecosystem, providing a center point on the IBC network and eventually shared security. But the ATOM team felt there wasn’t enough value accrual to their token, and furthermore what better place to have a dex than at the crossroads of the Cosmos ecosystem?

After all, not only did most Cosmos chains have IBC connections to the Hub, ATOM is listed on basically every exchange. How convenient! So they created Gravity Dex, allocated dev resources to it (at the cost of delaying shared security) and allocated ATOM for rewards.

But there was a big problem with this. It wrecked the credible neutrality that the CosmosHub needs for its other features to work. Sunny Aggarwal (founder of Osmosis, a Cosmos ecosystem dex) said in an interview that Osmosis couldn’t use shared security now that ATOM was a competitor. And what about the place of the ATOM token, which previously had been a popular quote currency on Osmosis? Would it still be appropriate in that role?

What about the other chains, building in Cosmos’s ecosystem, but perhaps also competing against what now was apparently going to become a DeFi hub?

So…what happened? Well, it turns out that the Atom team wasn’t nearly as good at building a dex as the folks who’d built a chain specifically for that purpose. GravityDex was a failure, and ended up spinning off into its own chain (rebranded Crescent now). The ATOM team then refocused their efforts on shared security, which they’ll end up delivering much later than if they hadn’t created this distraction for themselves.

In summary, please review what happened in Cosmos before making the same mistake. Keep common good parachains as genuine common goods. IE things that everyone benefits from, but aren’t commercially viable.

1 Like

I wonder if the proposal should rather be for Statemint/e to provide a “DEX distributor”? Things like payment for order flow are passed along to the end user, etc. Here the obvious issues are interfaces for each DEX and of course the distribution logic…

One can imagine a DEX or it’s users having an incentive to provide interface code. The distribution logic seems the novel/hard part…

Thoughts?

Great discussion and read all replies.

IMO the most valuable point of view is to standardize parachain assets through Statemine/t, so that exchanges, wallets, and custodians can support all parachains with only one integration. This can indeed bring a lot of convenience to the entire Dotsama and make more new users enter the Dotsama with a good experience.

But I think to achieve this goal, it is only necessary to provide users with a small amount of token of the specified parachain as the gas fee, and Statemine/t can be used as a place to exchange various parachain tokens through KSM/DOT, but I think it may not a DEX in the traditional sense, maybe I prefer to call it a “Gas Station”, any parachain can provide KSM/DOT <> Parachain Token liquidity for Statemine/t Gas Station by itself, according to the design experience of Bifrost flexible fee, only a small amount of liquidity is needed to meet the user’s demand for a gas fee, so liquidity can come from the community or parachain treasury’s provision.

So, from the perspective of Gas Station, it seems that it does not need to consider more issues about liquidity, competition or operation. Maybe someone will use it as a DEX by providing more liquidity, but I think it will only is a minority. Btw, in my mind that ideally Dotsama liquidity should be characteristically aggregated in different parachains and user trade or collateral liquidation should be done in parachains through aggregator routing and XCM cross-chain.

6 Likes

That’s the thing here - I’m glad that you brought it up. It is not a commercial move at all. There are so many aspects to this that Parity shouldn’t, wouldn’t, and couldn’t own.

Rather:

or

Very glad to see that 1) there are so many first time posters! (Welcome :clap:) and 2) this discussion remains constructive!

I’ve done some thinking into what makes a successful defi ecosystem recently. For any defi ecosystem, there has to be the (1) the right infrastructure (custodian multisig wallet, bridges, the DEX itself etc.) (2) liquidity and (3) the end user.

Right now, the vast majority of users who wants to trade on a DEX would prefer to do it in Ethereum itself because they have (1) and (2) fulfilled. Basically any non-Ethereum L1 is losing massively to Ethereum in Defi due to the infrastructure and liquidity already present in Ethereum.

Being an earlier ecosystem, it’s both the job of Parity as well as other builders in the ecosystem to build (1) and attract (2) and (3). Now, Statemint is whether we like it or not going to be the place where assets like USDT/USDC will be minted. When traders want to trade in Polkadot, they basically aren’t going to want to trade with wrapped USDT/wrapped USDC pairs but the native sufficient version which has to come from Statemint; also very few people would want to trade with Wrapped Eth pairs on Polkadot, since Uniswap V3 has native Eth pairs and way more liqiudity. Without a sufficient amount of USD stables, any DeFi eco is basically dead in the water.

As an “assets parachain”, Statemint should not just be able to generate the assets but also make it easy for institutions/end users to use and integrate with. Since Defi and the traditional finance world revolves around the USD, a first priority should be to figure out how to generate the maximum amount of USD stables (and maximize Statemint’s usecase). While I don’t personally think Parity should operate a full uniswap-V2 dex for many of the points previously pointed out, I think it makes alot of sense if there is some sort of mechanism within Statemint to encourage a DOT<->USDT/USDC swap alone.

Practically speaking, this Statemint USDT/C <> DOT pair would probably be quite liquid. Many DEXes in polkadot can draw from its liquidity through XCM and enhance their own DEX’s pairs (these DEXes can also have their own DOT to USDT/USDC pairs too), and Statemint would also be the preferred “one stop route” for CEXes and other institutions to integrate with Polkadot and bolster Polkadot’s overall liquidity significantly, due to Statemint being where the sufficient assets originate from.

Overall this would allow us to see greater liquidity across the Polkadot ecosystem’s many dexes and more end user demand. One end infrastructure goal that such an integration might enable would be a CEX being able to allow users to directly mint USDT/USDC with DOT because they are both working with Tether and have an easy integration with Statemint.

1 Like

Currently, the whole ecosystem is quite disconnected, there’s Hydra / Basilisk that is uniting them all etc etc.

I feel the pain and negativity coming from all DEX builders in the ecosystem regarding this proposal.
It’s reasonable and understandable.

I strongly believe that there should be a native StateminE/T DEX. At least for the dark times. There’s no deep liquidity on parachains / dApps at this point.

The first DOT crowdloan results were just horrible. In terms of narrative, Solana / FTX crush is actually one of the best momentum Dotsama had out there.

There needs to be a common good DEX providing basic functionality and, maybe, even gathering liquidity from other parachains.

Like a common-good 1inch for the whole Polkadot ecosystem.

StateminE/T DEX can act as the initial UX problem solution and eventually get terminated via governance vote, right?

What really important is solving the essential UX issue that each and every one of us is aware of.

It might help bring in a lot of new liquidity that will eventually split among dApps and parachains in the search for the best yield.

strongly support this good idea. there no need have a DEX for many parachains. acctually I think most of the classic basic defi infrastruture which already verified on eth should be implement on common good chain. polkadot’s parachain also can benefit from it through XCM. and should explore other direction that other chain like eth can not do.

Hey All,

Wanted to interject and provide some guidance from an actual user. Seems to be alot of developers here, which is understandable, but think that the projects need to do more user acceptance testing and “physically watch” how users interact with the system to map out joke points. First, let me start off by saying I understand the arguments from both sides. Will tackle this from several viewpoints here:

Adoption
Besides the multiple hops that have to occur to get to a parachain, the bigger problem in my opinion is even getting into the ecosystem itself. For example, if you live in the US or one of several other countries, the parachain tokens are not listed on any centralized exchange. I understand that you have not listed them in many countries because of regulatory uncertainty, which is understandeable. What this means practically is there is no way to use the parachains because you can’t go from DOT to your parachain token without already having your token to pay the transaction fees, which again you can’t get if they are not listed on a CEX. For example, the ONLY practical way to get into the DOT ecosystem in the US is to buy Astar on Binance.US (which was only recently listed) and then go from Astar to other parachains. You are basically asking folks to research 30+ parachain projects and then cross-reference those projects against every single CEX to see how they can get into the ecosystem. This is crazy. People literally can’t get into your ecosystems to begin with, which means the parachains suffer. This problem needs to be solved.

Pitfalls with a Polkadot Dex
At the same time, I understand parachain concerns. There would be no way to compete against a Polkadot Dex because of how the system is built. Polkadot would in essence have structural power, liquidity power, and have the convenience aspect because users would land on Statemint first.

Trust
I feel like I need to remind folks what crypto is actually selling (it’s true value proposition). It is not a crypto token, not blockchain, not the term web3, not a payment platform, not a borrowing/lending platform. It is “trust”. This is becoming increasingly visible to users. Examples: FTX CEX, Solend motion on Solana to seize liquidity, USDC/USDT freezes on ethereum, the “Move” programming language that allows asset transfers out of user’s wallets, custodial bridge hacks/thefts, Acala hack followed by the use of the “force transfer” protocol on substrate (obviously the protocol saved Acala). With all of this said, many users are sitting back scratching their head and saying alot of these are not looking so “trustless” because developers are programming backdoors with the capability to potentially steal assets. So users who are not programmers/developers are saying I have never seen this on Bitcoin or Ethereum (Ether only). Now, if you want to keep a force transfer protocol because your main customers are corporate institutions that have to comply with certain regulations or because you are located in a jurisdiction that requires it, then that is ok. Everyone is entitled to their specific business use case. But as of right now, I really don’t see any “trustless” DEX polkadot. It’s not that I fear authorities (I have nothing to hide), it’s that I fear a rogue project team that utilizes a “force transfer” without a governance vote. This undermines the whole value proposition of “trust”, which is the core product. People will eventually figure this out (albeit some sooner than others).

Conclusion
In my opinion, I feel that a “gas station” is probably warranted rather than a dex (no dex would be able to compete with polkadot and that would hurt innovation). With that said, I don’t want to let parachains off the hook. There should be an option to accept either dot or your token to conduct “gas fees”, even if that means you swap out dot for your token on the backend. Further, hopefully, there is some parachain team out there working on a truly trustless dex. I understand that this is hard to do, but maybe there are tooling services that polkadot can provide.

5 Likes

One thing that is becoming clear to me is that I have no idea what the scope of the “DEX” we’ve been discussing is. Would it be possible to enumerate the goals (and non-goals) of the DEX? Or clearly state exactly what the capabilities would be? A dex pallet that any parachain could integrate with sounds a lot different than something like Uniswap that is run by a team of product managers, engineers, and bizdev, so maybe we’re just misinterpreting what you are proposing (highly likely).

1 Like

I can see that a lot of people will have their opinions on the direction of adding a DEX to Statemint.

Here is my two cents.

I talked about a scenario like this here: How XCM will actually be used with XCMP

As stated in that post, we know for sure that asking users to constantly move funds between parachains will be very inefficient and provide a really bad experience for users. I expect that there will trivial DEX pallets deployed to many chains, even those outside of the DeFi world.

If we agree that statemint will be a hub which contains many different tokens (both fungible and non-fungible), it of course makes sense for there to be some functionality allowing users to trustlessly trade between different assets.

I do not expect that a DEX on statemint would be competitive to any dedicated DEX parachain (in terms of liquidity, UI/UX, or feature set). Nor would I expect there to be any kind of profit mechanism in this DEX, which might have made it a competitor to other parachains. If parachains do feel some single minimal DEX pallet is a competitor, perhaps they should question whether their parachain is bringing enough value to the network.

I also think, if another Parachain can offer a service which completely overshadows the DEX on statemint, then that is great! In some ways, a really base level DEX acts as a floor to our ecosystem, and we should push parachains to provide experiences which incentivize users to trade on their chain, versus keeping assets on statemint.

Finally, I would probably want to point out that thanks to our governance systems, no decisions made now or later has to be permanent. It seems backwards to our philosophy to be afraid to add some feature. Instead we should welcome experimentation (of course prioritizing security and safety), and let users decide how they want to use products.

It seems obvious to me that the upside at this time far outweighs any speculative downside.

2 Likes

I personnaly strongly support this proposal as to me, swapping two assets is kind of a common good facility. But I don’t think either Uniswap v2 or any existing AMM based model (except aggregation) is the right way to do it.

I think this dex could bring more users to the eco as the dotsama’s store front, but it has to comply with some rules not to compete with existing dexes, such as not using KSM for incentivizing liquidity, acting as an aggregator, using fees to be redistributed via treasury, and focusing on best execution via order books instead of amms (acting as an aggregator for them).

I think the is a clear misunderstanding and fear of parachains/existing dexes potentially competing with this dex and creating a potential conflict of interest with DotSama’s governance and its own community. I think you guys are wrong.

There is a clear confusion by most of you guys about what brings liquidity into a market and what should and how it should be incentivized. As an ecosystem, we need to support each other and stateminE/T was exactly made for solving the free rider problem in any market, acting as a base model for parachains to develop themselves organically upon it.

I think there are few features that dotsama needs to implement in order to integrate with other ecosystems and eventually with regulated exchanges and institutions as well. Because in the end, only « users » will bring liquidity.

  1. EXECUTION

Any exchange needs to tackle execution as a fundamental feature of its architecture. It’s the primitive that brings liquidity to any market. Substrate’s current execution is not a priority as current dexes are too much focused on economic incentives. But someone as to tackle this. Like in a prisoners game, only a common good architecture can focus on this. That was common good parachains are all about imo: solving the free rider problem.

This dex would not compete AT ALL with any parachain if it could bring the best execution to the ecosystem. It could be done via l2s, TEEs, phat contracts or even « off-chain », and we could even build order books on top of these. On the contrary? It could bring more users to the eco, which we definitely lack of. Which leads me to 2)

  1. REGULATION

As an « official » product from dotsama, it will eventually have to be regulated as an exchange and thus look like an exchange: this statemint exchange could be the doorway to onboard new users to dotsama, as well as institutionals looking for a decentralized best executiton exchange (GSR, Jump, or even investment banks and asset managers).

  1. ANTI-TRUST RULES

There are clear rules that this dex should use not to compete with any parachain, such as never using KSM and an extra incentive for liquidity bootstrapping.

As a common good dex, it must serve parachains to bring liquidity to their ecosystem, not the opposite. But meanwhile, as an official product, it also has to remain independent from other dotsama dexes and not collude with any of them. This has to be taken very seriously by DotSama’s governance to protect the exchange and the well being of the ecosystem.

CONCLUSION

I think this common dex can only be the fuel to the DeFi ecosystem in DotSama. We already have so many pallets related to this to implement it and we could show the power of our DeFi eco via XCM by displaying them in an unified UI.

Last but not least, I’ll quote the GOAT who recently tweeted about polkadex:

« Finally, an exchange which looks, acts and feels like a CEX, coded on @substrate_io, hosted on @polkadot. @polkadex »

this is what imo is this proposal all about.