payout doesn’t fix isForeclosed state
The payout function in RCTreasury.sol does not clear a user's isForeclosed status, even though receiving funds should allow them to lose that status. An attacker could remain foreclosed and be unable to place new bids without calling another function.
Submitted by gpersoon
The function payout of RCTreasury.sol doesn’t undo the isForeclosed state of a user. This would be possible because with a payout a user will receive funds so he can lose his isForeclosed status.
For example the function refundUser doesn’t check and update the isForeclosed status in RCTreasury on L429 and line 447.
Recommend checking and updating the isForeclosed state in the payout function.
Splidge (Reality Cards) confirmed and suggested upgrading from 0 to 2 severity:
The severity of this could be increased as a user might have believed that the payout would cancel their foreclosure. This could at a push count as 2 (Medium risk) because the “availability could be impacted” as in the definition here. This is because the user wouldn’t be allowed to place new bids without calling some other function that will cancel their foreclosure first.
dmvt (Judge) agreed with sponsor and upgraded from 0 to 2 severity:
Splidge (Reality Cards) resolved:
Fixed here
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the payout function fails to check and update the isForeclosed state after transferring funds.
Impact
A user might believe their foreclosure is cancelled by a payout, but they remain unable to place new bids without calling another function, potentially impacting availability.
What the attacker needed
User is foreclosed; user receives a payout
The fix
The issue was fixed by updating the payout function to check and clear the isForeclosed state.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this smart contract, a user can be marked as 'foreclosed', meaning they are restricted from certain actions like bidding. The payout function gives them funds but does not remove that mark, so they stay restricted even though they now have money. This is a logic bug that could confuse users and block them from participating.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.