Skip to content

[Certora] drop callback/token summaries#665

Closed
prd-carapulse[bot] wants to merge 10 commits into
mainfrom
fix/stayhealthy-weak-callbacks-20260406
Closed

[Certora] drop callback/token summaries#665
prd-carapulse[bot] wants to merge 10 commits into
mainfrom
fix/stayhealthy-weak-callbacks-20260406

Conversation

@prd-carapulse
Copy link
Copy Markdown
Contributor

@prd-carapulse prd-carapulse Bot commented Apr 6, 2026

Summary

  • remove callback and token-transfer summaries from Healthiness.spec
  • restore the dedicated take seller vs other-borrower split so buyer cases are not over-claimed by the generic rule
  • drop the now-unused Havoc helper from Healthiness.conf

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59eb0fed1e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread certora/specs/Healthiness.spec Outdated
Adjust scope per feedback: callback-time healthiness no longer matters.
@prd-carapulse prd-carapulse Bot changed the title certora: weaken stayHealthy for take certora: remove callback healthiness assertions Apr 6, 2026
Per feedback, stop caring about healthiness during callbacks and simplify the proof accordingly.
@prd-carapulse prd-carapulse Bot changed the title certora: remove callback healthiness assertions certora: simplify Healthiness proof Apr 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 840dd2409e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread certora/specs/Healthiness.spec
Comment thread certora/specs/Healthiness.spec
Restore callback/token havoc modeling while keeping take inside the generic stayHealthy rule.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c931cac7ad

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread certora/specs/Healthiness.spec Outdated
Per feedback, remove callback/token summaries entirely from Healthiness.
@prd-carapulse prd-carapulse Bot changed the title certora: simplify Healthiness proof certora: drop callback/token summaries Apr 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 035ad4133d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

"files": [
"certora/helpers/MidnightWrapper.sol",
"certora/helpers/Havoc.sol"
"certora/helpers/MidnightWrapper.sol"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore callback/token havoc modeling in Healthiness proof

Fresh evidence in this commit: Healthiness.conf now removes certora/helpers/Havoc.sol, and the Healthiness.spec methods block no longer defines _.on*/_.transfer* summaries, so callback and token-transfer side effects are no longer modeled as reentrant behavior. In src/Midnight.sol, untrusted external hooks are invoked in take, repay, liquidate, and flashLoan; if those effects are excluded from the model, this proof can pass while missing borrower-health regressions that are only reachable through callback/token reentry.

Useful? React with 👍 / 👎.

Comment thread certora/specs/Healthiness.spec
@MathisGD MathisGD changed the title certora: drop callback/token summaries [Certora] drop callback/token summaries Apr 6, 2026
Fix failing Healthiness proof by excluding tracked take buyers from the generic stayHealthy rule.
@prd-carapulse prd-carapulse Bot changed the title [Certora] drop callback/token summaries certora: drop callback/token summaries Apr 6, 2026
@MathisGD MathisGD changed the title certora: drop callback/token summaries [Certora] drop callback/token summaries Apr 6, 2026
Base automatically changed from fix/liquidate-deferred-health-check-20260404-173318 to main April 6, 2026 14:40
prd-carapulse Bot added 3 commits April 6, 2026 14:46
Fix PR #665 by reverting the take-specific Healthiness split so take stays under the generic outer-call healthiness proof.

Stacked on #645.
Assume no callback/token reentrancy in Healthiness so the outer-call property does not fail on take callback side effects.

Stacked on #645.
Keep the no-reentrancy summaries, but split take back out so Healthiness only tracks seller and unrelated borrowers.

Stacked on #645.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95033d95bf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

require globalObligationCollateralLength <= 3, "too many collateralParams for the spec to handle";

Midnight.Obligation globalObligation = getGlobalObligation();
require (takeSeller(taker, offer) != globalBorrower && takeBuyer(taker, offer) != globalBorrower) || !equalsGlobalObligation(offer.obligation), "borrower is not a take participant on the tracked obligation";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cover tracked take buyers in healthiness rules

stayHealthyTakeOtherBorrower explicitly excludes cases where takeBuyer(taker, offer) == globalBorrower, and take is also excluded from the generic stayHealthy rule, so there is no remaining rule that checks healthiness when the tracked borrower is the buyer on the tracked obligation. This creates a concrete verification coverage gap for buyer-side take paths, allowing buyer-accounting regressions to evade this spec.

Useful? React with 👍 / 👎.

Restrict the same-seller Healthiness rule to fresh take entries where the tracked seller is not already transiently liquidation-locked.

Stacked on #645.
@MathisGD
Copy link
Copy Markdown
Contributor

see #679

@MathisGD MathisGD closed this Apr 16, 2026
@MathisGD MathisGD deleted the fix/stayhealthy-weak-callbacks-20260406 branch April 16, 2026 08:14
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