diff --git a/scripts/harb-evaluator/helpers/floor.ts b/scripts/harb-evaluator/helpers/floor.ts index 86836d6..e2e1c80 100644 --- a/scripts/harb-evaluator/helpers/floor.ts +++ b/scripts/harb-evaluator/helpers/floor.ts @@ -97,7 +97,9 @@ export async function getFloorState( } const lmTotalEth = lmEthBalance + lmWethBalance; - const ethPerToken = supply === 0n ? 0n : lmTotalEth / supply; + // Scale by 1e18 (WAD) before dividing so the result is in wei-per-token + // rather than always 0n. Example: 100 ETH / 1M KRK = 1e20 * 1e18 / 1e24 = 1e14 wei/token. + const ethPerToken = supply === 0n ? 0n : (lmTotalEth * 10n ** 18n) / supply; return { ethPerToken, lmEthBalance, lmWethBalance, outstandingSupply: supply }; }