InheritanceManager::createEstateNFT()
can change the value of assetToPay
every time it is called. assetToPay
is an individual variable and not part of a mapping with each minted NFT. This leads to a mismatch of value and asset any time the asset is changed. E.g., NFT1 is minted at a value of 50 USDC. assetToPay
is set to USDC. NFT2 is minted with the value of 0.5 WETH, setting the assetToPay
as WETH. Now, if beneficiaries try to settle NFT1 on-chain, it has a value of 50 WETH. The contract does have a workaround to this. The beneficiaries can appoint a trustee, who can change the assetToPay
or value
every time an NFT needs to be settled.
Incorrect accounting. Impact is proportional to the difference between the assets used to set NFT values. The correct NFT value being payed out when the NFT is being settled on-chain is one of the core invariants of the contract, which is violated by this bug. Since the contract does have a way to prevent this, this bug is a low.
Copy the following into your test folder and run the test.
Test result:
Store the value and asset as a mapping or struct for each NFT, which allows NFTs with different assets to be handled properly.
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.