-
Notifications
You must be signed in to change notification settings - Fork 14
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
Clean up / finish Factory #164
Conversation
@@ -111,8 +111,7 @@ contract Borrower is IUniswapV3MintCallback { | |||
TOKEN0 = lender0.asset(); | |||
TOKEN1 = lender1.asset(); | |||
|
|||
require(pool.token0() == address(TOKEN0)); | |||
require(pool.token1() == address(TOKEN1)); | |||
assert(pool.token0() == address(TOKEN0) && pool.token1() == address(TOKEN1)); |
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.
What is the difference between assert and require?
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.
require is usually used for checking external inputs, assert is for internal stuff. Since this data is coming from the Factory, I'm considering it internal.
I debated taking out the check entirely too.
I decided not to implement a timelock here, as the only parameter it matters for is nSigma, and whatever
GOVERNOR
is implemented down the road will likely have a timelock built in.I did add event emission when parameters are changed, and added comments / organized stuff.