> ## Documentation Index
> Fetch the complete documentation index at: https://aven-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Disputing a Work Session: Freeze Funds and Seek Resolution

> Learn when and how to dispute a submitted work session in Aven, what happens to the reserved funds on-chain, and how to reach resolution.

The dispute mechanism is a safety valve for employers. When a submitted work session does not reflect the agreed deliverables — regardless of how the timing or payment math was recorded — you can freeze the reserved funds and initiate a resolution conversation with the freelancer. This page explains when to use a dispute, what it does on-chain, and how to reach resolution.

***

## When to dispute

Disputes exist to protect you from approving work that was not delivered as agreed. Consider disputing a session when:

> **Work doesn't match deliverables**
>
> The recorded work — Git changes, changed files, commit range — does not align with what was agreed for this payment period.

> **Git changes are inconsistent**
>
> The diff shown in the report does not reflect the claimed scope of work. Files changed are unrelated, minimal, or duplicated from a previous session.

> **Inaccurate delivery statement**
>
> The freelancer's written summary misrepresents what was actually done during the session.

> **Scope disagreement**
>
> Both parties disagree about whether the session satisfied the agreed-upon deliverable for this milestone.

> [!NOTE]
>
> The payment **amount** is always contract-enforced (`active seconds × stream rate`, capped by escrow). Disputes are about work quality and deliverables — not the arithmetic. You cannot dispute the calculated payment figure; only the contract can change it.

***

## How to dispute

**1. Navigate to the stream page**

Go to `/stream/[id]` for the relevant engagement. Find it quickly from your [dashboard](https://aven-chi.vercel.app/dashboard).

**2. Open the work session report**

Select the **WORK SESSIONS** tab and click the `Reserved` session you want to contest. Review the full report — timing, Git changes, and delivery statement — before proceeding.

**3. Click Dispute**

Select the **Dispute** button. The action is recorded on-chain immediately.

**4. Reservation is frozen**

The session's `WithdrawalStatus` transitions to `Disputed`. The reserved amount is frozen in the stream contract escrow. The freelancer cannot withdraw the funds, and the automatic timeout (`finalize_timeout`) does not apply to disputed sessions.

***

## Dispute flow

```mermaid theme={null}
flowchart TD
  A[Session submitted] --> B[Verifier reserves payment]
  B --> C[Employer reviews]
  C -->|Dispute| D[Reservation frozen]
  D --> E[Employer and freelancer communicate off-chain]
  E --> F{Resolution}
  F -->|Agreement reached| G[Employer approves]
  G --> H[Payment released]
  F -->|No agreement| I[Session remains disputed]
```

***

## What a dispute does on-chain

When you click **Dispute**, the following happens at the contract level:

| Effect | Details |
| - | - |
| **WithdrawalStatus → Disputed** | The session record in the stream contract is updated to `Disputed`, preventing any withdrawal call from succeeding. |
| **Reserved amount frozen** | The funds that were set aside for this session remain locked in escrow. They are not returned to you automatically. |
| **Worker withdrawal blocked** | The freelancer cannot call `withdraw_approved` or trigger any automatic release while the session is disputed. |
| **Timeout suspended** | The `finalize_timeout` path is blocked for disputed sessions — the payment will not release automatically. |

***

## Resolution

Currently, Aven does not include an on-chain arbitration mechanism. Resolution requires direct communication between you and the freelancer outside of the Aven platform. Once you reach an agreement:

**If you agree the work was satisfactory (fully or partially):**

* Return to the stream page and click **Approve** on the disputed session.
* The contract releases the reserved amount to the freelancer's wallet.
* An attestation is minted as with any normal approval.

**If no agreement is reached:**

* The session remains in `Disputed` status indefinitely.
* The frozen reservation stays in escrow until the dispute is resolved.
* Neither party can access the frozen funds while the dispute is open.

> [!NOTE]
>
> Resolution requires both parties to communicate and reach agreement outside of Aven. Keep records of your project agreement and any relevant communications — they will inform the resolution conversation.

***

## Outstanding withdrawals and final delivery

A disputed session with frozen funds counts as an **outstanding withdrawal**. This has a direct impact on project completion:

* You cannot submit a `--ended` (final project) session while any session is in `Pending`, `Reserved`, or `Disputed` status.
* All outstanding sessions must be resolved — approved or otherwise cleared — before the final session can be submitted and the remaining escrow settled.

> [!WARNING]
>
> Disputed sessions block final project delivery. Resolve all pending disputes before submitting a `--ended` session.

> [!NOTE]
>
> The dispute mechanism protects employers from approving work that was not delivered. It does not modify the payment amount — the contract enforces exact amounts based on active seconds and the stream rate. A dispute freezes the session; it does not recalculate or reduce the payment figure.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.