Conversation
|
I didn't see the follow on. In light of that, maybe just AngstromHook, since it is primarily a Hook (i.e., the main functionality requires that it be a hook vs. a plain router). When we have other dual contracts (e.g., a pool and a hook), we don't call it PoolAndHook, just Pool, since that's the primary thing it is.
|
We've changed to |
… on direct swaps
Angstrom review / refactor
Test with hardhat
jubeira
left a comment
There was a problem hiding this comment.
First pass done.
Great job overall, this is taking shape really fast!
I have just a few rather minor comments and questions, otherwise LGTM.
Besides this, we might need to ask a few questions about how to properly settle between nodes and vault; permit2 seems suboptimal for this use case. That's out of scope for this PR anyway.
Again, great job! Thanks for pushing this.
Co-authored-by: Juan Ignacio Ubeira <juani@balancerlabs.dev>
Co-authored-by: EndymionJkb <EndymionJkb@gmail.com>
Description
This PR implements Angstrom Hooks.
The requirements are:
For Swaps:
a) Check if the message signer is a registered node
b) Check if the signature matches the expected hash with current block number, following EIP-712
c) If everything matches, unlock router/hook and execute swap
For add/remove liquidity:
Notice that the Angstrom router and hook will be in the same file, and the unlock will be the same for both entities. Therefore, it doesn't make sense to call the contract AngstromRouter, and it also doesn't make sense to call the unlock function
_unlockRouter, as it actually unlocks both the router and the hook.Type of change
Checklist:
main, or there's a description of how to merge