Skip to content

omeganetwork-tech/soroban-amm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Aquarius

Aquarius protocol is governed by DAO voting with AQUA tokens. Vote and participate in discussions to shape the future of Aquarius.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. Competitive Audit
  5. Contact

About The Project

Aquarius Screen Shot

What is Aquarius?

Aquarius is a liquidity layer built on top of the Stellar network. Using a governance system powered by the AQUA token, holders can vote on proposals to change how the Aquarius protocol functions and vote for which Stellar DEX & AMM markets are incentivized with AQUA rewards. Top-voted markets see their liquidity providers receive hourly rewards paid in AQUA, creating a way to earn extra rewards when supporting markets on Stellar.

What's the Soroban?

Soroban is a smart contracts platform designed to be sensible, built-to-scale, batteries-included, and developer-friendly.

Soroban-powered AMMs

We plan to use Soroban to build Automated Market Maker (AMM) smart contracts and the distribution engine for AQUA liquidity rewards. AQUA rewards will incentivize users to provide liquidity to the Soroban AMM. The distribution engine will run as a set of Soroban smart contracts and will calculate and distribute liquidity rewards to LPs accordingly.

Smart Contracts

  • liquidity_pool - Exchange liquidity pool based on constant product formula (xy=k)
  • liquidity_pool_stableswap - Exchange liquidity pool designed for extremely efficient stablecoin trading and low risk, supplemental fee income for liquidity providers, without an opportunity cost. It allows users to trade between correlated cryptocurrencies with a bespoke low slippage, low fee algorithm.
  • token - SEP-0041 compatible token smart contract designed for liquidity pool share management
  • liquidity_pool_router - entry point and catalogue of liquidity pools which is capable to deploy new pools if necessary
  • liquidity_pool_plane - contract designed to store minimum information about any liquidity pool: type, parameters, reserves. being updated on every action with the pool (deposit, swap, withdraw, parameters update, etc)
  • liquidity_pool_liquidity_calculator - smart contract containing pools liquidity calculation logic which is capable to compare many pools at once

Smart Contracts diagram

(back to top)

Smart Contract Admin Roles

Owner

  • Description: Can upgrade the code of the underlying smart contracts, remove or add addresses for any of the other roles, etc.
  • Privileges:
    • Upgrade code
    • Transfer ownership
    • Privileged address management
    • Manage internal contracts addresses: Plane, Liquidity Calculator
    • Change pools & token wasm hash for pools factory
    • Update reward token address
    • Configure pool creation fee

Pause Admin

  • Description: Can pause/unpause the execution of the entire protocol, or of a specific component (router, liquidity pool) within it.
  • Privileges:
    • Pause pool deposits
    • Pause pool swaps
    • Pause pool claims
    • Unpause pool deposits
    • Unpause pool swaps
    • Unpause pool claims

Operations Admin

  • Description: Can add/remove pools, adjust certain parameters (e.g., like A in a stablecoin pool), and collect/donate fees.
  • Privileges:
    • Remove pool from router
    • Stableswap pool: Ramp A, stop ramping, set fee

Rewards Admin

  • Description: Configure and distribute global rewards.
  • Privileges:
    • Set rewards rate
    • Distribute outstanding reward among pools

Emergency Pauser

  • Description: Can stop the execution of the entire protocol, or of a specific component (router, liquidity pool) within it. More selectively, it can also shutdown specific functions like deposit/withdrawal or swapping.
  • Privileges:
    • Pause pool deposits
    • Pause pool swaps
    • Pause pool claims
  • Security: There can be multiple addresses which have it, and it can also be given to off-chain monitoring tools or firms.

Built With

(back to top)

Getting Started

Prerequisites

Development setup

Clone project

git clone [email protected]:AquaToken/soroban-amm.git

Build contracts

task build

Run tests

task test

(Optionally) Deploy & invoke contracts via soroban-cli

check the Soroban documentation: https://soroban.stellar.org/docs/reference/rpc

(back to top)

Privileged actions

Emergency Pause Admin

- Pause pool deposits
- Pause pool swaps
- Pause pool claims

Pause Admin

- All the available for Emergency Pause Admin
- Unpause pool deposits
- Unpause pool swaps
- Unpause pool claims

Operations Admin

- Remove pool from router
- Stableswap pool: Ramp A, stop ramping, set fee 

Rewards Admin

- Set rewards rate
- Distribute outstanding reward among pools

Owner (Admin)

- All the available for roles above
- Upgrade code
- Transfer ownership
- Privileged address management
- Manage internal contracts addresses: Plane, Liquidity Calculator
- Change pools & token wasm hash for pools factory
- Update reward token address
- Configure pool creation fee

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Competitive Audit

Auditors are expected to demonstrate each finding with code. To make that painless we ship an end‑to‑end test harness that deploys clean contracts and lets you focus on writing failing assertions. Just edit integration_tests/src/tests.rs

# run the whole suite (faster with --release)
$ cargo test -p integration-tests

Contact

Email: [email protected] Telegram chat: @aquarius_HOME Telegram news: @aqua_token Twitter: @aqua_token GitHub: @AquaToken Discord: @Aquarius Reddit: @AquariusAqua Medium: @aquarius-aqua

Project Link: https://github.com/AquaToken/soroban-amm

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%