Compromise Algorithm

How Dealroom resolves disagreements fairly using a weighted stake formula.

The Problem with Traditional Negotiation

Contract negotiations typically suffer from three structural problems:

Power Imbalance

The party with more leverage dictates terms regardless of actual needs.

Endless Revision Cycles

Contracts bounce back and forth as each side redlines the other's edits.

Arbitrary Splits

When parties do compromise, it's often a 50/50 split that satisfies neither side.

The Solution: Weighted Stakes

Dealroom replaces adversarial bargaining with a mathematical model that measures how much each clause matters to each party.

What the Algorithm Measures

  • 60%Firmness How strongly the party feels about this clause (1–5 scale). Higher firmness = less willing to accept alternatives.
  • 40%Option Bias How much the chosen option inherently favors one party over the other.

Why This Produces Fair Outcomes

  • The party who cares more about a clause is more likely to get their preferred option.
  • Openness is rewarded — rigid parties pay a higher negotiation cost.
  • Extreme positions (high bias) increase a party's stake, especially when combined with high firmness.
  • Global fairness rebalancing ensures no party wins every clause.

The Formula

stake = ((5-flexibility)/5 × 0.6) + (|bias| × 0.4)

(5-flexibility)/5 × 0.6

Higher firmness (lower flexibility) increases the stake. A party at maximum firmness adds 60% to their stake score.

|bias| × 0.4

The absolute bias of the chosen option. Extreme options (±0.5) add more stake than balanced ones (0.0).

The final stake value ranges from 0.0 to 1.0. The party with the higher stake for a clause wins that clause.

Decision Logic

For each clause, the algorithm compares both parties' stakes and makes a decision:

1

Similar Stakes → Balanced Option Wins

When both parties have similar stakes (within 10%), the algorithm selects the most balanced option — the one with bias closest to 0.0.

2

Higher Stake → That Party Wins

When one party has a clearly higher stake, the algorithm checks the loser's flexibility to decide:

Loser is Flexible

Winner gets their preferred option — the flexible party has indicated willingness to accept alternatives.

Loser is Inflexible

Algorithm selects the closest option to the winner's preference that the inflexible party might accept.

Global Fairness

After resolving each clause individually, the algorithm performs a global fairness pass to ensure no party wins disproportionately.

Rebalancing Process

  1. 1Calculate overall satisfaction for each party across all clauses.
  2. 2If one party's satisfaction is significantly lower, identify swing clauses (close stakes).
  3. 3Flip the weakest swing clauses to the disadvantaged party.
  4. 4Repeat until satisfaction is within acceptable bounds or no more swings remain.

Satisfaction Scores

Each party receives a satisfaction score (0–100) for the overall agreement, calculated from two factors:

Distance Factor

How close the agreed option is to the party's preferred option. Getting your first choice scores highest; distant alternatives score lower.

1 - (distance / maxDistance)

Bias Adjustment

A small bonus or penalty (±15%) based on whether the agreed option's bias favors this party.

±(bias × 0.15)

Interactive Demo

Try the compromise algorithm yourself. Adjust each party's firmness level and selected option to see how the outcome changes.

Party A

Initiator

Stake: 68%

Selected Option

Firmness

4/5
OpenMust have

Party B

Respondent

Stake: 68%

Selected Option

Firmness

4/5
OpenMust have

Algorithm Suggestion

Balanced

Neutral middle ground

Both parties have similar stakes. The algorithm suggests a balanced middle ground.

Party A Satisfaction50%
Party B Satisfaction50%

Option Spectrum

Party A Favored
A
Slightly A-Favored
Balanced
SUGGESTED
Slightly B-Favored
Party B Favored
B

Technical Reference

The compromise engine is implemented in:

src/server/services/compromise/engine.ts

Key exports: calculateCompromise(), globalFairnessPass()