Closed c4-submissions closed 1 year ago
GalloDaSballo marked the issue as primary issue
0xfoobar (sponsor) disputed
The explicit purpose of a Delegate Token is to offer utility access, if there's utility attached then the point of the flashloan is to be able to access it. Feature not a bug, users should not sell things they don't want to sell, and should not attach utility they do not wish others to access.
GalloDaSballo marked the issue as unsatisfactory: Insufficient proof
Agree with the Sponsor
GalloDaSballo marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-09-delegate/blob/a6dbac8068760ee4fc5bababb57e3fe79e5eeb2e/src/DelegateToken.sol#L389-L396
Vulnerability details
Impact
Some NFT stake protocol like bored ape stake protocol support NFT holder deposit and withdraw their token to stake pool with their NFT token to gain more stake yield:
So a malicious user can flashloan such kind of NFT from this protocol and claim their stake token from the stake pool if the user stake their token by NFT before.
Proof of Concept
Tools Used
vscode, manual review
Recommended Mitigation Steps
Warning the user should notice their stake token before they delegate their NFT to protocol, or consider blacklist mechanism to forbid such NFT delegate to the protocol.
Another easier option is close the flashloan function.
Assessed type
ERC721