Open hats-bug-reporter[bot] opened 9 months ago
Farm can still function with existing NFTs in it, attacker needs to reserve NFT for farm and put some funds on it. Farms are easily re-deployable as protocol has a way to disengage farms by calling setVerifiedIsolationPool(_farmAddress, false) if needed,
Also should that happen that attacker reserves NFT for the farm and put some dust on it, existing users in the farm will be fine it won't be able to accept new users but existing users would be fine and existing NFTs can be still reused in the farm.
Github username: -- Twitter username: @00xSEV Submission hash (on-chain): 0x314d38b19d7ccf83ae5e52e84222ed81050f6f37c5aea7d022893d81d53cf270 Severity: medium
Description: Description\ Anyone can deposit on the NFTs that have not yet been minted.
The NFT ID is determined as, roughly speaking, lastId + 1.
enterFarm
calls_getWiseLendingNFT
, which calls_registrationFarm
, which in turn callsWISE_LENDING.setRegistrationIsolationPool
, which calls_validateZero(WISE_SECURITY.overallETHCollateralsBare(_nftId))
. It will revert if there is any collateral on the NFT.Furthermore, anyone can call
reservePositionForUser
to assign a specific NFT to a user.Attack Scenario:
enterFarm
for thementerFarm
for any new userImpact:
enterFarm
will revert It can also lead to unexpected calculation errors because the code may not anticipate the deposited amount on newly minted NFTs.Attachments: in contracts/Tests