-
Notifications
You must be signed in to change notification settings - Fork 229
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
getRUN contract, bootstrap integration (WIP) #4092
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.
a few thoughts on the use of governance. I'll wait till you're ready before I do a full review
packages/treasury/src/runLoC.js
Outdated
makePublicFacet, | ||
makeCreatorFacet, | ||
getParamValue, | ||
} = handleParamGovernance(zcf, harden(initialValue)); |
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.
This is taking the creator's word for what the governed parameters should look like.
The AMM declares its expectations in params.js, in a way that is used in the contract, and should have been used in the tests when creating parameters for terms.
stablecoinMachine asserts that the governed params from terms match the local declaration to ensure that all and only the required params are present. If there are params that aren't used or verified at startup, this seems crucial to me.
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 understand how the sameStructure
in stablecoinMachine works; it seems to be comparing the list ['ChargingPeriod', ...]
with something that looks like [{name, type, value}, ...]
.
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.
They should both be { "vaultParams": ["ChargingPeriod", "RecordingPeriod", "InitialMargin", "LiquidationMargin", "InterestRate", "LoanFee"] }
, which comes directly from params.js.
When setting up the treasury in test-stablecoin, treasuryTerms contains governedParams: governedParameterTerms
, where the latter is imported from params.
packages/treasury/src/runLoC.js
Outdated
const getRatio = name => { | ||
const x = getParamValue(name); | ||
assertIsRatio(x); | ||
return /** @type { Ratio } */ (x); | ||
}; |
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.
Seems generally useful. I'm fine with generalizing and adding these into the governance pkg.
Is it already time to refactor paramManager
so it splits out all the different types? Or should we add helper tools like this for a while longer?
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.
Now would be a good time for me, while it's swapped in. And before we dig the hole deeper by using this API in more contracts.
b0fd103
to
c70ceb2
Compare
da926b7
to
fa54794
Compare
4957dd2
to
a66d2ae
Compare
63d1ce1
to
7b2b29f
Compare
This reverts commit 42b96fa.
- feat: export bundled attestion contract - style: types tweak in tools - docs: fix optional arg decl in registerPriceAuthority - chore: prune attestation install-on-chain
... to facilitate unit testing
- spell binaryVoteCounter consistently
- move board out of EconomyBootstrapPowers (postpone uiConfig)
- test-vaultFactory.js: subsume makePriceAuthority(), setupVaultFactory(), bundleInstalls() using produce / consume space - manage bundles, installations as records with Collect.allValues - provide param types for setupServices() etc. - add config.loanParams to startVaultFactory - split consume.economyBundles into consume.ammBundle, consume.vaultBundles - factor out configureVaultFactoryUI so that board is not needed for unit testing - get centralIssuer from agoricNames so it doesn't have to be created by zoe. - spell VaultFactory, liquidate consistently - use export const x = () => { ... }; harden(X)
- prune bootstrapRunLoC.js
- shareEconomyBundles - EconomyBootstrapPowers type tweaks
@dckc @Chris-Hibbert When I first started working on our ZH board, I marked this as being for the Mainnet 1 release because it was already in the Review/QA pipeline. This PR is from Nov. Should this be closed? |
Closed? Why? |
refs #3788
cc @Chris-Hibbert
Description
related issues:
sortedVaultKits.remove
. every vault is charged interested at every epoch - is that sufficiently scalable?@ts-ignore
governance wrapper obscures publicFace typeSecurity Considerations
Documentation Considerations
Testing Considerations