-
Notifications
You must be signed in to change notification settings - Fork 62
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
SIP-420: Treasury market #2354
base: main
Are you sure you want to change the base?
SIP-420: Treasury market #2354
Conversation
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.
just two nitpicks
|
||
// | ||
uint256 newlySaddledValue = accountCollateralValue - | ||
(saddledCollateral[accountId] * accountCollateralValue) / | ||
accountCollateral; |
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.
nit: should there be a comment here? I think it would be worth adding anyway
if (power > 100) { | ||
revert ParameterError.InvalidParameter("debtDecayPower", "too high"); | ||
} |
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.
Nit
if (power > 100) { | |
revert ParameterError.InvalidParameter("debtDecayPower", "too high"); | |
} | |
if (power > 100) { | |
revert ParameterError.InvalidParameter("power", "too high"); | |
} |
if the loan is repaid early, an additional penalty on the amount of the loan that had been paid so far should be charged.
…hetix-v3 into treasury-market
this implements sip-420.
notes:
migrateDelegation
function to the core system. This is becuase it needs to be possible for a user to actually migrate their account from the current v3 SC pool without repaying their debt. (on optimism the legacymrket can be directly conneted)some deployment invariants exist WRT the creation of the pool (ex. limit to only one collateral type, no minting through v3, etc.). For more information see the corresponding deployments PR Synthetixio/synthetix-deployments#619