The InheritanceManager contract contains a vulnerability in how it tracks the payment asset for estate NFTs. The core issue stems from using a single state variable assetToPay
instead of mapping payment assets to individual NFT IDs. This creates a scenario where only the most recently set payment asset is used for all NFT buyouts, regardless of which asset was specified when each NFT was created.
The impact is that:
Payment assets for previously created NFTs are lost and overwritten
All NFT buyouts use the most recently set asset, not the asset originally intended for each NFT
Beneficiaries may be unable to buy out older NFTs if they don't have the newly required asset
This creates confusion and potential financial loss if token values differ significantly
The following code segments demonstrate the vulnerability:
Consider this scenario:
Owner creates NFT #1 for a property valued at 100,000 USDC with USDC as the payment asset
Later, owner creates NFT #2 for a property valued at 50 WETH with WETH as the payment asset
The assetToPay
is now set to WETH, overwriting the previous USDC setting
When a beneficiary tries to buy out NFT #1, they must pay in WETH instead of the originally intended USDC
This mismatch could make the buyout impossible or financially unfair if the beneficiary doesn't have WETH
To fix this issue, implement a mapping to track payment assets per NFT ID:
Manual Code Review
Solidity Static Analysis
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.