# Advanced Smart Contracts

The Sommelier protocol, like many protocols, is relatively simple in principle but carries many nuances especially as the protocol evolves to newer versions.

This section includes details revolving around the core contracts mentioned in the ["Protocol (V2) Contract Architecture"](/sommelier-documentation/smart-contracts/protocol-v2-contract-architecture.md) section (and APIs), Fees and Reserves, Cellar Deployment, the use of a CellarRouter, and older versions of the Cellar Architecture (v1.5). The section will be updated with subsections as the project continues to evolve.


---

# 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://sommelier-finance.gitbook.io/sommelier-documentation/smart-contracts/advanced-smart-contracts.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.
