# Smart Contract Architecture

The Divergence smart contracts system includes core contracts and periphery contracts. Below are a brief overview of the contract functionalities:

***

### Core

The core contract functionalities provide the foundation for options market creation, automatic market-making and peer-to-pool interactions.

#### [Arena](https://docs.divergence-protocol.com/technical-reference/core/arena)

Deploys pools, i.e. Battles, for options tokens of specific underlying, collateral, fees and other deployment parameters.

#### [Battle](https://docs.divergence-protocol.com/technical-reference/core/battle)

Each options AMM pool is contained in a Battle contract. Battle contracts contain the core functionalities including minting and burning liquidity, trading options tokens, settling pools and claiming proceeds. The onlyManager functions are called via the Manager contract in the Periphery contracts.

#### [Oracle](https://docs.divergence-protocol.com/technical-reference/core/oracle)

Collects and updates underlying asset prices used for settling options. It retrieves asset prices and supplies them to all contracts that use them.

#### [sToken](https://docs.divergence-protocol.com/technical-reference/core/stoken)

Implements digital call and put options as Spear and Shield tokens.

***

### Periphery

Periphery contracts contain methods of interacting with core contracts. Periphery interfaces are the main handler of external calls.

#### [Manager](https://docs.divergence-protocol.com/technical-reference/periphery/manager)

Mints LP liquidity positions as non-fungible tokens. Handles the logic of adding and withdrawing liquidity. Provides functionalities that enable LPs to redeem or withdraw obligatory collateral reserves for settlement. It also facilitates trade functionalities.


---

# 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.divergence-protocol.com/technical-reference/smart-contract-architecture.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.
