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

[6.33] Integrate CowSwap as /swap page on new app (aka PickleSwap) #391

Open
5 tasks
manymoneymanny opened this issue Mar 22, 2022 · 3 comments
Open
5 tasks
Labels
hours: 13 priority: high Important, do soon status: available 🟢 Ready to be worked on type: enhancement 🧠 New feature or development on existing feature

Comments

@manymoneymanny
Copy link
Contributor

manymoneymanny commented Mar 22, 2022

Abstract

This product backlog item consists of an enhancement to our Pickle UIv2 that provides a functional swapping module consisting of a page in the Pickle UIv2 app with a swapping interface that allows users to select between two any tokens and uses the CowSwap service behind-the-scenes to route the swaps. Besides presenting graphic familiarity with DEX swapping interfaces in general and the CowSwap interface in specific, the different states of the swapping flow in the app should follow the same UX as found in the CowSwap app itself.

Job Stories

Job Story no. 1

When users need to sell or buy tokens
I want to keep them on the Pickle app
So that I can study their behavior and offer them add-on services

Job Story no. 2

When users need to sell or buy tokens
I want to offer affiliated swapping services on the Pickle app
So that DILL holders can have another revenue stream

Priority

ICE Score 5.67
Impact 9
Confidence 5
Ease 5

Impact

We believe this release can generate a new revenue stream for Pickle. As Pickle users can be quite active traders, this new revenue stream is likely to be significant. Currently, Pickle has annualised revenues of around $4.3M. Should this revenue stream amount to an additional $500k–1M in new revenues it would bring in significant economic benefits to $DILL holders.

Confidence

I am 50% confident we will realise the predicted Impact. This is because CowDAO has not enabled incentives for an affiliate programme yet, therefore there are no terms and conditions we could use to evaluate. What we know is that given we process yield, we generate trading volumes of about $25M annually at present and adding 10,000 trading users to that we could be generating $30-35M in annual volume for an affiliated DEX. Using a meta-DEX aggregator like CowSwap which will integrate DEXs from many chains means that an affiliate fee of 1.5–3% or so would give us the desired Impact. This is quite high, as $35M of volume generates a DEX about $100k in fees, and as an affiliate maybe we could expect 10-20% of that. Of course, our volume would grow as we grow in users and processed yield.

Ease

This should take an experienced full-stack engineer familiar with Web3 around 35-40 man-hours to design, develop, test, deploy, and integrate.

Deliverables / Acceptance Criteria

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
RFC 2119.

  • The swapping functionality MUST be hosted on Pickle UIv2 as a separate "Swap" tab with route /swap
  • The swapping functionality SHOULD follow Balancer's swapping implementation that integrates CowSwap (see Assets)
  • The UI MUST follow the design system already implemented in Pickle UIv2.
  • The states of the swapping module SHOULD follow CowSwap's UX.
  • It is RECOMMENDED the UI code can be easily upgraded to pass an affiliate code or ID when interacting with CowSwap contracts.

Assets

draft mock of PickleSwap module

(Balancer implementation of CowSwap integration) https://github.com/balancer-labs/frontend-v2/tree/develop/src/services/gnosis
(Balancer swap UI) https://app.balancer.fi/#/trade (uses CowSwap when users toggle "trade gasless" on)
(CowSwap app UI) https://cowswap.exchange/#/swap
(frontend code review and guidance) please ping @janklimo (jan#7608 on https://discord.gg/pickle-finance)
(graphics and illustrations) please ping @fennec (fennec#1000 on https://discord.gg/pickle-finance)
(CowSwap GitHub) https://github.com/gnosis/cowswap
(CowSwap Discord) https://discord.gg/cowprotocol

@manymoneymanny manymoneymanny added this to the pickle-ui_v2.0 milestone Mar 22, 2022
@manymoneymanny manymoneymanny added type: enhancement 🧠 New feature or development on existing feature priority: high Important, do soon status: available 🟢 Ready to be worked on labels Mar 22, 2022
@cryptokage1996
Copy link

@mannyreimi88 based on reading above Abstract, according to my understanding we are trying to create a swap similar to cowswap right?

@manymoneymanny
Copy link
Contributor Author

@mannyreimi88 based on reading above Abstract, according to my understanding we are trying to create a swap similar to cowswap right?

@26vivek06 we'll integrate the CowSwap contracts into our UI and use the Balancer UI integration and CowSwap's official UI as templates to our own UI. So, yes, it shall be virtually identical to CowSwap and will use the same Cow Protocol contracts on the backend to get quotes, do token approvals, do the gasless swaps, provide the end-results, etc.

@manymoneymanny
Copy link
Contributor Author

@26vivek06 please move the issue to "in-progress" (or let me know and I'll move it) once you have a PR of your development branch attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hours: 13 priority: high Important, do soon status: available 🟢 Ready to be worked on type: enhancement 🧠 New feature or development on existing feature
Projects
None yet
Development

No branches or pull requests

2 participants