Closed sherlock-admin closed 1 year ago
I dispute this issue for the following rationale pausing assets is a non-standard practice that can be seen as the token admin intentionally breaking its normal operations I consider it to be the responsibility of the asset admins not to break their usage / compensate problems due to their action, and its the lenders/borrowers responsibility to acknowledge no app can guarantee no loss when its used with assets breaking standards
peanuts
medium
Some NFTs like CryptoKitty and CryptoFighter can be paused, which block repaying/liquidation actions
Summary
Some NFTs like CryptoKitty and CryptoFighter can be paused, which block repaying and liquidating actions. When NFTs are paused, borrowers still need to pay the accumulated interest and might not be able to liquidate on time.
Vulnerability Detail
When a borrower uses an NFT as collateral to borrow money, the NFT is accruing interest every second. In RepayFacet#repay, the function calculates the interest of the collateral through the
interestPerSecond
value, and adds up the total interests on top of the principal amount.The NFT collateral also has a
loan.endDate
which allows for liquidation afterloan.endDate
is passed.In both CryptoKitty and CryptoFighter NFT, the transfer method can be paused.
In crypto-figher NFT:
https://etherscan.io/address/0x87d598064c736dd0C712D329aFCFAA0Ccc1921A1#code#L873
In Crypto-kitty NFT:
https://etherscan.io/address/0x06012c8cf97BEaD5deAe237070F9587f8E7A266d#code#L615
note the WhenNotPaused modifier.
Impact
If the transfer and transferFrom is paused in CryptoKitty and CryptoFighter NFT, the repaying action will be blocked. The borrower cannot fully clear his debt and has to wait until the transfer is unpaused to pay the unnecessary extra interest. Also, if the NFT is paused for far too long, the NFT will be subjected to liquidation. Both scenarios will be unfair for the borrower.
Code Snippet
https://github.com/sherlock-audit/2023-02-kairos/blob/main/kairos-contracts/src/RepayFacet.sol#L54-L55
https://github.com/sherlock-audit/2023-02-kairos/blob/main/kairos-contracts/src/AuctionFacet.sol#L77-L82
https://github.com/sherlock-audit/2023-02-kairos-cryptostaker2
Tool used
Manual Review
Recommendation
Recommend not charging interest when the external NFT contract is paused, or extending the borrowing time of these NFTs for a similar duration when they are paused. Alternatively, recommend having a blocklist and take note of these types of pausable NFT and not allow these NFTs to be used as collateral.