You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mainNet logs show a lot of instances of ⚠️ Excess collateral remaining sent to reserve.. Since this check is immediately preceded by an attempt to send all the remaining collateral to the reserve, this will nearly always be incorrect.
To Reproduce
INFO 2025-02-19T00:24:20Z [resource.labels.containerName: log-app] Timed out
INFO 2025-02-19T00:24:20.424832702Z [resource.labels.containerName: log-app] 2025-02-19T00:24:19.584Z SwingSet: vat: v48: ----- VM.15 107779 LiqV after long wait { Minted: { brand: Object [Alleged: IST brand] {}, value: 0n }, Collateral: { brand: Object [Alleged: ATOM brand] {}, value: 1_005_272n } }
INFO 2025-02-19T00:24:20.424888152Z [resource.labels.containerName: log-app] 2025-02-19T00:24:19.594Z SwingSet: vat: v48: ----- VM.15 107780 PLAN { overage: { brand: Object [Alleged: IST brand] {}, value: 0n }, shortfallToReserve: { brand: Object [Alleged: IST brand] {}, value: 0n }, collateralForReserve: { brand: Object [Alleged: ATOM brand] {}, value: 108_927n }, actualCollateralSold: { brand: Object [Alleged: ATOM brand] {}, value: 108_927n }, collateralSold: { brand: Object [Alleged: ATOM brand] {}, value: 0n }, collatRemaining: { brand: Object [Alleged: ATOM brand] {}, value: 0n }, debtToBurn: { brand: Object [Alleged: IST brand] {}, value: 5_000_512n }, mintedForReserve: { brand: Object [Alleged: IST brand] {}, value: 0n }, mintedProceeds: { brand: Object [Alleged: IST brand] {}, value: 0n }, phantomDebt: { brand: Object [Alleged: IST brand] {}, value: 0n }, transfersToVault: [ [ 0, { Collateral: { brand: [Object], value: 896_345n } } ] ], vaultsToReinstate: [ 0 ], totalPenalty: { brand: Object [Alleged: ATOM brand] {}, value: 108_927n } }
INFO 2025-02-19T00:24:20.424896972Z [resource.labels.containerName: log-app] 2025-02-19T00:24:19.630Z SwingSet: vat: v48: ----- Vault.10 835 Object [Alleged: ATOM brand] {} updateUiState 147 { debtSnapshot: { debt: { brand: Object [Alleged: IST brand] {}, value: 5_000_500n }, interest: { denominator: { brand: Object [Alleged: IST brand] {}, value: 100_000_000_000_000_000_000n }, numerator: { brand: Object [Alleged: IST brand] {}, value: 101_818_633_791_913_807_934n } } }, locked: { brand: Object [Alleged: ATOM brand] {}, value: 896_345n }, vaultState: 'active' }
INFO 2025-02-19T00:24:20.424901692Z [resource.labels.containerName: log-app] 2025-02-19T00:24:19.644Z SwingSet: vat: v48: ----- Store.7 840 To Vault Key 0.1825109790225738
INFO 2025-02-19T00:24:20.424906532Z [resource.labels.containerName: log-app] 2025-02-19T00:24:19.673Z SwingSet: vat: v48: ----- VM.15 107781 Sending to reserve: { brand: Object [Alleged: ATOM brand] {}, value: 108_927n }
INFO 2025-02-19T00:24:20.424911782Z [resource.labels.containerName: log-app] 2025-02-19T00:24:19.673Z SwingSet: vat: v48: ⚠️ Excess collateral remaining sent to reserve. Expected {"brand":"[Alleged: ATOM brand]","value":"[0n]"}, sent {"brand":"[Alleged: ATOM brand]","value":"[108927n]"}
INFO 2025-02-19T00:24:24.425683065Z [resource.labels.containerName: log-app] 2025-02-19T00:24:24.335Z SwingSet: vat: v36: ----- ReserveKit.5 3113 received collateral { brand: Object [Alleged: ATOM brand] {}, value: 108_927n }
INFO 2025-02-19T00:24:25Z [resource.labels.containerName: log-app] executed block
INFO 2025-02-19T00:24:25.425917470Z [resource.labels.containerName: log-app] 2025-02-19T00:24:25.101Z block-manager: block 18430894 commit
INFO 2025-02-19T00:24:25.425928410Z [resource.labels.containerName: log-app] 2025-02-19T00:24:25.118Z block-manager: wrote SwingSet checkpoint [run=7151ms, chainSave=0ms, kernelSave=17ms]
DEFAULT 2025-02-19T00:24:26Z [resource.labels.containerName: log-app]
Expected behavior
There should only be a warning when something is wrong.
Expected fix
Either drop the console.error() conditional, or change the code to
const collateralInLiqSeat = liqSeat.getCurrentAllocation().Collateral;
if (!AmountMath.isEmpty(collateralInLiqSeat)) {
facets.helper.sendToReserve(collateralInLiqSeat, liqSeat);
}
// if it didn't match what was expected, report
if (!AmountMath.isEqual(liqSeat.getCurrentAllocation().Collateral, plan.collatRemaining)) {
console.error(
`⚠️ Excess collateral remaining sent to reserve. Expected ${q(
plan.collatRemaining,
)}, sent ${q(collateralInLiqSeat)}`,
);
}
The text was updated successfully, but these errors were encountered:
Describe the bug
The mainNet logs show a lot of instances of
⚠️ Excess collateral remaining sent to reserve.
. Since this check is immediately preceded by an attempt to send all the remaining collateral to the reserve, this will nearly always be incorrect.To Reproduce
Expected behavior
There should only be a warning when something is wrong.
Expected fix
Either drop the
console.error()
conditional, or change the code toThe text was updated successfully, but these errors were encountered: