createEstateNFT(string memory _description, uint256 _value, address _asset) the assetToPay = _asset; is updated, if owner wants to create an another estate it is not updating according to the index, it is overwritting previous asset address.Impact : If someone from the beneficiery calls the buyOutEstateNFT(uint256 _nftID) with _nftid:1 the function is accessing the most recently updated asset IERC20(assetToPay).safeTransferFrom(msg.sender, address(this), finalAmount); instead of asset associated with the user specified nftId:1, which cause the protocol to break.
Proof of Concepts :
`
Recommended mitigation: Use the mapping to store the nftid=>asset, so that we can track assets efficiently.
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.