<p>This is heavily work in progress but I thought it might be useful for other developers to share the development progress.</p>
<p>For the new trade protocol we need a mediator which will be very similar to arbitration just that mediators do not have a 3rd key and cannot do a payout but only give the traders a recommendation for the payout. If both traders agree to that result they can complete the trade by both signing the payout tx. Only if they do not find consensus they need to go to the next step which is currently the arbitration.<br>
So before traders can open a dispute to arbitrators they need to go through the mediation first and only if both do not agree to the mediators decision arbitration will be used.</p>
<p>This should reduce arbitration cases a lot and is a necessary feature for the new trade protocol but can be deployed as addition with the current protocol.</p>
<p>To make sure the feature is available for both traders (both have updated) we can use an activation date and set a mandatory version number after a few days after release, so we enforce traders to update and enable that feature. Otherwise it would be complicated if one peer has updated but the other not...</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/3169'>https://github.com/bisq-network/bisq/pull/3169</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Refactoring: Move arbitration package inside dispute package</li>
  <li>Use abstract base class DisputeResolver for arbitrator</li>
  <li>Refactoring: Move mediator to mediator package.</li>
  <li>Let Mediator inherit DisputeResolver.</li>
  <li>Do not use protobuf inheritance</li>
  <li>Refactoring: Move ArbitratorModule to parent package</li>
  <li>Refactoring: Rename ArbitratorModule to DisputeModule</li>
  <li>Add mediators to Filter</li>
  <li>Add mediators to filter window</li>
  <li>Use abstract DisputeResolverService as base class for ArbitratorService</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-0">common/src/main/proto/pb.proto</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-1">core/src/main/java/bisq/core/CoreModule.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-2">core/src/main/java/bisq/core/account/sign/SignedWitnessService.java</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-3">core/src/main/java/bisq/core/app/BisqExecutable.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-4">core/src/main/java/bisq/core/app/BisqSetup.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-5">core/src/main/java/bisq/core/app/misc/ExecutableForAppWithP2p.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-6">core/src/main/java/bisq/core/app/misc/ModuleForAppWithP2p.java</a>
    (6)
  </li>
  <li>
    <strong>D</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-7">core/src/main/java/bisq/core/arbitration/ArbitratorService.java</a>
    (123)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-8">core/src/main/java/bisq/core/chat/ChatManager.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-9">core/src/main/java/bisq/core/chat/ChatSession.java</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-10">core/src/main/java/bisq/core/dispute/DisputeModule.java</a>
    (10)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-11">core/src/main/java/bisq/core/dispute/DisputeResolver.java</a>
    (113)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-12">core/src/main/java/bisq/core/dispute/DisputeResolverService.java</a>
    (127)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-13">core/src/main/java/bisq/core/dispute/arbitration/Arbitrator.java</a>
    (82)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-14">core/src/main/java/bisq/core/dispute/arbitration/ArbitratorManager.java</a>
    (10)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-15">core/src/main/java/bisq/core/dispute/arbitration/ArbitratorService.java</a>
    (58)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-16">core/src/main/java/bisq/core/dispute/arbitration/Attachment.java</a>
    (2)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-17">core/src/main/java/bisq/core/dispute/arbitration/BuyerDataItem.java</a>
    (2)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-18">core/src/main/java/bisq/core/dispute/arbitration/Dispute.java</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-19">core/src/main/java/bisq/core/dispute/arbitration/DisputeAlreadyOpenException.java</a>
    (2)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-20">core/src/main/java/bisq/core/dispute/arbitration/DisputeChatSession.java</a>
    (16)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-21">core/src/main/java/bisq/core/dispute/arbitration/DisputeList.java</a>
    (2)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-22">core/src/main/java/bisq/core/dispute/arbitration/DisputeManager.java</a>
    (12)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-23">core/src/main/java/bisq/core/dispute/arbitration/DisputeResult.java</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-24">core/src/main/java/bisq/core/dispute/arbitration/MessageDeliveryFailedException.java</a>
    (2)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-25">core/src/main/java/bisq/core/dispute/arbitration/messages/DisputeCommunicationMessage.java</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-26">core/src/main/java/bisq/core/dispute/arbitration/messages/DisputeMessage.java</a>
    (2)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-27">core/src/main/java/bisq/core/dispute/arbitration/messages/DisputeResultMessage.java</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-28">core/src/main/java/bisq/core/dispute/arbitration/messages/OpenNewDisputeMessage.java</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-29">core/src/main/java/bisq/core/dispute/arbitration/messages/PeerOpenedDisputeMessage.java</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-30">core/src/main/java/bisq/core/dispute/arbitration/messages/PeerPublishedDisputePayoutTxMessage.java</a>
    (2)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-31">core/src/main/java/bisq/core/dispute/mediator/Mediator.java</a>
    (68)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-32">core/src/main/java/bisq/core/dispute/mediator/MediatorService.java</a>
    (62)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-33">core/src/main/java/bisq/core/filter/Filter.java</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-34">core/src/main/java/bisq/core/notifications/alerts/DisputeMsgEvents.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-35">core/src/main/java/bisq/core/offer/OpenOfferManager.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-36">core/src/main/java/bisq/core/offer/availability/ArbitratorSelection.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-37">core/src/main/java/bisq/core/offer/placeoffer/PlaceOfferModel.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-38">core/src/main/java/bisq/core/offer/placeoffer/tasks/CreateMakerFeeTx.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-39">core/src/main/java/bisq/core/presentation/DisputePresentation.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-40">core/src/main/java/bisq/core/proto/ProtoDevUtil.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-41">core/src/main/java/bisq/core/proto/network/CoreNetworkProtoResolver.java</a>
    (14)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-42">core/src/main/java/bisq/core/proto/persistable/CorePersistenceProtoResolver.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-43">core/src/main/java/bisq/core/setup/CorePersistedDataHost.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-44">core/src/main/java/bisq/core/trade/Trade.java</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-45">core/src/main/java/bisq/core/trade/TradeChatSession.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-46">core/src/main/java/bisq/core/trade/TradeManager.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-47">core/src/main/java/bisq/core/trade/protocol/ProcessModel.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-48">core/src/main/java/bisq/core/trade/protocol/tasks/taker/CreateTakerFeeTx.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-49">core/src/main/java/bisq/core/user/User.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-50">core/src/main/java/bisq/core/user/UserPayload.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-51">core/src/main/resources/i18n/displayStrings.properties</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-52">core/src/test/java/bisq/core/account/sign/SignedWitnessServiceTest.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-53">core/src/test/java/bisq/core/arbitration/ArbitratorManagerTest.java</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-54">core/src/test/java/bisq/core/arbitration/ArbitratorTest.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-55">core/src/test/java/bisq/core/arbitration/BuyerDataItemTest.java</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-56">core/src/test/java/bisq/core/arbitration/MediatorTest.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-57">desktop/src/main/java/bisq/desktop/main/Chat/Chat.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-58">desktop/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationView.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-59">desktop/src/main/java/bisq/desktop/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-60">desktop/src/main/java/bisq/desktop/main/disputes/DisputesView.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-61">desktop/src/main/java/bisq/desktop/main/disputes/arbitrator/ArbitratorDisputeView.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-62">desktop/src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-63">desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-64">desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTrade.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-65">desktop/src/main/java/bisq/desktop/main/offer/BuyOfferView.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-66">desktop/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-67">desktop/src/main/java/bisq/desktop/main/offer/OfferView.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-68">desktop/src/main/java/bisq/desktop/main/offer/SellOfferView.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-69">desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-70">desktop/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-71">desktop/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-72">desktop/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-73">desktop/src/main/java/bisq/desktop/main/overlays/windows/FilterWindow.java</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-74">desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-75">desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-76">desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-77">desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-78">desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesViewModel.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-79">desktop/src/test/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactoryTest.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-80">desktop/src/test/java/bisq/desktop/main/funds/transactions/TransactionAwareTradeTest.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3169/files#diff-81">desktop/src/test/java/bisq/desktop/main/settings/preferences/PreferencesViewModelTest.java</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/3169.patch'>https://github.com/bisq-network/bisq/pull/3169.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/3169.diff'>https://github.com/bisq-network/bisq/pull/3169.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3169?email_source=notifications&email_token=AJFFTNWI4UBNPEWQC2YA4KLQHFZMDA5CNFSM4ISQRRTKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIQ2IFA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNR7E7YVRNXOOYK4SUDQHFZMDANCNFSM4ISQRRTA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNWJEKPJCIUNJAQKQNLQHFZMDA5CNFSM4ISQRRTKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIQ2IFA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3169?email_source=notifications\u0026email_token=AJFFTNWI4UBNPEWQC2YA4KLQHFZMDA5CNFSM4ISQRRTKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIQ2IFA",
"url": "https://github.com/bisq-network/bisq/pull/3169?email_source=notifications\u0026email_token=AJFFTNWI4UBNPEWQC2YA4KLQHFZMDA5CNFSM4ISQRRTKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIQ2IFA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>