Skip to content

Certora C-01 Cleanup: Remove redundant min amount check on add liquidity#97

Merged
davidlee1435 merged 4 commits intodevfrom
david/certora-c-01-cleanup
Dec 22, 2025
Merged

Certora C-01 Cleanup: Remove redundant min amount check on add liquidity#97
davidlee1435 merged 4 commits intodevfrom
david/certora-c-01-cleanup

Conversation

@davidlee1435
Copy link
Copy Markdown
Collaborator

Removes add liquidity spot price check as it's redundant and may trigger unintended reverts.

@davidlee1435 davidlee1435 force-pushed the david/certora-c-01-cleanup branch from ae43179 to a116b72 Compare December 22, 2025 14:52
amountOut = _callSwap(context, params, cache);
uint256 endingBalance = IERC20(params.tokenIn).balanceOf(address(context.proxy));
require(params.minAmountOut >= amountOut * params.maxSlippage / 1e18 , "UniswapV3Lib/min-amount-not-met");
require(params.minAmountOut > 0, "UniswapV3Lib/min-amount-not-met");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: this would be better moved to the top where other checks are and i think the error message should be: min-amount-not-set or similar

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@github-actions
Copy link
Copy Markdown

Coverage after merging david/certora-c-01-cleanup into dev will be

99.65%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
deploy
   ControllerDeploy.sol100%100%100%100%
   ForeignControllerInit.sol100%100%100%100%
   MainnetControllerInit.sol97.56%94.12%100%100%156, 92
src
   ALMProxy.sol100%100%100%100%
   ForeignController.sol96.73%85.19%97.73%98.28%157–158, 262, 369–370, 675, 931
   MainnetController.sol99.05%86.96%100%100%1038, 261, 527
   RateLimitHelpers.sol100%100%100%100%
   RateLimits.sol100%100%100%100%
src/libraries
   CCTPLib.sol100%100%100%100%
   CentrifugeLib.sol100%100%100%100%
   CurveLib.sol100%100%100%100%
   MerklLib.sol100%100%100%100%
   PSMLib.sol100%100%100%100%
   PendleLib.sol100%100%100%100%
   UniswapV3Lib.sol99.04%96.72%100%100%355–356
src/libraries/common
   ERC20Lib.sol100%100%100%100%
   MathLib.sol100%100%100%100%

@davidlee1435 davidlee1435 merged commit d8dbd1e into dev Dec 22, 2025
3 checks passed
@barrutko barrutko deleted the david/certora-c-01-cleanup branch February 13, 2026 16: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.

3 participants