The buyOutEstateNFT()
function contains a critical logic error that causes it to exit prematurely, resulting in potential token loss for users. The function first takes payment from the caller and then prematurely returns when it finds the caller in the beneficiary list:
This function can only be called by a beneficiary due to the onlyBeneficiaryWithIsInherited modifier. However, the function always exits early when it finds the caller in the beneficiary list, preventing the completion of token distribution and NFT burning.
Depending on the caller's position in the beneficiary array:
If the caller is the first beneficiary: No one receives tokens
If the caller is in the middle: Only beneficiaries before the caller receive tokens
NFT remains locked: The NFT is never burned since the function exits before reaching that code, effectively locking the NFT in the contract permanently. Core functionality broken: This is a fundamental feature of the inheritance system that is completely non-functional.
Restructure the function to separate the token distribution logic from the caller identification
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.