Skip to content

[Certora] ContinuousFee Protections#633

Merged
MathisGD merged 31 commits into
mainfrom
certora/pendingFee
Apr 30, 2026
Merged

[Certora] ContinuousFee Protections#633
MathisGD merged 31 commits into
mainfrom
certora/pendingFee

Conversation

@bhargavbh
Copy link
Copy Markdown
Contributor

No description provided.

@bhargavbh bhargavbh self-assigned this Apr 2, 2026
@bhargavbh
Copy link
Copy Markdown
Contributor Author

@codex review

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: ba11b43ed5

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
@bhargavbh bhargavbh marked this pull request as ready for review April 7, 2026 06:49
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: 5158e10607

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
@bhargavbh bhargavbh mentioned this pull request Apr 7, 2026
70 tasks
Copy link
Copy Markdown
Collaborator

@jhoenicke jhoenicke left a comment

Choose a reason for hiding this comment

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

The "NotOvercharged" checks are only for the maker. Do we have some rules for the take how the fee should be for them?

I marked a few small issues I noticed.

Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
…; assert updatePositionView are equal before and after take
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: b93e58b8d4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/specs/ContinuousFee.spec
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: 00e6cea538

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/specs/ContinuousFee.spec
Comment thread certora/specs/ContinuousFeeProtection.spec Outdated
@MathisGD MathisGD requested a review from QGarchery April 13, 2026 07:49
mathint creditDelta = to_mathint(creditOf(id, buyer)) - to_mathint(postUpdateCredit);
mathint pendingFeeDelta = to_mathint(pendingFee(id, buyer)) - to_mathint(postUpdatePendingFee);

assert pendingFeeDelta <= (creditDelta * to_mathint(contFee) * to_mathint(timeToMaturity)) / WAD();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

== is true here I think

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

correct, the RHS is nothing but the floor(creditIncrease * continuousFee * timeToMaturity / WAD).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it seems like it was reverted in the latest commits, and we have the inequality again. Curious why

Copy link
Copy Markdown
Contributor Author

@bhargavbh bhargavbh Apr 16, 2026

Choose a reason for hiding this comment

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

with the summaries of transfers and callbacks removed, the assert with equality times out. assert with inequality passes in 4min. i tried summarising SafeTransferLiv.transferFrom but still times out: https://prover.certora.com/output/1438622/db03b950f3b74ba1a0eb28d0ff67a76a/?anonymousKey=049383bc4bcd120af9bca8f217d621faae52c0e5

Yet to find the root cause.

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: bf295f7e1f

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/confs/ContinuousFee.conf Outdated
@bhargavbh bhargavbh requested a review from QGarchery April 15, 2026 13:57
Comment thread certora/confs/ContinuousFee.conf Outdated
Comment thread certora/specs/ContinuousFee.spec
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: 4288c79d3e

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/specs/ContinuousFee.spec Outdated
Comment thread certora/specs/ContinuousFee.spec Outdated
Comment thread certora/specs/ContinuousFee.spec Outdated
Comment thread certora/specs/ContinuousFee.spec Outdated
Comment thread certora/specs/ContinuousFee.spec Outdated
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: d461b44885

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/specs/ContinuousFee.spec Outdated
Comment thread certora/specs/ContinuousFee.spec Outdated
Comment thread certora/specs/ContinuousFee.spec Outdated
Comment thread certora/specs/ContinuousFee.spec Outdated
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: 119cbd70d4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread certora/specs/ContinuousFee.spec
@bhargavbh bhargavbh requested a review from MathisGD April 30, 2026 06:45
@MathisGD MathisGD merged commit 00eba9b into main Apr 30, 2026
32 checks passed
@MathisGD MathisGD deleted the certora/pendingFee branch April 30, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants