Skip to content
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-016 Documentation fixes #135

Merged
merged 4 commits into from
Jul 15, 2024
Merged

c4-016 Documentation fixes #135

merged 4 commits into from
Jul 15, 2024

Conversation

aviggiano
Copy link
Contributor

No description provided.

@aviggiano aviggiano requested a review from Skitzzy July 3, 2024 18:30
@aviggiano aviggiano merged commit 9eb0670 into code4rena-audit-fixes Jul 15, 2024
4 of 5 checks passed
@aviggiano aviggiano deleted the c4-016 branch July 15, 2024 13:51
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant