make collateral bias an env variable

This commit is contained in:
Maximilian Schneider 2021-03-16 12:39:40 +01:00
parent 8abdabf0a0
commit 75b64e02cc
1 changed files with 5 additions and 3 deletions

View File

@ -166,10 +166,12 @@ async function runLiquidator() {
break break
} }
const collRatio = (assetsVal / liabsVal) let collRatio = (assetsVal / liabsVal)
// FIXME: added bias to collRatio allows other liquidators to step in for testing // FIXME: added bias to collRatio to allow other liquidators to step in for testing
collRatio += 0.01; if (process.env.COLL_BIAS) {
collRatio += parseFloat(process.env.COLL_BIAS);
}
if (collRatio >= mangoGroup.maintCollRatio) { if (collRatio >= mangoGroup.maintCollRatio) {
break break