> For the complete documentation index, see [llms.txt](https://astralecosystem.gitbook.io/astralecosystemwhitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://astralecosystem.gitbook.io/astralecosystemwhitepaper/astral-ecosystem-2.0/astralswap.md).

# ASTRALSWAP

AstralSwap is a protocol for automated token exchange on ETH Network. It is designed around ease-of-use, gas efficiency, censorship resistance, and zero rent extraction. It is useful for traders and functions particularily well as a component of other smart contracts which require guaranteed on-chain liquidity. Most exchanges maintain an order book and facilitate matches between buyers and sellers. AstralSwap smart contracts hold liquidity reserves of various tokens, and trades are executed directly against these reserves. Prices are set automatically using the constant product (x\*y=k) market maker mechanism, which keeps overall reserves in relative equilibrium. Reserves are pooled between a network of liquidity providers who supply the system with tokens in exchange for a proportional share of transaction fees.

An important feature of AstralSwap is also the utilization of a factory/registry contract that deploys a separate exchange contract for each possible token. These exchange contracts each hold a reserve of BSC and their associated BEP20 or ETH with ERC20. This allows trades between the two based on relative supply. Exchange contracts are linked through the registry, allowing for direct BEP20 to BEP20 or ERC20 to ERC20 trades between any tokens using BSC or ETH as an itermediary. It’s a idealised version of Uniswap, Pancakeswap, Sushiswap that takes all best utility in the same structure and offers the same liquidity pool model. Users add pairs of tokens to liquidity pools and earn transaction fees from others who swap their tokens using the pools. It is planning to be also compatible with the other blockchains, allows you to swap ERC-20 tokens with others in near future (zkSync, Starknet,Arbitrum, Optimism).  Possible candidate network for our projects will be decided after voting in the DAO.

AstralSwap’s cryptocurrency is called SHROOM. You can easily buy and sell it on website. You can also swap other tokens for Astral Ecosystem  using AstralSwap’s liquidity pools.

$SHROOM is used for:

a. Liquidity Mining Rewards

b. Lottery Rewards

c. Governance

d. AstralSwap Ecosystem


---

# 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://astralecosystem.gitbook.io/astralecosystemwhitepaper/astral-ecosystem-2.0/astralswap.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.
