The assetToPay variable is globally defined but can be overridden when a new NFT asset is created. If an initial NFT asset (asset1) is created using WETH as payment, but a subsequent NFT (asset2) is created using USDC, the beneficiary can exploit the system by using a significantly higher USDC price to pay for asset1.
Impact: High
Likelihood: Low
Each time createEstateNFT is called, it updates assetToPay, impacting all previously created NFT assets. If the previous asset used for payments differs from the newly assigned one, the required payment amount can become unreasonably high or low.
But, beneficiary can set trustee
via appointTrustee()
, and the trustee has the ability to set the nftValue and assetToPay. This will the solve the problem.
The only problem is if two beneficiary accounts are controlled by two different people. This creates the potential for a race condition.
If assetToPay changes from a lower-value asset (e.g., WETH) to a much higher-value one (e.g., WBTC), user has to overpay significantly to buy out the NFT tokens.
Use a mapping to store assetToPay for each individual NFT instead of a global variable.
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.