The NFT's asset (currency) is not stored per NFT, one asset is stored globally for an inheritance manager. This results in several erronous calculations, and possible exploits.
If more than one NFT is created, then the last NFT created will determine the asset type used during buy-out. If previous NFTs were created with a different asset this will result in wrongly calculated payments.
E.g. the next test demonstrates a scenario, where the initial owner of the InheritanceManager created two NFT-s, one representing a family residency worth of_ 3_000_000 _USDC, and one representing a car worth of 3 WETH. As the test demonstrates, a beneficiary can buy out the residency paying olny 0,000003 WETH (note that USDC has only 6 decimals, whilte WETH has 18).
A beneficiary can buyout nft-s at a much lower price then inteded. This breaks the contract's core logic.
Manaul review, foundry test.
Store assets per nft-s (e.g. in a mapping), just like NFT prices.
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.