A multisig plugin that automatically swaps your tokens by computing the optimal path offchain
The current liquidity pool landscape is so vast, that optimising path between all the pools has become too computationally intensive to perform onchain. Aggregators such as 1inch solve this problem by moving pathfinding offchain, but this now means swaps can no longer be initiated from onchain; the product resides in web2 land.
Using Chainlink Functions, we call our own custom built API endpoint that performs the resource intensive path-finding offchain. The result is then encoded into a blog of bytes and sent back to the blockchain. Here, the AutoSwapperModule now is able to perform the most optimal path for its tokens.
By adding Chainlink Keepers to this, we can now automatically perform these swaps (e.g. at regular intervals, or at a certain threshold).
Chainlink Functions:
Chainlink Keeper:
Safe Protocol Compliance:
Instructions and Execution: