Skip to content

Commit

Permalink
πŸ› auditor: fix due maturity penalties
Browse files Browse the repository at this point in the history
  • Loading branch information
itofarina committed Nov 21, 2024
1 parent 1c2ccdc commit 628c859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auditor/accountLiquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function accountLiquidity(
for (const { position, maturity } of fixedBorrowPositions) {
const positionAssets = position.principal + position.fee;
totalDebt += positionAssets;
if (timestamp > maturity) totalDebt += mulWad(positionAssets, BigInt(timestamp) - maturity * penaltyRate);
if (timestamp > maturity) totalDebt += mulWad(positionAssets, (BigInt(timestamp) - maturity) * penaltyRate);
}
adjDebt += divWadUp(mulDivUp(totalDebt, usdPrice, baseUnit), adjustFactor);
}
Expand Down

0 comments on commit 628c859

Please sign in to comment.