|Author||Edson Ayllon (@relativeread)|
The current version of Single Asset Withdrawal (SAW) adds unneeded complexity to the Pool Logic contract when adding new integrations, as the core team has seen with Uniswap V3.
This new version of Single Asset Withdrawal will be layered on top of the Pool Logic, instead of resting inside of it, decreasing security concerns and increasing the speed of implementing new integrations.
This version also reduces the burden on managers created by the previous version of Single Asset Withdrawal. In SAW v1, a user could withdraw any token directly from the pool in accordance with their share, changing the pool composition in the process. SAW v2 works like regular withdrawal in that it does not change the pool composition.
This version of Single Asset withdrawal will have the contracts receive the withdrawal assets first, swap them into a single asset, then send that single asset to the user withdrawing.
The contract will be an upgraded version of what Toros uses for their withdrawal but adds compatibility for unwrapping LP tokens. This intermediary contract will be available for all dHEDGE pools. In the case of an unsupported integration, users may still withdraw directly from the pool contract.
Implementation will be rolled out in phases. In the first phase, only unwrapping of LP tokens will be done, no swapping into a single asset just yet. Once an on-chain router with sufficiently good prices (lower slippage) is developed, then swapping to a single asset will be rolled out.