Cyfrin / 2023-07-escrow

17 stars 12 forks source link

Buyer funds will stuck in contract #834

Open codehawks-bot opened 11 months ago

codehawks-bot commented 11 months ago

Buyer funds will stuck in contract

Severity

High Risk

Relevant GitHub Links

https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L39

Summary

There is 2 way to transfer funds from contract

  1. Buyer or Seller initiated Dispute in the presence of arbiter and after the resolving dispute arbiter will take his fees and will transfer funds to buyer and seller
  2. Buyer got his report from seller and calls confirmReceipt that will tranfer all the balance to seller

As Arbiter is trusted and optional so in the absence of arbiter , seller can deny to sell service and in this way buyer's fund will be stuck in contract and there is no way he can get his funds back

There can be multiple reasons where seller can deny to give service . AS we all aware that Auditing is time taking process and seller can have tons of reasons.

Cases where Seller is taking much more time intensely as he know that buyer won't have any option, buyer don't have even option to get his funds and ask another auditor.

Vulnerability Details

see summary

Impact

buyer's funds will be stuck in contract

Tools Used

Manual

Recommendations

I don't have better idea rather than making arbiter necessary