# Arbitraging

If pools are imbalanced for swaps or perpetuals, arbitrage opportunities may arise, allowing traders to profit while helping to balance the pools.

For perpetual contracts, arbitrage can be done through positive price impacts and funding fees.

For example, if there are more SEI long positions than short positions, there will be a positive price impact when opening SEI short positions, resulting in a better entry price than the current market price. The position will also earn funding fees while it remains open.

If the situation reverses, with more shorts than longs after some SEI long positions close, there will be a positive price impact when closing the long positions, resulting in a better exit price.

In markets where the index token is the same as the collateral token (e.g., using SEI as collateral in the SEI perpetual market), delta-neutral positions can be opened by using the collateral token to open a short position. Conversely, when arbitraging long positions, a 1x long position can be opened using a stablecoin as collateral, providing 1x exposure to the index token.

It's important to note that as the long and short positions become balanced, funding fees tend to zero, so this should be considered when determining the size of the arbitrage position.


---

# 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.onlyperps.com/welcome-to-onlyperps/trading/arbitraging.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.
