Skip to content

DEX aggregator adapter #29

@gabririgo

Description

@gabririgo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions