<!-- canonical: https://docs.melee.markets/resolver-api/lifecycles | markdown: https://docs.melee.markets/resolver-api/lifecycles.md | index: https://docs.melee.markets/llms.txt -->
# Resolution walk-throughs

For how a market becomes yours in the first place, see [Market acceptance](/resolver-api/acceptance).

## Non-disputable resolver

```mermaid
sequenceDiagram
    participant M as Melee
    participant R as Resolver
    participant C as Solana
    Note over M,C: Market accepted, launched and trading
    M->>R: POST trigger at endDate plus offset
    loop until result known
        M->>R: GET status for market
        R-->>M: status Resolving
    end
    R->>M: POST resolve with outcome and definitionHash
    M-->>R: transaction propose plus resolve, expiresAt
    R->>M: POST transactions with signedTransaction
    M->>C: broadcast
    C-->>M: confirmed Resolved
    M-->>R: signature and status Confirmed
    M->>R: POST lifecycle Resolved
```

## Disputable resolver

```mermaid
sequenceDiagram
    participant M as Melee
    participant R as Resolver
    participant C as Solana
    M->>R: POST trigger
    R->>M: POST propose with outcome and definitionHash
    M-->>R: transaction propose
    R->>M: POST transactions
    M->>C: broadcast, proposal standing, trading continues
    Note over R: Dispute window runs on your side. Report Dispute or Resolving via status
    R->>M: POST resolve with the same outcome and definitionHash
    M-->>R: transaction resolve
    R->>M: POST transactions
    M->>C: broadcast Resolved
```

## Changing a standing proposal

```mermaid
sequenceDiagram
    participant R as Resolver
    participant M as Melee
    participant C as Solana
    Note over C: Proposal for outcome 0 standing
    R->>M: POST propose with outcome 1
    alt proposer key equals resolver key
        M-->>R: transaction reject plus propose
        R->>M: POST transactions
    else distinct proposer key
        M-->>R: transaction A reject signed by resolver
        R->>M: POST transactions for A
        R->>M: POST propose with outcome 1 again
        M-->>R: transaction B propose signed by proposer
        R->>M: POST transactions for B
    end
    M->>C: broadcast, proposal for outcome 1 standing
```

Calling `resolve` with an outcome different from the standing proposal returns `409 proposal_mismatch`;
change the proposal first. Non-disputable resolvers never hold a standing proposal, so this section does not
apply to them unless a previous resolve transaction was only partially confirmed (see
[Failure modes](/resolver-api/errors)).

## Void

```mermaid
sequenceDiagram
    participant R as Resolver
    participant M as Melee
    participant C as Solana
    R->>M: POST void with definitionHash
    M-->>R: transaction propose void plus resolve void
    R->>M: POST transactions
    M->>C: broadcast Voided, traders refunded
    M->>R: POST lifecycle Voided with reason ResolverVoided
```

Void is available while the market is live or has a standing proposal, from its `earliestProposalTs` on the
current program (see [Contract versions](/resolver-api/reference#contract-versions)).

## Platform void

```mermaid
sequenceDiagram
    participant M as Melee
    participant R as Resolver
    participant C as Solana
    Note over M: Drift detected, or an operator asks for a void
    Note over M: Void planned, sent once timeoutTs plus 24 hours has passed
    M->>C: void with the market's timeout authority
    C-->>M: Voided
    M->>R: POST lifecycle Voided with reason PlatformVoided and platformVoidReason
```

**Melee never voids a market for time.** A market that is late, or whose status polls fail, stays yours to
resolve. Melee voids a market only for one of these reasons:

| `platformVoidReason` | When |
|---|---|
| `AuthorityDrift` | The market's on-chain resolution or proposer authority no longer matches the keys you accepted. |
| `DefinitionDrift` | The market's on-chain outcome count no longer matches the definition you accepted. |
| `Operator` | Melee intervenes: an admin voids the market, or Melee [suspends](/resolver-api/registration#suspension) its resolver and voids its open markets. |

The program lets Melee's timeout authority void a market only from its `timeoutTs`, so a planned void never lands
earlier: Melee sends it once `timeoutTs` plus a 24-hour grace has passed. Until then you can still resolve or void
the market yourself. While a transaction Melee issued to you for that market (propose, resolve or void) is
outstanding or submitted, the void waits. On a live market with no proposal, Melee proposes and resolves void in
one transaction; with a standing proposal, it resolves void. See
[Lifecycle notifications](/resolver-api/lifecycle).
