Skip to main content

What are Deals?

Deals are the foundation of the IOTA Repstation system. They represent agreements between two parties (Party A and Party B) that enable mutual rating after completion. Every rating in the system must be tied to a specific deal, ensuring accountability and preventing spam ratings.

Deal Lifecycle

Deals follow a strict three-state lifecycle:
1

PENDING

Deal is created by Party A but not yet accepted by Party B.
  • Only Party A can modify or cancel
  • No ratings allowed
  • Party B can accept to move to ACTIVE
2

ACTIVE

Both parties have agreed to the deal terms.
  • Deal is locked and cannot be modified
  • No ratings allowed yet
  • Either party can close the deal
3

CLOSED

Deal has been completed and closed.
  • Both parties can now rate each other
  • Deal cannot be reopened
  • Ratings can be updated or revoked

Deal Components

Participants

Each deal has exactly two participants:
  • Party A: The deal initiator (usually the service requester)
  • Party B: The deal acceptor (usually the service provider)

Subject Reference

Every deal includes a subject reference that identifies what the deal is about:
Common Subject Types:
  • NFT - Non-fungible token transactions
  • SERVICE - Service agreements
  • ORDER - Purchase orders
  • LOAN - Lending agreements
  • ESCROW - Escrow services

Deal Amount

The monetary value associated with the deal, stored as a string to handle large numbers:

Creating Deals

Admin-Created Deals

Applications with admin capabilities can create deals directly:

Client-Created Deals

Users with client capabilities can create deals:

Deal Acceptance

Only Party B can accept a pending deal:
Once a deal is accepted, it cannot be modified. Ensure all terms are agreed upon before acceptance.

Deal Completion

Either party can close an active deal:

Deal States and Permissions

Best Practices

1. Clear Subject References

Use descriptive and unique subject references:

2. Accurate Amounts

Always specify the correct deal amount:

3. Timely Deal Closure

Close deals promptly when work is completed to enable rating:

Error Handling

Common deal-related errors and solutions:

Integration Patterns

E-commerce Integration

Service Platform Integration

Next Steps

Rating System

Learn how to create and manage ratings after deal completion.

Reputation Profiles

Understand how ratings build into reputation profiles.

API Reference

Explore the complete deal management API.

Integration Examples

See real-world implementation patterns.