code-423n4 / 2022-02-tribe-turbo-findings

1 stars 0 forks source link

QA Report #45

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

[I-00] Frozen Fei in TurboGibber

Severity: Medium Likelihood: Low Status: {Not Submitted} Scope: TurboGibber

Unexpected behavior may occur when impounding a safe. For example, if the specified feiAmount in the impound function is greater than the outstanding borrow repayment amount and the repayBorrowBehalf only repays that borrow amount, there will be feiAmount - repayBorrowBehalf fei stuck in the gibber contract.

Turbo Gibber Impound

Recommendation: burn any additional fei in the TurboGibber contract after repayments.

(less favorable) Alternative: Add a sweep function to allow transfers of frozen fei.

transmissions11 commented 2 years ago

i believe repayBorrowBehalf reverts if you're over-repaying, so this wouldn't be an issue.

https://github.com/Rari-Capital/compound-protocol/blob/c9450c0e5d0fdfd0f18544ea6863e64beec524eb/contracts/CToken.sol#L923

GalloDaSballo commented 2 years ago

Agree with the sponsor that this finding is invalid