if (tokenContract.balanceOf(address(this)) < price) revert Escrow__MustDeployWithTokenBalance();
In the extremely unlikely scenario where the total funds that arrived in the Escrow contract's address when transferred by the buyer, is LESS than what the buyer sent, i.e. tokenContract.balanceOf(address(this)) < price, for whatever reason, then the above if
statement will revert and no Escrow contract will be created, as intended.
All good, but see my recommendation.
n/a
Frustration.
VSC, manual.
However, maybe just my noobness but it's my suggestion to have some solution implemented that would eliminate this highly unlikely potential risk of reverting and temporarily DoS-ing buyer's attempt to create escrow contract, by ensuring that the price
amount of tokens the buyer transfers to the Escrow contract's address is exactly what will arrive there, always.
Additionally, which tokens/token contracts may contribute to this potential "risk" of causing less tokens to arrive than what was sent?
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.