[WP-M9] CEthInterface#repayBorrowBehalf()
reading non-existing returns makes _repayAnyDebt()
with CEther always revert
#121
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
reviewed
Issues that Backd has reviewed (just for internal tracking, can ignore this)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/interfaces/vendor/CTokenInterfaces.sol#L355-L358
Vulnerability details
https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/interfaces/vendor/CTokenInterfaces.sol#L355-L358
repayBorrowBehalf()
for native cToken (CEther
) will return nothing, while the currentCEthInterface
interface defines the returns as(uint256)
.As a result,
ether.repayBorrowBehalf()
will always reverthttps://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L117-L118
Ref:
The text was updated successfully, but these errors were encountered: