-
Notifications
You must be signed in to change notification settings - Fork 29
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
Aave COW Swaps #138
Aave COW Swaps #138
Conversation
src/swaps/AaveCOWSwaps.sol
Outdated
address public constant BAL80WETH20 = 0x5c6Ee304399DBdB9C8Ef030aB642B10820DB8F56; | ||
address public constant BPT_PRICE_CHECKER = 0xBeA6AAC5bDCe0206A9f909d80a467C93A7D6Da7c; | ||
|
||
address public chainlinkPriceChecker = 0xe80a1C615F75AFF7Ed8F08c9F21f9d00982D666c; |
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.
We think that it would be better to pass the priceChecker and milkman addresses as input to the swap method, this way you would be forcing the user, to check / get up to date addresses for the specific swap.
This would be safer, as if not, possibility that user just forgets to set the new addresses could be high. It would also make it so you don't need to hardcode BAL token and price checker.
Then a section on README could be added on how to find up to date addresses, and / or an other option could be to add these kind of addresses in a different lib (maybe like address-book) depending on how often they get updated
src/swaps/AaveCOWSwaps.sol
Outdated
data | ||
); | ||
|
||
emit SwapRequested(fromToken, toToken, fromOracle, toOracle, amount, recipient); |
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.
would need to emit milkman address also right? as its needed in the cancel swap input, and could change between swap and cancel?
Also the slippage?
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.
Unfortunately there's no way to get the milkman address, it's only available via event so we'd have to retrieve it to get it. Added slippage.
@sendra updated! |
@sendra updated. |
@sendra updated docs. |
Changelog
Add AaveCOWSwap contract.
Add helper payloads.
Add tests.
Add README.