Skip to content

fix(certora): cheapen CreatedMarkets max LIF invariant#1002

Merged
MathisGD merged 2 commits into
modular-liffrom
hermes/fix-createdmarkets-max-lif-992
Jun 22, 2026
Merged

fix(certora): cheapen CreatedMarkets max LIF invariant#1002
MathisGD merged 2 commits into
modular-liffrom
hermes/fix-createdmarkets-max-lif-992

Conversation

@prd-carapulse

@prd-carapulse prd-carapulse Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the nonlinear to_mathint(liquidationCursor) * (WAD - lltv) CreatedMarkets predicate with an inline lowest-LLTV cursor guard plus the enabled-cursor bound invariant.
  • Adds a local CreatedMarkets invariant proving enabled liquidation cursors are bounded by WAD, so the max-LIF invariant can use that bound cheaply.
  • Keeps the parent PR's protocol behavior unchanged; this is Certora-spec-only.

Request Context

  • Initiator: Mathis / Slack: <@U02NB58F6R3> / GitHub: @MathisGD
  • Initial Slack thread: C0B520ZTPJM / thread_ts 1782064536.363429
  • Additional context: Parent PR modular lif #992 failing verify (CreatedMarkets) on createdMarketsHaveMaxLifAtMostTwoWad timeout in take and liquidate.
  • Rationale: Fix parent PR CI without weakening the protocol-side max-LIF check.

Test Plan

  • certoraCVLFormatter -w certora/specs/CreatedMarkets.spec
  • certoraRun certora/confs/CreatedMarkets.conf --compilation_steps_only
  • forge build --force
  • git diff --check

Stacked on: #992

Requested by: <@U02NB58F6R3>

Avoid nonlinear mathint multiplication in the CreatedMarkets max LIF invariant by expanding the allowed LLTV tiers into simple constant comparisons.
Keep the CreatedMarkets timeout fix, but remove the added LLTV_* helper definitions and express the max-LIF guard inline.
@MathisGD MathisGD merged commit c417b28 into modular-lif Jun 22, 2026
54 checks passed
@MathisGD MathisGD deleted the hermes/fix-createdmarkets-max-lif-992 branch June 22, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant