# Contract Functions

Reya Protocol is separated into 3 main components:

* Core - the margin engine contract which imposes margin requirements and coordinates liquidations, manages margin accounts and their collateral holdings
* Passive Perp Instrument - manages perpetual future markets, pricing of market orders executed against the passive pool, matching as well as keeping track of account exposures and PnLs in available markets
* Passive Pool - liquidity pool which allows anyone to stake rUSD and get pool shares in return (currently pool shares are not available as tokens, but are rather just trackers in the contract). The share price of the pool is dependent on its PnL and fees from trades executed against passive perp traders.


---

# 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.reya.xyz/technical-docs/contract-functions.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.
