Feature/osu 1505 yieldfowarder with swaps#388
Feature/osu 1505 yieldfowarder with swaps#388skimaharvey wants to merge 10 commits intofeature/osu-1490-yield-forwardedfrom
Conversation
Code Coverage Report for src/ files
|
f23e242 to
c2837a3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f23e2423e9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Review finding: silent share burning in
|
Summary
Adds a pluggable swap layer to the yield forwarding pipeline so that strategy profits can be automatically converted to a different target asset (e.g., USDC -> USDT, USDC -> USDS) before being forwarded to the receiver.
Core contracts
SwappingYieldForwarder— InheritsYieldForwarderand addsreportSwapAndForward(), which redeems to self, swaps via a pluggableISwapper, then forwards the target asset. The inheritedreportAndForward()remains available as a no-swap circuit breaker.ISwapper— Minimal interface (swap(tokenIn, tokenOut, amountIn, minAmountOut, receiver)) for stateless swap adapters.Swap adapters
PSMSwapperCurveSwapperexchange()UniswapV3SwapperAdapterUniswapV4SwapperAdapterzeroForOnedirection config with BalanceDelta extraction for output measurementDesign decisions
reportAndForward().swap(). This keeps adapters stateless and composable.