Osmosis
๐ Connector Info¶
- Exchange Type: Decentralized Exchange (DEX)
- Market Type: Automatic Market Maker (AMM)
Component | Status | Notes |
---|---|---|
2๏ธโฃ AMM Connector | โ | |
3๏ธโฃ Range AMM Connector | โ | |
๐ฏ AMM Data Feed | Not built | |
๐ Connector Guide | โ |
There is a single connector for both AMM types.
The Osmosis connector determines which routes to take based on the input strategy. In either case, the name of the connector is osmosis_osmosis_mainnet
.
โน๏ธ Exchange Info¶
- Website: https://osmosis.zone/
- CoinMarketCap: https://coinmarketcap.com/exchanges/osmosis/
- CoinGecko: https://www.coingecko.com/en/exchanges/osmosis
- Docs: https://docs.osmosis.zone/
- Fees: https://docs.osmosis.zone/overview/educate/osmo#transaction-fees
- Concentrated Liquidity (range-amm): https://docs.osmosis.zone/osmosis-core/modules/concentrated-liquidity
๐ How to Connect¶
Tip
See the Osmosis Connector Guide for step-by-step instructions.
Create an Osmosis wallet or use and existing Cosmos wallet on one of the supported networks below:
Chain | Networks |
---|---|
osmosis | mainnet, testnet |
๐ Cosmos & IBC Wallets¶
The Cosmos ecosystem is a collection of blockchains built using the Cosmos SDK, which communicate with eachother over the Inter-Blockchain Communication protocol (IBC).
Similar to multichain wallets such as Metamask, Cosmos ecosystem wallets come with high interoperability built-in - though specific networks may need to be manually added.
The following are Osmosis-compatible browser-wallets:
- Keplr | Tested โ
- Leap | Tested โ | Preferred ๐
- Trust | Untested ๐คทโโ๏ธ
- MetaMask | Untested ๐คทโโ๏ธ
- Others | Untested ๐คทโโ๏ธ
๐ Get Private Key from Keplr¶
Keplr is the most popular Cosmos-based wallet. When creating a Keplr wallet, only users who link a Google Account are able to export their private key directly from Keplr.
To get around this, you can:
- Export your Keplr seed phrase.
- Restore the wallet using the seed phrase, in a different Cosmos-based wallet (such as Leap wallet) which allows exporting the private key.
- Export the private key from the newly restored wallet.
๐ก An Osmosis Private Key has 64 characters
Be aware an exported private key may have an 0x
at the start, which may need to be removed to fit the private key format check.
-
Before:
0x1234567890...
-
After:
1234567890...
๐ Connect with Gateway¶
From inside the Hummingbot client, run gateway connect osmosis
in order to connect your wallet:
Which chain do you want osmosis to connect to? (osmosis) >>> osmosis
Which network do you want osmosis to connect to? (mainnet, testnet) >>> mainnet
Do you want to continue to use node url 'https://rpc.osmosis.zone/' for osmosis-mainnet? (Yes/No) [default: Yes]
Enter your osmosis-mainnet private key >>>> ****************************************************************
If connection is successful (osmosis-mainnet):
2๏ธโฃ AMM Connector¶
Integration to this DEX's swap pricing and execution endpoints
- ID:
osmosis_osmosis_mainnet
- Connection Type: REST via Gateway
- API Docs: https://docs.osmosis.zone/osmosis-core/guides/structure#retrieving-a-block
- Folder: https://github.com/hummingbot/gateway/tree/main/src/connectors/osmosis
- Default Configs: https://github.com/hummingbot/gateway/blob/main/src/templates/osmosis.yml
Endpoints¶
/amm/price
/amm/trade
/amm/estimateGas
For more info, run Gateway and go to https://localhost:8080 in your browser to see detailed documentation for each endpoint.
3๏ธโฃ Range AMM Connector¶
Integration to this DEX's concentrated liquidity range provision endpoints
- ID:
osmosis_osmosis_mainnet
- Connection Type: REST via Gateway
- API Docs: https://docs.osmosis.zone/osmosis-core/modules/concentrated-liquidity
- Folder: https://github.com/hummingbot/gateway/tree/main/src/connectors/osmosis
- Default Configs: https://github.com/hummingbot/gateway/blob/main/src/templates/osmosis.yml
Endpoints¶
/amm/liquidity/price
/amm/liquidity/add
/amm/liquidity/remove
/amm/liquidity/position
/amm/liquidity/collect_fees
For more info, run Gateway and go to https://localhost:8080 in your browser to see detailed documentation for each endpoint.
Interfaces¶
Cosmos-specific additions to amm.requests
Multiple interfaces within gateway/src/amm/amm.requests.ts
include additions in the response models and re-use of tokenId > poolId so that when data comes in, the gateway will assume the optional variables relevant for the connector in use; e.g. The interfaces work with both Cosmos and non-Cosmos responses and handle the data accordingly.
๐งช Create CLMM Strategy¶
From inside the Hummingbot client, run create
and then select amm_v3_lp
in order to create a custom CLMM strategy.
To select Osmosis DEX, enter osmosis_osmosis_mainnet
as the name of the LP connector.
๐ก Only LOW/MEDIUM/HIGH fee tiers available
Inputting 'LOWEST' as the fee tier may result in an error.
Enter name of LP connector >>> osmosis_osmosis_mainnet
Enter the trading pair you would like to provide liquidity on (e.g. WETH-USDC) >>> [Your desired pool pair; e.g. OSMO-USDC]
On which fee tier do you want to provide liquidity on? (LOWEST/LOW/MEDIUM/HIGH) >>> [LOW/MEDIUM/HIGH]
How wide around current pool price and/or last created positions do you want new positions to span? (Enter 1 to indicate 1%) >>> [DYOR]
Enter the maximum value (in terms of base asset) to use for providing liquidity. >>> [DYOR]
Enter a new file name for your configuration >>> [default is 'conf_amm_v3_lp_[#].yml' or 'input custom_name.yml']
๐ฏ AMM Data Feed¶
Data feed of this exchange's real-time prices
- Not currently supported
- Contact Pecunia.Finance for collaboration