-
Notifications
You must be signed in to change notification settings - Fork 10
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
Supply Sync #16
base: master
Are you sure you want to change the base?
Supply Sync #16
Conversation
936569d
to
6b6a887
Compare
src/SupplySync.sol
Outdated
|
||
/// MkrSky.sol -- Mkr/Sky Exchanger | ||
|
||
// Copyright (C) 2023 Dai Foundation |
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.
Shoulde be 2024
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.
done
src/SupplySync.sol
Outdated
GemLike public immutable mkr; | ||
GemLike public immutable sky; | ||
|
||
constructor(address mkr_, address sky_, address owner) { |
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.
Considering the converter doesn't have the conversion value hardcoded, I wouldn't do it here. My suggestion would be to actually pass the converter as the constructor param, and then you have the 3 values.
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.
ok done
src/SupplySync.sol
Outdated
unchecked { | ||
if (mkrSupplyInSky > skyBalance) { | ||
sky.mint(address(this), mkrSupplyInSky - skyBalance); | ||
} else { |
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.
I think I'd prefer an elseif, so we avoid to burn 0 if sync is called multiple times. But it is really a very subjective thing, not really important gas wise.
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.
ok, changed to that and also added return values so it's easier to use it in a bot/cron-job.
No description provided.