Skip to content
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

Merged
merged 17 commits into from
Sep 21, 2023
Merged

Clean up / finish Factory #164

merged 17 commits into from
Sep 21, 2023

Conversation

haydenshively
Copy link
Member

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.

Base automatically changed from fix-ltv-symmetry2 to master September 21, 2023 02:56
@@ -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));
Copy link
Collaborator

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?

Copy link
Member Author

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.

core/src/Factory.sol Show resolved Hide resolved
@haydenshively haydenshively merged commit 2ff76a6 into master Sep 21, 2023
0 of 3 checks passed
@haydenshively haydenshively deleted the factory-timelock branch September 24, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants