-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add SwapperCalleePsm #66
Conversation
Co-authored-by: sunbreak1211 <[email protected]>
Co-authored-by: sunbreak1211 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to automatically fill() the PSM buffer when there is not enough dai available to be bought?...
I'd keep it simple as it is.
do we want to use the data of the swapCallback() to pass the PSM address (and therefore support multiple PSMs more easily)?
I like as it is.
do we need a token recovery method in case the wrong gem is sent to the callee? Probably not necessary as only swappers are going to be warded callers of swapCallback().
Yeah, if following the regular path, this should not happen, as otherwise it would revert. We can't ofc prevent that anyone is sending tokens, but I think we shouldn't prevent that.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Some open questions:
do we want to automatically
fill()
the PSM buffer when there is not enough dai available to be bought? Currently leaning towards no as large swaps by facilitators can callfill()
manually and small swaps viaStableSwapper
may assume that keepers are regularly filling the PSM buffer. Swaps viaStableSwapper
may also be less common than for the UniV3 callee given that there is no slippage risk to mitigate here.do we want to use the
data
of theswapCallback()
to pass the PSM address (and therefore support multiple PSMs more easily)? Currently leaning towards no as only the USDC PSM is currently considered and passing the PSM address asdata
implies additional swap costs.do we need a token recovery method in case the wrong gem is sent to the callee? Probably not necessary as only swappers are going to be warded callers of
swapCallback()
.