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

DEX aggregator adapter #29

Open
gabririgo opened this issue Sep 3, 2023 · 0 comments
Open

DEX aggregator adapter #29

gabririgo opened this issue Sep 3, 2023 · 0 comments

Comments

@gabririgo
Copy link
Contributor

Summary

Implement a DEX aggregator adapter for allowing pools to swap to source liquidity from multiple sources at the same time.

Motivation

With the fragmentation of onchain liquidity among multiple liquidity sources, while Uniswap still maintains the lion's share of liquidity, it is desirable to allow users to use DEX aggregators, which simplify sourcing the best price.

Specification

  • implement an aggregator adapter (0x and 1inch possible solutions)
  • the adapter should have the same specs as the Uniswap adapter, i.e.
    • set infinite allowance before swap
    • assert target token is governance-whitelisted
    • remove allowance after swap without clearing storage for efficiency.
  • add adapter to authority (requires onchain governance vote)
  • whitelist methods

Subsequently, the swap functionality should be supported on the interface by means of a custom hook and allowing the pool operator to select/deselect aggregator API vs. uniswap API calldata source.

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant