# Marginly

## Marginly

- [Introduction ](https://docs.marginly.com/introduction.md): High level overview of the Marginly protocol.
- [How to](https://docs.marginly.com/app/how-to.md): Find out how to use Marginly app
- [Connect a wallet](https://docs.marginly.com/app/how-to/connect-a-wallet.md): Learn how to connect a wallet to Marginly
- [Swap](https://docs.marginly.com/app/how-to/swap.md): Learn how to swap assets in Marginly
- [Approve Spending](https://docs.marginly.com/app/how-to/approve-spending.md): Learn how to approve spending in Marginly
- [Open a Long Position](https://docs.marginly.com/app/how-to/open-a-long-position.md): Learn how to open a long position in Marginly
- [Open a Short Position](https://docs.marginly.com/app/how-to/open-a-short-position.md): Learn how to open a short position in Marginly
- [Withdraw Funds](https://docs.marginly.com/app/how-to/withdraw-funds.md): Learn how to withdraw funds from an open position in Marginly
- [Add Funds](https://docs.marginly.com/app/how-to/add-funds.md): Learn how to add funds to an open position in Marginly
- [Close Position](https://docs.marginly.com/app/how-to/close-position.md): Learn how to close a position in Marginly
- [Increase Leverage](https://docs.marginly.com/app/how-to/increase-leverage.md): Learn how to increase position leverage in Marginly
- [Pay Off Debt](https://docs.marginly.com/app/how-to/pay-off-debt.md): Learn how to pay off debts in Marginly
- [Deposit Liquidity](https://docs.marginly.com/app/how-to/deposit-liquidity.md): Learn how to provide liquidity to a pool in Marginly
- [Withdraw Liquidity](https://docs.marginly.com/app/how-to/withdraw-liquidity.md): Learn how to take liquidity out of a pool in Marginly
- [Add Liquidity](https://docs.marginly.com/app/how-to/add-liquidity.md): Learn how to increase a position in a liquidity pool
- [Smart contract addresses](https://docs.marginly.com/app/smart-contract-addresses.md): Contains addresses for every blockchain Marginly is deployed on
- [Arbitrum](https://docs.marginly.com/app/smart-contract-addresses/arbitrum.md)
- [Blast](https://docs.marginly.com/app/smart-contract-addresses/blast.md)
- [FAQ](https://docs.marginly.com/app/faq.md): Some of the most frequently asked questions are answered here
- [Providing Liquidity](https://docs.marginly.com/protocol-mechanics/providing-liquidity.md): This page describes how users put liquidity into Marginly pools.
- [Trading](https://docs.marginly.com/protocol-mechanics/trading.md): this page describes leveraged trading mechanics inside marginly protocol.
- [Marginly MAX leverage specifics](https://docs.marginly.com/protocol-mechanics/marginly-max-leverage-specifics.md)
- [Overview](https://docs.marginly.com/protocol-architecture/overview.md)
- [Pools](https://docs.marginly.com/protocol-architecture/pools.md)
- [Pool variables](https://docs.marginly.com/protocol-architecture/pools/pool-variables.md): These are the variables and aggregates that the Marginly protocol keeps track of inside its smart-contracts
- [Pool parameters](https://docs.marginly.com/protocol-architecture/pools/pool-parameters.md): These are parameters that control protocol risk and earnings and may be changed via Marginly governance.
- [User positions](https://docs.marginly.com/protocol-architecture/pools/user-positions.md): User positions inside Marginly have following parameters:
- [User actions](https://docs.marginly.com/protocol-architecture/pools/user-actions.md): Description of all user-facing and internal auxiliary functions available inside the Marginly protocol
- [Pool Factory API](https://docs.marginly.com/protocol-architecture/pools/pool-factory-api.md): This a factory smart-contract for deploying Marginly pools.
- [Pool API](https://docs.marginly.com/protocol-architecture/pools/pool-api.md): Pool API description
- [TWAP oracle](https://docs.marginly.com/protocol-architecture/twap-oracle.md)
- [Loan pricing](https://docs.marginly.com/protocol-architecture/loan-pricing.md): This page describes how Marginly prices loans.
- [Errors](https://docs.marginly.com/protocol-architecture/errors.md)
- [Marginly SDK](https://docs.marginly.com/protocol-architecture/marginly-sdk.md): Allows to biuld  contract calls and use  math calculations for applications on top of Marginly.
- [Router architecture](https://docs.marginly.com/router/router-architecture.md)
- [Adapters](https://docs.marginly.com/router/adapters.md)
- [ApeSwapAdapter](https://docs.marginly.com/router/adapters/apeswapadapter.md)
- [BalancerAdapter](https://docs.marginly.com/router/adapters/balanceradapter.md)
- [CamelotAdapter](https://docs.marginly.com/router/adapters/camelotadapter.md)
- [KyberSwapClassicAdapter](https://docs.marginly.com/router/adapters/kyberswapclassicadapter.md)
- [KyberSwapElasticAdapter](https://docs.marginly.com/router/adapters/kyberswapelasticadapter.md)
- [UniswapV2Adapter](https://docs.marginly.com/router/adapters/uniswapv2adapter.md)
- [UniswapV3Adapter](https://docs.marginly.com/router/adapters/uniswapv3adapter.md)
- [WooFiAdapter](https://docs.marginly.com/router/adapters/woofiadapter.md)
- [Risk Management Overview](https://docs.marginly.com/risk-management/risk-management-overview.md): This section describes how Marginly manages risks
- [Keeper service and smart contract description](https://docs.marginly.com/risk-management/keeper-service-and-smart-contract-description.md): Learn how Keeper service handles liquidations
- [Keeper contract architecture](https://docs.marginly.com/risk-management/keeper-contract-architecture.md)
- [Liquidations and Deleveraging](https://docs.marginly.com/risk-management/liquidations-and-deleveraging.md): This page describes mechanics behind Marginly's liquidations and deleveraging
- [Volatility as risk proxy](https://docs.marginly.com/risk-management/volatility-as-risk-proxy.md): This page explains some of the details of measuring volatility and sheds light on the type of analysis Marginly performs for measuring protocol risks.
- [Insurance pool](https://docs.marginly.com/risk-management/insurance-pool.md)
- [Shutdown mode](https://docs.marginly.com/risk-management/shutdown-mode.md)
- [Marginly economics](https://docs.marginly.com/economics/marginly-economics.md): Description of protocol cashflows and future plans for the tokenomics
- [Beyond Marginly v1](https://docs.marginly.com/future-plans/beyond-marginly-v1.md): This page describes team's vision on future protocol enhancements
- [Some ideas for Marginly v2](https://docs.marginly.com/future-plans/some-ideas-for-marginly-v2.md): Risks of leveraged trading and how Marginly addresses them
- [Trading Contest FAQ](https://docs.marginly.com/trading-contest-faq.md)
- [Audit](https://docs.marginly.com/audit.md): By Quantstamp


---

# 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, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on a page URL with the `ask` query parameter:
```
GET https://docs.marginly.com/introduction.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.
