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

Expose per-Vault economic data via notification and RPC #5352

Closed
Tartuffo opened this issue May 12, 2022 · 2 comments
Closed

Expose per-Vault economic data via notification and RPC #5352

Tartuffo opened this issue May 12, 2022 · 2 comments
Assignees
Labels
Inter-protocol Overarching Inter Protocol
Milestone

Comments

@Tartuffo
Copy link
Contributor

No description provided.

@Tartuffo Tartuffo added the Inter-protocol Overarching Inter Protocol label May 12, 2022
@Tartuffo
Copy link
Contributor Author

@dckc Please confirm that @dtribble 's assertion that per-Vault Collateral amount and interest amount is available via notification, and close this ticket if it is confirmed.

@dckc
Copy link
Member

dckc commented May 13, 2022

Yes, it does, as shown in these unit tests:

let notification = await E(vaultNotifier).getUpdateSince();
trace(t, 'got notificaation', notification);
t.is(notification.value.vaultState, Phase.ACTIVE);
t.deepEqual((await notification.value).debtSnapshot, {
debt: AmountMath.add(loanAmount, fee),
interest: makeRatio(100n, runBrand),
});

let aliceUpdate = await E(aliceNotifier).getUpdateSince();
t.deepEqual(aliceUpdate.value.debtSnapshot.debt, runDebt);
t.deepEqual(aliceUpdate.value.locked, collateralAmount);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inter-protocol Overarching Inter Protocol
Projects
None yet
Development

No branches or pull requests

3 participants