Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swush : DEX Aggregator on Polkadot Asset Hub #2440

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

muddlebee
Copy link
Contributor

@muddlebee muddlebee commented Nov 5, 2024

Project Abstract

Swush is a DEX aggregator built on Polkadot Asset Hub, specifically to meet the needs of Polkadot’s cross-chain DeFi users. By leveraging cross-chain messaging (XCM), and aggregating assets from multiple parachains, Swush allows users to swap assets seamlessly across the ecosystem with minimal friction.

Full proposal can be found here

Grant level

  • Level 1: Up to $10,000, 2 approvals
  • Level 2: Up to $30,000, 3 approvals
  • Level 3: Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

  • The application template has been copied and aptly renamed (project_name.md).
  • I have read the application guidelines.
  • Payment details have been provided (Polkadot AssetHub (USDC & DOT) address in the application and bank details via email, if applicable).
  • I understand that an agreed upon percentage of each milestone will be paid in vested DOT, to the Polkadot address listed in the application.
  • I am aware that, in order to receive a grant, I (and the entity I represent) have to successfully complete a KYC/KYB check.
  • The software delivered for this grant will be released under an open-source license specified in the application.
  • The initial PR contains only one commit (squash and force-push if needed).
  • The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
  • I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_______:matrix.org (change the homeserver if you use a different one)

@github-actions github-actions bot added the admin-review This application requires a review from an admin. label Nov 5, 2024
@muddlebee muddlebee marked this pull request as ready for review November 6, 2024 01:06
@muddlebee
Copy link
Contributor Author

@keeganquigley like we discussed earlier :)
apologies for the delay, can you please review? thank you

@keeganquigley keeganquigley self-assigned this Nov 6, 2024
@keeganquigley keeganquigley self-requested a review November 6, 2024 02:03
@muddlebee
Copy link
Contributor Author

muddlebee commented Nov 6, 2024

We plan to store all the assets including all the parachain assets like HDX,GLMR as foreign assets at Polkadot Asset Hub.

https://wiki.polkadot.network/docs/build-integrate-assets#foreign-assets

Foreign assets are those assets in Asset Hub whose native blockchain is not Asset Hub. These are mainly native tokens from other parachains or bridged tokens from other consensus systems (such as Ethereum). Once a foreign asset has been registered in Asset Hub (by its root origin), users are enabled to send this token from its native blockchain to Asset Hub and operate with it as if it were any other asset.

I will update the proposal with above info for better clarification. Proposal updated with above info

@muddlebee
Copy link
Contributor Author

muddlebee commented Nov 7, 2024

I have added some more architecture diagrams in Project Details -> Core Components section and some other clarifications in the proposal.
Please let me know if any further clarficiation required, more than happy to explain or add anything :)

Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the application @muddlebee I think the biggest point of contention when discussing this internally with the other committee members was whether this should be funded by a DeFi protocol or DeFi grants program instead of W3F. But seeing that it will be fully integrated with Asset Hub, and have a focus on Plaza, makes me believe that perhaps this could help to jumpstart a solution for what might become an urgent need once smart contracts are live on AH.

One thing I'm not seeing in the application is a comparison to the other mentioned projects. Could you perhaps make a brief comparison to Chain Flip and Squid Router, and how these projects differ? EDIT: I do see that you compare to the other aggregators.

Also, do you foresee any uncertainties related to Plaza's ongoing development? Anything that might need to change along the way?

@keeganquigley keeganquigley added the changes requested The team needs to clarify a few things first. label Nov 12, 2024
@muddlebee
Copy link
Contributor Author

muddlebee commented Nov 13, 2024

@keeganquigley thank you for your response.

Could you perhaps make a brief comparison to Chain Flip and Squid Router, and how these projects differ?

Hey these are cross chain DEX's which help swap across blockchain networks like MoonBeam <-> Ethereum and other Ethereum L2s outside of Polkadot. I mentioned it as an example to highlight the importance of cross chain solutions.
I will clarify this in the proposal.

Also, do you foresee any uncertainties related to Plaza's ongoing development? Anything that might need to change along the way?

Currently I dont think so. In our development scope we have added only for Polkadot Asset Hub DEX and Hydration DEX which doesn't involve any smart contracts yet. But down the road we have to figure out on how to integrate smart contracts, which is beyond the scope of development roadmap proposed.

@muddlebee
Copy link
Contributor Author

also some updates on our current Development Status

Latest UI : https://swush-labs.github.io/swush-me-app/

UI features enabled

  • Asset Swap/Conversion
  • Confirmation screen after clicking "Swap"
  • Responsive UI for mobile/tablet view
  • Asset Conversion Details/Route

UI demo

Recording.2024-11-18.135554.mp4

Still in development, we plan to iterate it further :)

Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @muddlebee looks good. I am willing to give it a shot to help jumpstart the initial PoC, but in my opinion after this it would be great if you could hopefully apply for treasury funding or some other source. I will mark as ready for review so the rest of the committee can comment.

@keeganquigley keeganquigley added ready for review The project is ready to be reviewed by the committee members. and removed changes requested The team needs to clarify a few things first. labels Nov 20, 2024
@muddlebee
Copy link
Contributor Author

I recently made a huge swap on Hydration and ended up paying high fees. A similar transaction on StellaSwap (Moonbeam) would have cost much less in fees. This highlights how a DEX aggregator can simplify the process by fetching the best rates across the ecosystem. :)

image

Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muddlebee I don't believe you've gone through the KYC/KYB process yet. While waiting for further reviews, could you please complete either KYC verification (for individual check) or KYB verification (for legal entity check, if any). Thanks!

@muddlebee
Copy link
Contributor Author

@muddlebee I don't believe you've gone through the KYC/KYB process yet. While waiting for further reviews, could you please complete either KYC verification (for individual check) or KYB verification (for legal entity check, if any). Thanks!

@keeganquigley I have completed my individual KYC. We don't have any legal entity as such.

@keeganquigley keeganquigley removed the admin-review This application requires a review from an admin. label Dec 3, 2024
@takahser takahser self-requested a review December 4, 2024 13:33
@takahser
Copy link
Collaborator

takahser commented Dec 4, 2024

I recently made a huge swap on Hydration and ended up paying high fees. A similar transaction on StellaSwap (Moonbeam) would have cost much less in fees. This highlights how a DEX aggregator can simplify the process by fetching the best rates across the ecosystem. :)

@muddlebee just out of curiosity—did you really pay over 28 DOT in fees for a swap on Hydration? That sounds unusually high. Do you know what caused it? I’ve never encountered trading fees anywhere near that level, and to my knowledge, their pools typically yield around ~0.3% APR, so I’m quite surprised.

In the meantime, I’ll be reviewing your proposal in detail and will provide additional feedback soon.

@muddlebee
Copy link
Contributor Author

muddlebee commented Dec 4, 2024

I recently made a huge swap on Hydration and ended up paying high fees. A similar transaction on StellaSwap (Moonbeam) would have cost much less in fees. This highlights how a DEX aggregator can simplify the process by fetching the best rates across the ecosystem. :)

@muddlebee just out of curiosity—did you really pay over 28 DOT in fees for a swap on Hydration? That sounds unusually high. Do you know what caused it? I’ve never encountered trading fees anywhere near that level, and to my knowledge, their pools typically yield around ~0.3% APR, so I’m quite surprised.

In the meantime, I’ll be reviewing your proposal in detail and will provide additional feedback soon.

ahh yes, little less than that actually. The screenshot is after I made the swap and realized where the rest of my DOTs went. The reason for high trading fees is due to

Dynamic Fees during Increased Volatility
Protocol fees are dynamic and adjusted based on the current market volatility. If prices in the Omnipool are volatile, each swap will incur higher Protocol fees
https://docs.hydration.net/products/trading/liquidity/impermanent_loss#dynamic-fees-during-increased-volatility

Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @muddlebee. Sorry for the long wait. I asked our legal team for input, and they asked me to verify that you are not building a DEX yourself, but an aggregator. I can see that this is the case, but just to make sure, is this on your roadmap at all?

Otherwise happy to support!

@muddlebee
Copy link
Contributor Author

Hi @muddlebee. Sorry for the long wait. I asked our legal team for input, and they asked me to verify that you are not building a DEX yourself, but an aggregator. I can see that this is the case, but just to make sure, is this on your roadmap at all?

Otherwise happy to support!

Hi @semuelle. No worries, and thank you for following up! We are not building a DEX, nor is it on our roadmap. Our primary goal is to serve as a hub for parachain DEXes or a DEX aggregator.

@PieWol
Copy link
Member

PieWol commented Dec 5, 2024

Hey @muddlebee
thanks for your application.

Different from the similar projects in the ecosystem that you listed I saw Kheopswap which is not focussed on pooling assets themselves or being limited to a single chain. It's also open source and has been retroactively funded via OpenGov. Do you think that it would be possible for you to reuse a lot of it's code? To my understanding there is a lot of overlap in the features between your project and Kheopswap. Maybe this could both reduce your development work and the price of the grant.

Otherwise I'm fond of your idea and I would like to see it happening. Please let me know your thoughts here.

Best,
Piet

@muddlebee
Copy link
Contributor Author

muddlebee commented Dec 5, 2024

Hey @PieWol thank you for reviewing.

Kheopswap is a DEX only for Asset Hubs(Polkadot and Kusama) and my use case is a DEX aggregator to find optimal routes for asset swaps from any of the DEX'es like Asset Hub or Parachain DEX'es like hydration or moonbeam.

Do you think that it would be possible for you to reuse a lot of it's code? To my understanding there is a lot of overlap in the features between your project and Kheopswap.

for our DEX aggregator we will using the AssetConversion/Assets pallets exposed by the Asset Hub's runtime to get pool liquidity data, asset conversion which I believe must be used by Kheopswap as well. That's the only overlap I could think of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review The project is ready to be reviewed by the committee members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants