Skip to content
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

feat: look up last value of vault parameters when upgrading #10035

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Chris-Hibbert
Copy link
Contributor

closes: #10031

Description

Security Considerations

The values of the VaultManager parameters was lost on upgrade. They're recoverable, but I'll probably start from this code when upgrading other contracts.

Scaling Considerations

N/A

Documentation Considerations

N/A

Testing Considerations

Verifying my hypothesis in a3p tests.

Upgrade Considerations

yes

@Chris-Hibbert Chris-Hibbert self-assigned this Sep 6, 2024
@Chris-Hibbert Chris-Hibbert added the force:integration Force integration tests to run on PR label Sep 6, 2024
Copy link

cloudflare-workers-and-pages bot commented Sep 9, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: c0a3749
Status: ✅  Deploy successful!
Preview URL: https://a1ee594b.agoric-sdk.pages.dev
Branch Preview URL: https://10031-vaultparameters.agoric-sdk.pages.dev

View logs

@Chris-Hibbert
Copy link
Contributor Author

The value retrieved for the vaultDirector's parameters is reasonable when I get a subscription, wrap it in a notifier, and call getUpdateSnce().

When I do the same with a subscription from a vaultManager for a particular brand, I get bizarre results.
for ATOM, I start with getUpdateSince(), and get DebtLimit: 0n InterestRate: 1%, LiquidationMargin: 1.5, LiquidationPadding: 25%, LiquidationPenalty: 1%, MintFee: .5%
I respond with getUpdateSince(1n), and get DebtLimit: 123_000_000_000_000n
After that, I call getUpdateSince() again, and get DebtLimit: 123_000_000_000_000n

With stATOM, I get DebtLimit: 1_000_000_000n on the first request.

The thing I don't understand is why getUpdateSince() would change its answer when there hasn't been any update to the stream of values.

These tests are in a3p.

@Chris-Hibbert Chris-Hibbert changed the title feat: look up last value of vault parametes when upgrading feat: look up last value of vault parameters when upgrading Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mint Limits for all Vaults collateral assets changed/reset following auction+vaults core eval deployment
1 participant