-
Notifications
You must be signed in to change notification settings - Fork 212
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
liquidation penalty proceeds to reserve #5387
Conversation
await userSeatPromise; | ||
const deposits = await deposited; |
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.
await userSeatPromise; | |
const deposits = await deposited; | |
const [deposits] = await Promise.all([userSeatPromise, deposited]); |
@@ -45,6 +45,7 @@ const contractRoots = { | |||
liquidate: './src/vaultFactory/liquidateIncrementally.js', | |||
VaultFactory: './src/vaultFactory/vaultFactory.js', | |||
amm: './src/vpool-xyk-amm/multipoolMarketMaker.js', | |||
reserve: './src/reserve/assetReserve.js', |
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.
Please add a test that notices that the penalties have been drained to the reserve.
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.
Did you see 513f944? (it was 16min before the review posted but I'm guessing the browser window hadn't updated)
@@ -102,6 +102,10 @@ const start = async (zcf, privateArgs) => { | |||
|
|||
/** @type {ZCFMint} */ | |||
const runMint = await zcf.registerFeeMint('RUN', feeMintAccess); | |||
const centralBrand = runMint.getIssuerRecord().brand; | |||
// FIXME second term of tuple must be the liquidity brand | |||
brandForKeyword.init('Central', [centralBrand, centralBrand]); |
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 don't think it would be constructive to add it this way. The liquidity keyword can't be replaced once this runs. Should it call addIssuer
in the test?
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.
Agree there's got to be a better way. addIssuer
fails however. I'll wait to see what options might work after #5377
2027a92
to
222b748
Compare
222b748
to
b431916
Compare
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.
LGTM
|
||
const makeLiquidityKeyword = keyword => `${keyword}Liquidity`; | ||
|
||
const RunKW = 'RUN'; |
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.
Interesting... I have put my toe in the water with constants for keywords... I'm not entirely happy with the results. let's see how it goes here...
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.
Did you consider something like StableKW
where only the value would change when we go to IST?
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 like that idea and it didn't occur to me. I wouldn't want to do it in just this PR but I'll think about it for #4800
IST seems so central to the package that my intuition is abstracting it would just add cognitive load and provide no benefit. I see it could be beneficial in making the transition easier, but that's a one-shot change that shouldn't burden regular development.
await waitForPromisesToSettle(); | ||
|
||
const { reserveCreatorFacet } = t.context; | ||
const reserveAllocations = await E(reserveCreatorFacet).getAllocations(); |
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.
getAllocations
is on the creator facet? odd. I wonder why that is.
closes: #5367
Description
Upon completion of liquidation, push penalty proceeds to the reserve.
Security Considerations
Reserve can now accept RUN anytime from anywhere.
Documentation Considerations
--
Testing Considerations
New test