|
| 1 | +--- |
| 2 | +title: Deal |
| 3 | +description: |
| 4 | + Understand how deals coordinate the iExec network actors to execute |
| 5 | + computations securely and distribute payments |
| 6 | +--- |
| 7 | + |
| 8 | +# Deal |
| 9 | + |
| 10 | +A **deal** is the core coordination mechanism in the iExec network. It brings |
| 11 | +together all the necessary components—requesters, applications, data, and |
| 12 | +computational resources to execute secure computations in TEE environments. |
| 13 | + |
| 14 | +## What is a Deal? |
| 15 | + |
| 16 | +When you want to run a computation on iExec, you don't directly interact with |
| 17 | +workers or applications. Instead, the **PoCo (Proof of Contribution)** |
| 18 | +decentralized smart contract automatically creates a deal that: |
| 19 | + |
| 20 | +- Matches your request with compatible resources |
| 21 | +- Coordinates all network actors (requester, app provider, data provider, |
| 22 | + workerpool) |
| 23 | +- Ensures secure execution in TEE environments |
| 24 | +- Handles result delivery |
| 25 | +- Manages payment distribution |
| 26 | + |
| 27 | +## Deal Execution Flow |
| 28 | + |
| 29 | +When a deal is triggered, the following sequence occurs: |
| 30 | + |
| 31 | +1. **Request Creation**: Requester submits a computation request with parameters |
| 32 | +2. **Resource Matching**: PoCo system matches the request with available |
| 33 | + applications, data, and computational resources |
| 34 | +3. **Deal Creation**: When the system finds compatible resources, it creates a |
| 35 | + deal containing multiple tasks |
| 36 | +4. **Task Distribution**: Selected workerpool manager distributes tasks to their |
| 37 | + workers |
| 38 | +5. **Secure Execution**: Workers download the iApp and execute it in TEE |
| 39 | + environments |
| 40 | +6. **Data Processing**: iApp processes protected data without accessing raw |
| 41 | + content |
| 42 | +7. **Result Generation**: Computation results are generated |
| 43 | +8. **Result Delivery**: Results are returned to the requester through the |
| 44 | + network |
| 45 | +9. **Payment Settlement**: RLC tokens are distributed to all participants |
| 46 | + |
| 47 | +## Network Architecture |
| 48 | + |
| 49 | +The diagram below illustrates how different actors interact in the iExec |
| 50 | +network: |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +## Detailed Interaction Flow |
| 55 | + |
| 56 | +1. **Request Submission**: Requester creates a request specifying the iApp, |
| 57 | + Protected Data, and other parameters |
| 58 | +2. **PoCo Processing**: PoCo system validates the request and matches available |
| 59 | + resources |
| 60 | +3. **Deal Creation**: When resources are matched, PoCo creates a deal containing |
| 61 | + tasks |
| 62 | +4. **Secure Environment Setup**: Workers initialize TEE environments and |
| 63 | + download the iApp |
| 64 | +5. **Data Access**: iApp requests access to protected data through secure |
| 65 | + channels |
| 66 | +6. **Computation**: iApp processes data within the TEE, maintaining privacy |
| 67 | +7. **Payment Distribution**: RLC tokens are distributed to all participants |
| 68 | + based on completed tasks |
| 69 | + |
| 70 | +This decentralized architecture ensures that no single entity has control over |
| 71 | +the entire process, while the use of TEEs guarantees that sensitive data remains |
| 72 | +protected throughout the computation. |
0 commit comments