Attackers or whales can keep buying up the batches of NFTs as they're being added by monitoring them either on chain or offchain hereby making it impossible for for regular users to borrow from the lending pool as well as monopolizing NFT supply, using them as collateral, and over-leveraging borrowing due to how the liquidation threshold is enforced
During Launch a malicious attacker with a lot of funds can buy up the first batch of Nfts(3) by calling the mint function then set up An off-chain bot which can be used to monitor for a state change in the RAACNFT.sol contract more specifically the currentBatchSize state variable if it's greater than the previously stored number they buy up the difference.
The motive for this will be to borrow against the collateral a lot more than the deposited collateral as during borrowing we're only checking if the collateralValue is not less than 80% of the debt as initial liquidation threshold is 80% :
so for example Malicious Attacker takes a flashloan and gets their hands on $1000,000 worth of NFTs then :
Collateral Value: $1,000,000
Collateral-to-Debt Ratio: 80% (0.8)
Formula:
Debt ≤ Collateral / 0.8
Maximum Debt:
Debtmax = 1,000,000 / 0.8 = $1, 250, 000
Additional Borrowing Capacity:
$1, 250, 000 − $1, 000, 000 = $250, 000
The additional Borrowing capacity can be considered gains in this instance as attacker can simply pay off their flashloan then pocket the change.
this will create a massive bad debt for the protocol as attacker can run away with funds and they're massively undercollateralized.
this will also render the protocol unusable as people can only at least for the moment borrow against NFTS and if an attacker keeps buying up NFTS as they're added ordinary users will not be able to borrow hence lending pool is rendered unusable.
Take away the incentive for this by making sure the undercollateralization check matches the healthfactor calculation :
consider implementing some offchain verification before user can purchase NFTs to prevent this.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.