-
Notifications
You must be signed in to change notification settings - Fork 220
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
Enable Governance to add Collateral type to Treasury #3924
Comments
Because
I think the following order will reduce cross-dependencies most quickly:
The plan for governance control of adding new collateral types is
I think this approach leaves paramManager untouched. It may add functionality to contractHelper. |
@Chris-Hibbert for the demo (#3913) the thing I need most urgently is a test case - or at least a somewhat detailed sketch of it. Would you please draft something? p.s. we talked thru enough details for now. |
This is a bootstrap value that Governance can change, consumed by code in the top of the Vault Factory. |
I don't see why it's any more than just calling agoric-sdk/packages/vats/src/demoIssuers.js Lines 578 to 582 in 90e8986
One thought I had was: we have So... how about some "call method X on the creatorFacet with args (a1, a2, ...)" question structure? |
I think that's the right answer. When I created this issue, there was more work involved, because creating a new vaultManager included adding and endowing a new AMM pool. It's much simpler since that's been refactored out. |
wrong button. sorry. |
The process of adding a collateral type to the VaultFactory under governance is a matter of holding a cosmos-level vote, which invokes a script that runs in the bootstrap context. As I understand it, this can be done using the The script would look approximately like
Before running it, someone should ensure that an AMM pool exists for the collateral type, and the issuer for the type is registered on the board under I have not tested the script. |
Note that In cases where this becomes unmanageable, you can |
drafted with @michaelfig : gov-ibc-to-vault.js
see also #5169 stuff in gov-inviteCommittee.js
with @michaelfig , @Chris-Hibbert : to get past "no collateral types":
|
Waiting for Oracles?We (@michaelfig @Chris-Hibbert and I) got very close yesterday. The
but when we try to confirm that it's available as a collateral, the promise doesn't resolve:
We suspect the VaultFactory is trying to get a price from the Oracles, and that step is waiting for colleagues in Europe. |
IbcATOM did get added to VaultFactoryWe can
|
|
making progress on raising the debt limit via a crude voting gui... |
gak! vote failed: No quorum again, even though both @rowgraus and I voted. I'm inclined to try the configuration from #5362 to debug this. Struggling to diagnoseThe vote counter stats show 0 votes no matter what I do. repl session: command[231]
E(econ.pub).getOpenQuestions()
history[231]
[[Object Alleged: QuestionHandle]{}]
command[232]
E(econ.pub).getQuestion(h[231][0])
history[232]
[Object Alleged: question details]{}
command[233]
E(h[232]).sdf()
history[233]
Promise.reject("TypeError: target has no method \"sdf\", has [\"getDetails\",\"getVoteCounter\"]")
command[234]
E(h[232]).getVoteCounter()
history[234]
[Object Alleged: InstanceHandle]{}
command[235]
E(zoe).getInstallation(h[234])
history[235]
Promise.reject("Error: A Zoe invitation is required, not (an object)")
command[236]
E(h[232]).getDetails()
history[236]
{"closingRule":{"deadline":1652381659n,"timer":[Object Alleged: timerService]{}},"counterInstance":[Object Alleged: InstanceHandle]{},"electionType":"param_change","issue":{"contract":[Object Alleged: InstanceHandle]{},"spec":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10100000000000n}},"paramPath":{"key":{"collateralBrand":[Object Alleged: IbcATOM brand]{}}}}},"maxChoices":1,"method":"unranked","positions":[{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10100000000000n}}},{"noChange":["DebtLimit"]}],"questionHandle":[Object Alleged: QuestionHandle]{},"quorumRule":"majority","tieOutcome":{"noChange":["DebtLimit"]}}
command[237]
E(zoe).getPublicFacet(h[234])
history[237]
[Object Alleged: publicFacet]{}
command[238]
E(h[237]).lkdsjf()
history[238]
Promise.reject("TypeError: target has no method \"lkdsjf\", has [\"getDetails\",\"getInstance\",\"getOutcome\",\"getQuestion\",\"getStats\",\"isOpen\"]")
command[239]
E(h[237]).getStats()
history[239]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10100000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0}
command[240]
E(h[237]).getStats()
history[240]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10100000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0}
command[241]
E(h[237]).getStats()
history[241]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10100000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0}
command[242]
E(h[237]).getStats()
history[242]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10100000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0}
command[243]
E(home.myAddressNameAdmin).getMyAddress9)
history[243]
exception: [SyntaxError: missing ;]
command[244]
E(home.myAddressNameAdmin).getMyAddress()
history[244]
"agoric1j5sm4kr2mdae6sfey6qjm9vaamddmp0yuxs6kz"
command[245]
E(h[237]).getStats()
history[245]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10100000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0}
command[246]
voterFacet
history[246]
[Object Alleged: voter0]{}
command[247]
E(voterFacet).lsdkjfldskj()
history[247]
Promise.reject("TypeError: target has no method \"lsdkjfldskj\", has [\"castBallotFor\"]")
command[248]
E(econ.pub).getOpenQuestions()
history[248]
[[Object Alleged: QuestionHandle]{}]
command[249]
E(econ.pub).getQuestion(h[248][0])
history[249]
[Object Alleged: question details]{}
command[250]
E(h[249]).getVoteCounter()
history[250]
[Object Alleged: InstanceHandle]{}
command[251]
E(zoe).getPublicFacet(h[250])
history[251]
[Object Alleged: publicFacet]{}
command[252]
E(h[251]).getStats()
history[252]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10200000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0}
command[253]
E(h[251]).getStats()
history[253]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10200000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0}
command[254]
E(h[251]).getStats()
history[254]
{"results":[{"position":{"changes":{"DebtLimit":{"brand":[Object Alleged: RUN brand]{},"value":10200000000000n}}},"total":0n},{"position":{"noChange":["DebtLimit"]},"total":0n}],"spoiled":0n,"votes":0} |
Update - this works in unit testing, but not in devnet / instagoric. |
We haven't tried it in instagoric; that's up next / soon. |
@arirubinstein that WIP deploy script for raising the debt limit that I mentioned... I cleaned it up a bit and tested it: |
Let's reduce the scope of this to be independent of any particular network deployment. For instagoric networks with a single-member committee, we have |
What is the Problem Being Solved?
Adding a Collateral type to the Treasury should be under the control of governance.
Description of the Design
I think this requires a special purpose function, and some general purpose controls to manage and make visible the control over when the function gets invoked.
The special purpose function includes creating a vaultManager, endowing/finding an appropriate AMM, and connecting the two up as well as setting up the parameters for the new pool & vaultMgr.
Security Considerations
This involves governance, so the standard legibility targets apply.
Test Plan
Probably requires SwingSet tests including multiple voters, and a demonstration of someone validating the chain of responsibility.
as part of RUN Protocol preview:
The text was updated successfully, but these errors were encountered: