# Price Oracle

Tarot uses the Tarot Price Oracle to reliably calculate the value of LP tokens and determine how much collateral is necessary for borrowing and leverage.

Tarot Price Oracle works with any Uniswap V2-compatible token pair, commonly supported by DEXs. It calculates the time-weighted average price (TWAP) by using the pair’s built-in price accumulators, over a period of at least 1,200 seconds (20 minutes). This is accomplished using the pair’s current price and a previously-observed price (stored within the oracle’s contract) from at least 20 minutes prior.

More information on the Tarot Price Oracle and pricing LP tokens can be found on Medium:

* [Tarot Price Oracle: On-Chain & Manipulation-Resistant](https://tarotfinance.medium.com/tarot-price-oracle-on-chain-manipulation-resistant-deb681c885a4)
* [Tarot Deep Dive: Part Two](https://tarotfinance.medium.com/tarot-deep-dive-part-two-dc2fae74aa3f)


---

# 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.tarot.to/tarot-protocol/price-oracle.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.
