Flash loans can be used to make deposits with 0 timelock #180
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
duplicate
This issue or pull request already exists
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pedroais
Vulnerability details
Impact
Anyone could use a flash loan to lock and unlock in the same block with a large amount and get an NFT with high points with funds that do not belong to him. Even if the multiplier for 0 timelock is 0 this could be done to get the NFT.
Proof of Concept
Point calculation formula :
return amount_ * (duration_ + _zeroDurationPointBase);
Recommended Mitigation Steps
Add a minimal timelock of 1 block to protect the contract from flash loans
The text was updated successfully, but these errors were encountered: