Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 206 forks source link

Add helper to verify liquidation parameter upgrades #5216

Open dtribble opened 2 years ago

dtribble commented 2 years ago

Description

From review of #5211:

In order for voters to be able to assure themselves that the proposed liquidation terms will perform as advertised, I think it's helpful for the subject contract (liquidateIncrementally.js) to export a helper function that validates that it would be able to parse them, and be unlikely to hiccup when restarting. Simple things like ensuring the terms parse, and the ratios have plausible known brands. Otherwise voters have to judge based on human eyes reading the textual form of the json.

Security Considerations

Fast-fail of upgrades, esp. before they are committed, is a good thing.

Test Plan

Chris-Hibbert commented 2 years ago

Oops. #5273 provides tools for improving liquidation parameter checking, but doesn't solve the problem.