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

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

Closed
otoole-brendan opened this issue Sep 5, 2024 · 1 comment · Fixed by #10074
Assignees
Labels
bug Something isn't working

Comments

@otoole-brendan
Copy link
Contributor

Describe the bug

Mint limits were previously set at below for each of these collateral types prior to the https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-16av-rc4 core eval upgrade that took place yesterday:

ATOM = 4000
stATOM = 1,134,000
stOSMO = 543,000
stkATOM = 32,000
stTIA = 111,000

Following the upgrade - I noticed that there was '0 IST available for all collateral types' in UI. Upon closer inspection I discovered that the mint limits were changed to what looked like the original default amounts set for each when a new collateral type is added:

ATOM = 500
stATOM = 1000
stOSMO = 1000
stkATOM = 1000
stTIA = 1000

To Reproduce

Steps to reproduce the behavior:

  1. Go to info.inter.trade -> eyeball mint limit per collateral type.
    Also
  2. Go to https://econ-gov.inter.trade/ Vaults tab and for each manager, eyeball current mint limit
    Also
  3. Got to https://app.inter.trade/#/vaults - see 'IST available' = for all collateral types

Expected behavior

The mint limits that were previously set by the Economic committee should have persisted and should not have been changed reset by this core eval upgrade.

Platform Environment

  • what OS are you using? what version of Node.js?
  • is there anything special/unusual about your platform?
  • what version of the Agoric-SDK are you using? (run git describe --tags --always)

Additional context

Add any other context about the problem here.

Screenshots

image image
@Chris-Hibbert
Copy link
Contributor

We logged the parameter values as we were copying them.

log lines (long)
Date,Pod Name,Service,Message
"2024-09-04T19:48:19.351Z","""follower-0""","""agd""","{""args"":[""----- upgrade Vaults proposal.2 "",""7"",""StkATOM"",""params at"",""1n"",""are"",""{ DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } }, InterestRate: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, LiquidationMargin: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 150n } } }, LiquidationPadding: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 25n } } }, LiquidationPenalty: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, MintFee: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 50n } } } }""],""deliveryNum"":7676,""level"":""info"",""crankNum"":180221294,""vatID"":""v1"",""source"":""vat"",""state"":""delivery"",""time"":1725479298.335571,""monotime"":575254.290702131,""type"":""console""}"
"2024-09-04T19:48:19.350Z","""follower-0""","""agd""","{""args"":[""----- upgrade Vaults proposal.2 "",""6"",""StTIA"",""params at"",""1n"",""are"",""{ DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } }, InterestRate: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, LiquidationMargin: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 150n } } }, LiquidationPadding: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 25n } } }, LiquidationPenalty: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, MintFee: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 50n } } } }""],""deliveryNum"":7673,""level"":""info"",""crankNum"":180221280,""vatID"":""v1"",""source"":""vat"",""state"":""delivery"",""time"":1725479298.286228,""monotime"":575254.2413587051,""type"":""console""}"
"2024-09-04T19:48:19.350Z","""follower-0""","""agd""","{""args"":[""----- upgrade Vaults proposal.2 "",""5"",""StOSMO"",""params at"",""1n"",""are"",""{ DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } }, InterestRate: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, LiquidationMargin: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 150n } } }, LiquidationPadding: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 25n } } }, LiquidationPenalty: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, MintFee: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 50n } } } }""],""deliveryNum"":7670,""level"":""info"",""crankNum"":180221266,""vatID"":""v1"",""source"":""vat"",""state"":""delivery"",""time"":1725479298.248217,""monotime"":575254.203350508,""type"":""console""}"
"2024-09-04T19:48:19.349Z","""follower-0""","""agd""","{""args"":[""----- upgrade Vaults proposal.2 "",""4"",""STATOM"",""params at"",""1n"",""are"",""{ DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } }, InterestRate: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, LiquidationMargin: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 150n } } }, LiquidationPadding: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 25n } } }, LiquidationPenalty: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1n } } }, MintFee: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 50n } } } }""],""deliveryNum"":7667,""level"":""info"",""crankNum"":180221252,""vatID"":""v1"",""source"":""vat"",""state"":""delivery"",""time"":1725479298.02338,""monotime"":575253.978511137,""type"":""console""}"
"2024-09-04T19:48:19.347Z","""follower-0""","""agd""","{""args"":[""----- upgrade Vaults proposal.2 "",""3"",""ATOM"",""params at"",""2n"",""are"",""{ DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 500_000_000n } }, InterestRate: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 250n } } }, LiquidationMargin: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 23_000n } } }, LiquidationPadding: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 2_000n } } }, LiquidationPenalty: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 1_000n } } }, MintFee: { type: 'ratio', value: { denominator: { brand: Object [Alleged: IST brand] {}, value: 10_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 0n } } } }""],""deliveryNum"":7664,""level"":""info"",""crankNum"":180221238,""vatID"":""v1"",""source"":""vat"",""state"":""delivery"",""time"":1725479297.985002,""monotime"":575253.9401333,""type"":""console""}"

Summary

To summarize with the interesting part of each log line:

StkATOM params at 1n are { DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } },
StTIA params at 1n are { DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } }, 
StOSMO params at 1n are { DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } }, 
STATOM params at 1n are { DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 1_000_000_000n } }, 
ATOM params at 2n are { DebtLimit: { type: 'amount', value: { brand: Object [Alleged: IST brand] {}, value: 500_000_000n } }, 

Notice that Atom says "2n", while the others are at 1. If you look at the code, that's the number of times through the
loop before getting a set of values with DebtLimit not equal to zero. It looks like the mistake was giving a parameter
to getUpdateSince(). Without a parameter, it would give the most recent value. Instead, this gets the initial value
and then the second value. ATOM apparently had a zero debt limit initially, while we must have changed the defaults to
1000 before creating later vault managers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants