Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/carbondefi - Add Carbon DeFi AMM and CLOB_SPOT connector #255

Closed
tiagofilipenunes opened this issue Dec 20, 2023 · 0 comments · Fixed by #256
Closed

feat/carbondefi - Add Carbon DeFi AMM and CLOB_SPOT connector #255

tiagofilipenunes opened this issue Dec 20, 2023 · 0 comments · Fixed by #256

Comments

@tiagofilipenunes
Copy link
Contributor

Impact

The desired behaviour is to add new DeFi primitives supported by Carbon DeFi that will expand the on-chain capabilities of Hummingbot Gateway and benefit the Hummingbot users with on-chain limit orders, and a new AMM connection/liquidity source.

CarbonDeFi is a decentralised protocol live on Ethereum mainnet with similar deployments on Base, Mantle, Canto, Arbitrum, and Fantom which can be supported in the future, and supports any ERC-20 token (sans fee-on-transfer and rebase tokens, etc). Carbon DeFi allows any user to:

  1. Create on-chain one-sided BUY/SELL range and limit orders for a pair of ERC-20 tokens ("disposable strategy")
  2. Create two on-chain connected BUY and SELL range and limit orders ("recurring strategy") for a pair of ERC-20 tokens. Each order in the strategy adds to the liquidity of the other when selling tokens at the range the user selects.
  3. Trade against any on-chain orders to obtain the best price execution (calculated by the Carbon DeFi SDK).
  4. Future functionality with other types of strategies coming soon.

For this integration, supporting 1 and 3 works by creating an AMM connector and a CLOB_SPOT connector. A user can then trade against Carbon DeFi orders and create an on-chain limit order, which is executed against other exchanges on-chain via the Arb Fast Lane

Feature Suggestion

Add an AMM Carbon DeFi Connector that exposes the following endpoints:

  • /amm/price
  • /amm/trade
  • /amm/estimateGas

and a CLOB_SPOT Carbon DeFi Connector that exposes the following endpoints:

  • clob/markets
  • clob/orderBook
  • clob/ticker
  • clob/orders
  • clob/estimateGas

Additional context

Carbon DeFi documentation: https://docs.carbondefi.xyz

Example of some orders currently live on Carbon DeFi for the ETH-DAI pair (accessible through the explorer):

Screenshot 2023-12-18 at 17 29 07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@fengtality @tiagofilipenunes @nikspz and others