-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c4-003 Wrong fragmentationFee check in Compensate means it is never c… #120
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jul 4, 2024
Closed
LGTM! |
aviggiano
added a commit
that referenced
this pull request
Jul 15, 2024
* c4-001 Wrong decimal conversion in liquidation protocol split (#118) * c4-002 Wrong crLiquidation cap in overdue liquidation (#119) * c4-003 Wrong fragmentationFee check in Compensate means it is never charged (#120) * c4-004 Chainlink heartbeats are different on Base and Ethereum mainnet (#123) * c4-004 Chainlink heartbeats are different on Base and Ethereum mainnet * Remove old code * Add base and mainnet parameters * Add base sequencer uptime * c4-005 Users below crOpening cannot withdraw cash (#124) * c4-006 DoS in market orders due to incorrect params.amount comparison… (#125) * c4-006 DoS in market orders due to incorrect params.amount comparison with dust limit when amount represents cash * Remove params.amount > credit comparison * c4-007 Supply caps can be bypassed due to incorrect balanceOf (#126) * c4-008 Variable Pool liquidity check should validate balance of aToken, not Pool (#127) * c4-010 Compensate is prevented if user is underwater (#129) * c4-010 Compensate is prevented if user is underwater * Add missing import * Remove old code * c4-011 Compensate ignores forSale after credit split (#130) * c4-012 getCreditPositionProRataAssignedCollateral can be simplified to totalCollateral * credit / totalDebt (#131) * c4-013 Liquidate does not have deadline protection (#132) * c4-013 Liquidate does not have deadline protection * Remove duplicate check * c4-014 BuyCreditMarket returns incorrect value for liquidity check (#133) * c4-015 SelfLiquidation check can be simplified (#134) * c-015 SelfLiquidation check can be simplified * Remove unused error * c4-016 Documentation fixes (#135) * c4-016 Documentation fixes * Minor documentation/error fixes * Improve docs for swap fee * c4-009 Variable Pool liquidity check can be bypassed with a sandwitch attack (#128) * c4-017 BorrowOffers do not have a maxDueDate (#136) * c4-017 BorrowOffers do not have a maxDueDate * Add maxDueDate to LiquidateWithReplacement * Create validateLimitOrder function * pure -> view * c4-018 Wrong fee calculation in SellCreditMarket + exactAmountOut (#137) * c4-019 Refactor fee calculation in AccountingLibrary.getCashAmountOut (#138) * c4-019 Refactor fee calculation in AccountingLibrary.getCashAmountOut * Validate WETH * Chainlink sequencer feed returns startedAt 0 if down (#140) * c4-021 Add borrower to RepayStruct to avoid MEV (#141) * c4-021 Add borrower to RepayStruct to avoid MEV * Fix typo
aviggiano
added a commit
that referenced
this pull request
Jul 16, 2024
* c4-001 Wrong decimal conversion in liquidation protocol split * c4-002 Wrong crLiquidation cap in overdue liquidation * c4-003 Wrong fragmentationFee check in Compensate means it is never charged * c4-tests (#121) * Add Spearbit audit * c4-004 Chainlink heartbeats are different on Base and Ethereum mainnet * Remove old code * Add updated scripts * c4-005 Users below crOpening cannot withdraw cash * c4-006 DoS in market orders due to incorrect params.amount comparison with dust limit when amount represents cash * c4-007 Supply caps can be bypassed due to incorrect balanceOf * c4-008 Variable Pool liquidity check should validate balance of aToken, not Pool * c4-009 Variable Pool liquidity check can be bypassed with a sandwitch attack * c4-010 Compensate is prevented if user is underwater * Add missing import * c4-011 Compensate ignores forSale after credit split * forge fmt * c4-012 getCreditPositionProRataAssignedCollateral can be simplified to totalCollateral * credit / totalDebt * c4-013 Liquidate does not have deadline protection * Add deadline from Liquidate to tests * c4-014 BuyCreditMarket returns incorrect value for liquidity check * c-015 SelfLiquidation check can be simplified * Remove unused error * c4-016 Documentation fixes * Remove old code * c4-017 BorrowOffers do not have a maxDueDate * c4-018 Wrong fee calculation in SellCreditMarket + exactAmountOut * Minor documentation/error fixes * c4-019 Refactor fee calculation in AccountingLibrary.getCashAmountOut * Improve docs for swap fee * Add base and mainnet parameters * Add base sequencer uptime * Update tests with latest changes * Deploy to sepolia * Update workflow to publish ABI on PRs * Minor fix ExpectedErrors * Minor change in GrantRole script * Grant roles * Add Deploy tests back * Move Setup to its own contract * Add onchain fuzzing with foundry * Add onchain properties * Fix property_UNDERWATER * Update test * Chainlink sequencer feed returns startedAt 0 if down * Remove params.amount > credit comparison * Fix property * Update LIQUIDATE_01 for self liquidation * Add one more test * c4-021 Add borrower to RepayStruct to avoid MEV * Fix typo * Update tests * Add base-sepolia * Update README * Update deployment scripts * Fix deploy scripts * Deploy to Base sepolia * Update getCommitHash * Add maxDueDate to LiquidateWithReplacement * Fix test_LiquidateWithReplacement_validation test * Upgrade script * Upgrade script * Upgrade script * Create validateLimitOrder function * pure -> view * Fix docs * Validate WETH * Upgrade contract with latest commits * Add SHOULD_UPGRADE to Upgrade.s.sol script * GrantRole PAUSER_ROLE to testnet multisig * Update Repay.s.sol script * Fix tests * Add more tests * Fix invariant tests * Code4rena Tests/Scripts Updates (#122) * c4-001 Wrong decimal conversion in liquidation protocol split (#118) * c4-002 Wrong crLiquidation cap in overdue liquidation (#119) * c4-003 Wrong fragmentationFee check in Compensate means it is never charged (#120) * c4-004 Chainlink heartbeats are different on Base and Ethereum mainnet (#123) * c4-004 Chainlink heartbeats are different on Base and Ethereum mainnet * Remove old code * Add base and mainnet parameters * Add base sequencer uptime * c4-005 Users below crOpening cannot withdraw cash (#124) * c4-006 DoS in market orders due to incorrect params.amount comparison… (#125) * c4-006 DoS in market orders due to incorrect params.amount comparison with dust limit when amount represents cash * Remove params.amount > credit comparison * c4-007 Supply caps can be bypassed due to incorrect balanceOf (#126) * c4-008 Variable Pool liquidity check should validate balance of aToken, not Pool (#127) * c4-010 Compensate is prevented if user is underwater (#129) * c4-010 Compensate is prevented if user is underwater * Add missing import * Remove old code * c4-011 Compensate ignores forSale after credit split (#130) * c4-012 getCreditPositionProRataAssignedCollateral can be simplified to totalCollateral * credit / totalDebt (#131) * c4-013 Liquidate does not have deadline protection (#132) * c4-013 Liquidate does not have deadline protection * Remove duplicate check * c4-014 BuyCreditMarket returns incorrect value for liquidity check (#133) * c4-015 SelfLiquidation check can be simplified (#134) * c-015 SelfLiquidation check can be simplified * Remove unused error * c4-016 Documentation fixes (#135) * c4-016 Documentation fixes * Minor documentation/error fixes * Improve docs for swap fee * c4-009 Variable Pool liquidity check can be bypassed with a sandwitch attack (#128) * c4-017 BorrowOffers do not have a maxDueDate (#136) * c4-017 BorrowOffers do not have a maxDueDate * Add maxDueDate to LiquidateWithReplacement * Create validateLimitOrder function * pure -> view * c4-018 Wrong fee calculation in SellCreditMarket + exactAmountOut (#137) * c4-019 Refactor fee calculation in AccountingLibrary.getCashAmountOut (#138) * c4-019 Refactor fee calculation in AccountingLibrary.getCashAmountOut * Validate WETH * Chainlink sequencer feed returns startedAt 0 if down (#140) * c4-021 Add borrower to RepayStruct to avoid MEV (#141) * c4-021 Add borrower to RepayStruct to avoid MEV * Fix typo * Update CI * Fix CI test names * Update CI names * Update CI * Update CI * Change fragmentation fee to 1 USDC * Update foundry.toml * Deploy to Base * Base deployment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…harged