# Execution gap

CVI v4 now supports opening/closing positions in near real-time (several seconds) via a new position execution logic. Instead of using the CVI oracle value as the sole price for settling trades, a secondary oracle is used in parallel to fetch the raw real-time CVI value. A combination of the two values is used to safely and reliable execute trades in real-time, while preventing front-running the CVI oracle.\
\
The CVI oracle value is computed by Chainlink's decentralised oracle network and includes an adaptive exponential moving average in order to increase its reliability. \
In parallel to it, the raw cvi value is updated in real-time and is pulled on-demand whenever a trader executes a trade.\
\
The execution logic works as follows:\
\
Price for opening a position = Max(CVI Oracle value, Raw CVI value)\
Price for closing a position = Min(CVI Oracle value, Raw CVI value)\
\
Execution gap = Math.abs(1 - CVI Oracle value / Raw CVI Value)<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cvi.finance/cvi-ecosystem/cvi-v4/execution-gap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
