Submitted by oakcobalt
An old borrower can use an old delegation to claim on behalf of a new borrower.
A borrower can delegate locked collateral NFT through delegateRegistry to prove token ownership and claim airdrops, event ticketing, etc.
delegateRegistry by Delegate.Cash protocol allows custom rights to be configured to a delegatee.
Currently, MultiSourceLoan::delegate allows a borrower to configure bytes32 _rights to delegateERC721. In DelegateRegistry::delegateERC721, bytes32 rights will be hashed as part of the key to store delegation data.
src/lib/loans/MultiSourceLoan.sol#L484
The problem is, in MultiSourceLoan::revokeDelegate, empty rights will always be passed to delegateERC721. This means when a borrower configures custom rights in delegate(), they cannot remove the delegation. In DelegateRegistry::delegateERC721, empty rights will be hashed into a different key from the borrowers actual delegation. Incorrect delegation data will be read and delegateERC721 call will return with no change.
src/lib/loans/MultiSourceLoan.sol#L496
POC:
In revokeDelegate(), allow passing bytes32 _rights into delegateERC721() to correctly revoke existing delegations with custom rights.
Error
0xend (Gondi) confirmed
0xsomeone (judge) commented:
For this audit, 2 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by oakcobalt received the top score from the judge.
The following wardens also submitted reports: minhquanym.
