-
Notifications
You must be signed in to change notification settings - Fork 206
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
Expose key Build Boost economic data via subscription #4653
Comments
The current code (52f60eb) has an const assetNotifer: Notifier<{
compoundedInterest: Ratio;
interestRate: Ratio;
latestInterestUpdate: bigint;
totalDebt: Amount<"nat">;
}> There's no publicFacet method to get that assetNotifier; the only way to get it is as a result of opening an account. That seems like a bug. The Per Account notifier is updated as follows: /** @type {VaultUIState} */
const result = harden({
// TODO move manager state to a separate notifer https://github.com/Agoric/agoric-sdk/issues/4540
interestRate: manager.getInterestRate(),
liquidationRatio: manager.getMintingRatio(),
debtSnapshot: { debt, interest },
locked: getCollateralAmount(),
// newPhase param is so that makeTransferInvitation can finish without setting the vault's phase
// TODO refactor https://github.com/Agoric/agoric-sdk/issues/4415
vaultState: newActive ? 'active' : 'closed',
}); The |
It's not clear how useful Total collateral is; @btulloh asks for "a detailed view into the state changes, rather than summary data". |
This data can be used in Blockchain Explorers and via sites like The Graph for the community to get key information about the state of the RUN Protocol components.
From our meeting on Feb 22, here is the data we want to expose from getRUN:
assetNotifier
)totalDebt
)locked
)debtSnapshot
)interestRate
(but see Refactor vault notifications to not cascade interest charge events #4540)assetNotifier
The text was updated successfully, but these errors were encountered: