The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

`SmartVaultIndex` may change `vaultManager` , which would override vaults addresses, causing bugs in all pending loans

Summary

Vulnerability Details

  • It is a valid case for the team to want to deploy new manager with new terms, or to reduce gas costs, if there are many

  • Also there is a valid and ready to use function for such cases:

  • But if this happens the new manager would be deployed with lastToken set to 0, which means that each mint will call addVaultAddress with tokenId which is already there and functioning. This could happen for all vaults, which have been minted from the old manager.

Here is the mappings, which are gonna be messed:

mapping(address => uint256[]) private tokenIds;
mapping(uint256 => address payable) private vaultAddresses;

PoC

In the following gist I have provided coded PoC and instructions how to run it

Impact

  • Bad debt generation, because it is impossible to find the correct vault

  • Blocked functionality to transfer ownership of previous vaults, because transaction will revert here

Tools Used

Manual Review
Hardhat

Recommendations

Make manager inside SmartVaultIndex immutable and deploy new index per manager, so this scenario is impossible to be reached:

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

nmirchev8 Submitter
over 1 year ago
hrishibhat Lead Judge
over 1 year ago
nmirchev8 Submitter
over 1 year ago
hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.