Dispute Resolution
Dispute resolution is done off-chain but requires users to approve trade or cancel trade on-chain via the executor signer who assigns the approval or cancellation function to the right user to sign after trade arbitration is completed.
To Approve Sell Trade
This method is used by the executor to assign the approval signature for the buyer to approve the sell trade if the FIAT was received by the seller. If received, then verifiedRequest.to must be the merchant's address and a signature must be generated for the merchant whether the function is being called by the executor.
To Cancel Sell Trade
On the other hand, if FIAT was not sent, if the execution would be done by the user, then verifiedRequest.to must be the owner's address and a signature must be generated for the owner, else if a disapproval should be executed by a moderator, who assign cancel signature to the seller, it means that verifiedRequest.to must be the user's address and signature must be generated for the user. This is how the system maintains its 2/3 quorum.
To Approve Buy Trade
This method is used by the executor to assign the approval signature for the buyer to approve buy trades if the FIAT was received by the merchant. If received, then verifiedRequest.to must be the user's address and a signature must be generated for the user whether the function is being called by the executor.
To Cancel Buy Trade
On the other hand, if FIAT was not sent, if the signature used would be from the merchant, which the executor would assign a signature, then verifiedRequest.to must be the user's address. Since the executor triggers the action with either of the signatures, the system maintains its 2/3 quorum.
Based on the outcome of dispute resolution, the executor generates an off-chain signature which is assigned to either the buyer or the seller to sign. The verifiedSigner is been used to sign the request by the user which the executor now executes on-chain to either approve the token transfer or cancel the trade transaction.
Last updated