> For the complete documentation index, see [llms.txt](https://dappos.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dappos.gitbook.io/docs/dappos/others/dappos-v3-retired/execution-layer/ii.-how-dappos-intent-execution-network-works.md).

# II. How DAPPOS Intent Execution Network Works

DAPPOS intent execution network is designed to simplify and optimize the process of executing user intents on the blockchain. By leveraging the innovative Optimistic Minimum Staking (OMS) mechanism and integrating various roles within the network, DAPPOS ensures efficient and secure execution of intents<br>

### Optimistic Minimum Staking

The core of DAPPOS intent execution network is the Optimistic Minimum Staking (OMS) mechanism, an innovative solution perfectly tailored for intent-based tasks. OMS links each intent task to a predefined value and potential compensation in case of failure, allowing tasks to be executed before their outcomes are verified.

In DAPPOS, intents are essentially framed as “provide C, want X, get Y when fail.” This means that if a task fails, the network employs a consensus process to penalize the responsible service provider, ensuring that either the user's task is successfully executed or the user receives the predetermined compensation. Additionally, intents within the DAPPOS network require that the success of intent task execution can be clearly and objectively determined on-chain, eliminating subjective disagreements. This ensures transparency and consistency in the evaluation of task outcomes, further strengthening the reliability of the network.

The critical innovation here is the asynchronous nature of C and X in this framework. The service provider can first receive C (the resources provided) from the user and then take the necessary steps to achieve X (the desired outcome), with the assurance that if they fail, Y (the compensation) will be provided to the user.

This asynchronous handling of C and X significantly expands the solution space for service providers. They are not constrained to synchronous, immediate actions but can leverage more complex, multi-step processes that might involve both on-chain and off-chain methods to fulfill the user's intent.

The OMS mechanism offers significant advantages to both service providers and users. The key benefits of OMS include:

1. Generalizability of Intent Tasks: OMS supports a wide variety of intent tasks, as long as they can be validated by on-chain rules. This broad applicability allows for numerous use cases, making the network versatile and adaptable. By leveraging on-chain validation, DAPPOS ensures that the execution of intents is transparent, secure, and consistent across different scenarios.
2. Expanded Solution Space: OMS allows service providers to use any method to fulfill the user’s intent as long as the final result is achieved. For instance, if a user wants to purchase a large amount of an asset, the service provider can choose the most efficient route, whether it's using on-chain exchanges, off-chain centralized exchanges like Binance, or over-the-counter (OTC) desks. This flexibility significantly broadens the range of possible solutions, enabling service providers to find the most cost-effective and timely methods.
3. Enhanced Capital Efficiency: Service providers only need to stake a minimal amount of collateral relative to the total value of ongoing intent tasks, and they can take user’s C(the resources provided) first and execute the intent later. This reduces the capital burden on service providers and allows them to utilize their funds more efficiently. They can freely deploy and utilize their working capital as long as they can fulfill the user’s intent.
4. Guaranteed Execution Speed: Execution speed is a critical component of the DAPPOS network, ensured through a predefined parameter within each intent. If a task is not completed within the specified time frame, it is automatically deemed a failure, and the user is compensated. This time-bound approach ensures that users are not left waiting indefinitely for their intents to be executed. It also incentivizes service providers to prioritize timely execution, knowing that delays will result in penalties and loss of collateral.&#x20;
5. Scalability and Security: The OMS system ensures that tasks are either completed successfully or the users are compensated adequately. This model guarantees that the network can handle a wide variety of tasks without compromising security. By focusing on the final outcome and using a robust consensus mechanism to validate task completion, DAPPOS maintains a high level of security while supporting scalable operations. The system's high tolerance for verification time and low-risk exposure ensure that tasks can be verified efficiently and securely, promoting a resilient and scalable network.

The OMS mechanism aligns the interests of service providers and users, fostering a reliable and efficient ecosystem. By ensuring that tasks are either completed successfully or compensated appropriately, OMS establishes a robust framework for intent execution, driving the adoption of intent-based interactions within the blockchain space.

### Participants in Intent Execution Network

Before diving into the detailed workflow of the DAPPOS intent execution network, it is essential to introduce the three primary participants within the network:

<img src="https://2617172943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOiUs3dwRaLnnk3PNO6EB%2Fuploads%2FxGiR1Ln4edIvBzvyZ6Z0%2Funknown.png?alt=media&amp;token=1604df19-98e5-4bc6-80bf-27c79434480e" alt="" height="420" width="624">

<br>

**Service Provider**

The service provider is the entity responsible for executing the user's intent. Service providers must stake collateral to take on tasks within the network, and the total value of the tasks they accept cannot exceed a certain proportion of their collateral. When a user's task is successfully completed and validated by the network, the reduction in the current total value of the service provider's tasks is acknowledged by other network participants, allowing the service provider to accept new tasks.

**Execution Validator**

Execution validators play a crucial role in verifying whether a user's intent has been successfully executed. These validators must stake a significant amount of tokens as collateral within the network. By continuously participating in verification tasks, execution validators earn token rewards. If they fail to provide timely validation results or if they submit incorrect validation outcomes, they face penalties. Their role is vital to maintaining the integrity and accuracy of the network's operations.

**Matcher**

Matchers are advanced execution validators with additional responsibilities. Besides verifying the execution results, matchers are also tasked with pairing and matching users with suitable service providers. This dual role requires matchers to stake even more assets within the network.&#x20;

Each service provider must select one or more matchers upon registration. Matchers ensure that the network operates smoothly by facilitating the interaction between users and service providers, enhancing the efficiency and reliability of the intent execution process.

<br>

These three roles—service providers, execution validators, and matchers—form the backbone of the DAPPOS intent execution network. Each participant plays a distinct and crucial part in ensuring that user intents are executed efficiently, accurately, and securely.

### Workflow of Intent Execution Network

The DAPPOS intent execution network operates through a structured workflow, consisting of three main phases: Counterparty matching, execution, and verification.

<img src="https://2617172943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOiUs3dwRaLnnk3PNO6EB%2Fuploads%2FaopNlv8SZVo3hv8XB89m%2Funknown.png?alt=media&amp;token=c15b1cf8-dcd3-496d-8613-8550dcd14c35" alt="" height="351" width="624">

**Phase One: Counterparty Matching**

When a user defines their intent, they can query any matcher within the network. The matcher will return execution quotes from the connected service providers for the specified intent. Once the user selects the most optimal quote, the intent deal is finalized. The user then only needs to monitor the success of their task; if it fails, they will receive compensation.&#x20;

For convenience, DAPPOS has developed a series of intent task frameworks. When users interact with partner infrastructure or dApps of DAPPOS, their intents are automatically generated by the intent task frameworks. Users can then view quotes from various service providers within the dApp and select the most appealing option.&#x20;

**Phase Two: Execution**

After the intent deal is finalized, the service provider will receive C(what user provides for the intent), and take responsibility for fulfilling the X(what user wants in the intent).

DAPPOS Intent Execution Network does not care about how the service provider completes the intent task; it only cares about whether the result is successfully achieved. Unlike many other intent-related projects where intent solvers are limited to on-chain solutions, DAPPOS allows service providers to choose from a broader range of solutions. This flexibility may offer users better options.

**Phase Three: Verification**

Service providers can proactively report the completion of their tasks. If they do not, execution validators will verify the success of the intent after the specified time within the intent.

If the task is detected as failed, execution validators can issue a challenge to the network. All execution validators will then vote according to a Delegated Proof of Stake (DPOS) mechanism to reach a consensus. If the consensus determines that the intent task has failed, the service provider's collateral will be used to compensate the user and reward the challenger. If the consensus confirms that the intent task was successfully executed, the challenger will be penalized.

If the task is successful, which means that nobody issues any challenge about the success, the corresponding task value for the service provider will be released.&#x20;

Through these phases, DAPPOS ensures a seamless, efficient, and user-centric process for executing intents. The structured workflow not only simplifies user interactions but also maintains the network's integrity and reliability.

<br>
