-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: fixed audit findings #23
Conversation
contracts/DebtLocker.sol
Outdated
uint256 fundsCaptured = _fundsToCapture; | ||
|
||
// Funds recovered from liquidation and any unclaimed previous payment amounts | ||
uint256 recoveredFunds = IERC20Like(fundsAsset).balanceOf(address(this)) - fundsCaptured; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space
contracts/DebtLocker.sol
Outdated
@@ -209,19 +211,24 @@ contract DebtLocker is IDebtLocker, DebtLockerStorage, MapleProxied { | |||
require(!_isLiquidationActive(), "DL:HCOR:LIQ_NOT_FINISHED"); | |||
|
|||
address fundsAsset = IMapleLoanLike(_loan).fundsAsset(); | |||
uint256 recoveredFunds = IERC20Like(fundsAsset).balanceOf(address(this)); // Funds recovered from liquidation and any unclaimed previous payment amounts | |||
uint256 principalToCover = _principalRemainingAtLastClaim; // Principal remaining at time of liquidation | |||
uint256 principalToCover = _principalRemainingAtLastClaim; // Principal remaining at time of liquidation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs another space before comment
contracts/test/DebtLocker.t.sol
Outdated
assertEq(debtLocker.principalRemainingAtLastClaim(), loan.principalRequested()); | ||
assertEq(debtLocker.fundsToCapture(), 0); | ||
|
||
//trigger default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spaces after all //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also sentence case
* chore: start cleaning up debt locker * feat: add README * feat: fixed audit findings (#23) * feat: fixed audit findings * fix: PR comments * formatting: update comments Co-authored-by: Lucas <[email protected]> Co-authored-by: Joao Gabriel Carvalho <[email protected]>
* chore: Remove TODO on pullFunds (c4 #10) * chore: strict 0.8.7 (c4 #23) * fix: Add named returns where missing (c4 #25) Co-authored-by: Lucas Manuel <[email protected]>
* chore: Remove TODO on pullFunds (c4 #10) * chore: strict 0.8.7 (c4 #23) * fix: Add named returns where missing (c4 #25) * fix: `handleClaimOfRepossessed` gas optimization (c4 #66) Co-authored-by: Lucas Manuel <[email protected]>
* chore: Remove TODO on pullFunds (c4 #10) * chore: strict 0.8.7 (c4 #23) * fix: Add named returns where missing (c4 #25) * fix: `handleClaimOfRepossessed` gas optimization (c4 #66) * fix: `getExpectedAmount` gas savings (c4 #62) * formatting: use loan instead of loanAddress Co-authored-by: Lucas Manuel <[email protected]>
* chore: Remove TODO on pullFunds (c4 #10) * chore: strict 0.8.7 (c4 #23) * fix: Add named returns where missing (c4 #25) * fix: `handleClaimOfRepossessed` gas optimization (c4 #66) * fix: `getExpectedAmount` gas savings (c4 #62) * fix: Use `!= 0` instead of `> 0` (c4 #24) * fix: Input validation for `setAllowedSlippage` (c4 #45) * refactor: POst-C4 Audit Cleanup - natspec, spacing, and alignment - factory `mapleGlobals_` check now handled by mpf - `success_` -> `success` for non-param variable - reordered `DebtLockerStorage` - take latest dependencies - `acceptNewTerms` gas savings - `claim`, `_handleClaimOfRepossessed`, and `_handleClaim` gas savings - `_isLiquidationActive` gas savings - `triggerDefault` gas savings Co-authored-by: Joao Gabriel Carvalho <[email protected]>
Addressing the 2 issues found during debt locker audit