Skip to content

Commit

Permalink
👔 auditor: decrease default target health factor
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed Oct 21, 2024
1 parent 4b16992 commit ef5e4fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/auditor/borrowLimit.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import accountLiquidity, { normalizeDebt, type AccountLiquidityData } from "./accountLiquidity.js";
import WAD from "../fixed-point-math/WAD.js";
import divWad from "../fixed-point-math/divWad.js";

export default function borrowLimit(
data: AccountLiquidityData,
market: string,
targetHealthFactor = BigInt(1.25 * 10 ** 18),
targetHealthFactor = (WAD * 105n) / 100n,
timestamp = Math.floor(Date.now() / 1000),
): bigint {
const { adjCollateral, adjDebt } = accountLiquidity(data, timestamp);
Expand Down
3 changes: 2 additions & 1 deletion src/auditor/withdrawLimit.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { AccountLiquidityData } from "./accountLiquidity.js";
import accountLiquidity, { adjustCollateral, normalizeCollateral } from "./accountLiquidity.js";
import WAD from "../fixed-point-math/WAD.js";
import mulWad from "../fixed-point-math/mulWad.js";

export default function withdrawLimit(
data: AccountLiquidityData,
market: string,
targetHealthFactor = BigInt(1.25 * 10 ** 18),
targetHealthFactor = (WAD * 105n) / 100n,
timestamp = Math.floor(Date.now() / 1000),
): bigint {
const { adjCollateral, adjDebt } = accountLiquidity(data, timestamp);
Expand Down

0 comments on commit ef5e4fb

Please sign in to comment.