> For the complete documentation index, see [llms.txt](https://developer.xwin.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.xwin.finance/overview/smart-contract-overview.md).

# Smart Contract Overview

<figure><img src="/files/QiQgNiEvc4uapzuZg90r" alt=""><figcaption></figcaption></figure>

**xWin FundFactory:** The purpose of this smart contract is to deploy various funds that the user requests. This fund factory will keep track of all the funds as well as many of the administrative controls for the funds.&#x20;

**xWin Fund:** Each of these smart contracts can be a public or private fund for a user. The fund can allow users to invest in xWin strategies as well as individual tokens. It also allows the users to rebalance through the xWin Finance Website or through our SDK.&#x20;

**xWin Pricemaster:** Pricemaster is a helper smart contract that ensures the price of the tokens and strategies are correct. It does this by utilizing Chainlink Price Oracle to ensure that the price does not get arbitraged.&#x20;

**xWin Swap:** xWin Finance has its own swap engine that uses various DEFI swap protocols in order to get the best prices.&#x20;

**xWin Emit Event:** This contract is used to emit events that occur on all the other smart contracts. This makes it easier to track the events that occur in other smart contracts.&#x20;

**xWin Strategies:** xWin Finance offers strategies for investors to use that vary significantly in terms of functionality. However, all the strategies follow a similar pattern and fee structure.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developer.xwin.finance/overview/smart-contract-overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
