How to support alternative swapping strategies #263
Replies: 3 comments
-
Just adding the note here about scope creep, although I do see the benefit of having this in the near future (if not already). For the POC, I think it's fine to either not have swaps or have what we currently have built out for swaps (@thelostone-mc mentioned we already have it built, it's just not necessarily modular), just to lock in the scope. Interested in hearing more about the modular portion for next steps here though. |
Beta Was this translation helpful? Give feedback.
-
I'd say having this with V2 router is def worth it cause it I'd say if we can afford it -> just duplicate the GrandRoundManager contract with V2 implemented and have that deployed on polygon |
Beta Was this translation helpful? Give feedback.
-
Not sure when we want to create a unique |
Beta Was this translation helpful? Give feedback.
-
Currently, the
GrantRoundManager
contract extends theSwapRouter
, which is an implementation of the Uniswap v3 router.This allows donations to be made in arbitrary tokens, so long as a path can be provided to swap the input token to the
donationToken
specified by the Manager contract.At a minimum, we want/need to extend this to support Uniswap v2 compatible routers, which would include alternative protocols which forked from v2, such as a SushiSwap. This is useful generally, and required in the case of supporting some networks where no (high liquidity) v3 pools exist.
Ideally, we want this to be modular in some way, allowing for using either or strategy, or even both at the same time.
An additional "nice to have" would be modularizing the strategies sufficiently such that alternative swap strategies, i.e. integrations with completely different DEXs or DEX aggregators, could be built easily in the future.
One possibly naive approach to v2 and v3 support would be to have the
GrantRoundManager
also extend from from the v2 router, with separatedonateV2
anddonateV3
methods. A client could choose which donate method to use, based on network, liquidity, or other considerations.What other approaches could we consider for supporting v2 style swaps, and for modularizing the swapping strategy even further.
Beta Was this translation helpful? Give feedback.
All reactions