KlimaDAO / klimadao

Monorepo for the official KlimaDAO site, dApp, components and design system.
https://klimadao.finance
MIT License
95 stars 73 forks source link

[buy] Integrate Buy from pool flow into carbonmark #1127

Closed ladytrekker closed 1 year ago

ladytrekker commented 1 year ago

Description

See the design for the buy flow here in figma

When a user wants to buy tokens from a Single Project on carbonmark, the redirect to the Redeem screen on the app should be removed. Instead, the buy/redeem flow should happen directly on carbonmark.

Todo


FEEs Breakdown

From this comment:

First, here is a top-level view of the fees to make sure we are all on the same page

Fees depend on which payment token, which pool, and how many tonnes are being retired. SushiSwap Toucan C3 KlimaDAO RA
Swap to pool token
(per swap)
0.3%
Default Redeem from any pool 0% 0%
Selective Redeem from BCT 25%
Selective Redeem from NCT 10%
Selective Redeem from UBO 2.5%
Selective Redeem from NBO 2.5%
Retire your own project token 0%
Redeem & retire pooled token
(% IN TONNES***)
1%***

Now breaking it down for each of our main journeys

Retire tco2/c3t you already own

No fees. Why? The RA does not charge a fee if you are providing the project token to retire.

Buy tco2/c3t from 🏷️ seller listing

No fees. Why? USDC goes directly to carbonmark contract. No swaps or redeems needed.

'Retire Now' from 🏷️seller listing

No fees. Why? Under the hood this is just a combination of both steps above (buy asset -> retire it)

'Buy Now' from a 🤽pool listing.

No fees for the RA. Sushi fees apply depending on # of swaps Pool fees apply unless you are redeeming the default project. Why? Under the hood, the RA is doing a swap via sushi to get to the target pool token, then using the pool token to redeem the desired project from the pool. The RA does not charge for redeeming, it only charges for redeeming and retire.

'Retire Now' from a 🤽pool listing.

Same as above, but with an additional 1% fee for the RA.

*** the 1% aggregator fee is calculated as 1% of the tonnage being retired. For example, a default retirement of 1 tonne, paid for with BCT, adds a 0.01 BCT fee, for a total cost of 1.01 BCT image Then, this value is converted to the payment token (for now, just USDC)

Considering the above, there are a few challenges and open questions from my end

theprofessora commented 1 year ago

LMK If I missed anything, but I tried to mock up each possible scenario here: https://www.figma.com/file/5GewbdVaM1Q06CwHmF7d3F?node-id=0:1#453508976

ladytrekker commented 1 year ago

URL structure