HIP-13 [DG] Gateway connector for the Algorand chain including Algofi, Pact, Tinyman DEX connectors

Author: fengtality 0x352

Original Post Date: 30 Jun 2022

Snapshot Proposal Link

Since there isn’t a thread for it, I’ll leave this comment here:

I voted NO for HIP-13 because the number of development days requested (90 total dev days for 3 connectors) look too high to me, given that:

  • Prior HIPs like HIP-4, HIP-7, HIP-8 have averaged 5-10 dev days per connector, and those connectors introduced new chains and DEX types
  • As more Gateway connectors/chains are added and the code becomes more stable, it should be easier to add new connectors. HIP-9 was 1 dev day for Polygon/Quickswap
  • The DEXs mentioned appear to be Uniswap-V2 clones, so they should be able to leverage the existing templates for other connectors

Author: 4mit 0x715


Just wanted to provide additional context on HIP-13.

Algorand Gateway-v2 connector:

Algorand being a non-EVM PoS chain means that there would be additional work required on the gateway side to recognise a transaction as being finalized on chain. Polygon being an Ethereum clone required only a few lines of code for the integration:

The level of effort needed with Algorand would be similar to that needed for Solana, writing the class from scratch and generating all of the associated class methods.

DEX integration:

The DEXs on algorand implement contracts in the TEAL language as opposed to solidity.

While some SDKs do exist for integration, they will require writing wrapper code around the SDK to be usable within Hummingbot.

Arbitrage between Algorand DEX’s:

To create arbitrage strategies between Algorand DEX’s themselves, it would be quite slow to perform these off-chain. We plan to develop a generic reusable contract factory that can be deployed by a hummingbot client to perform arbitrage on-chain between Algorand DEXs using contract to contract calls.

Author: 4mit 0x715

Further clarity was sought around the previous comment.

The HIP-13 grant request is only for the first 2 items listed in the previous comment.

For the Arbitrage between Algorand DEX’s that will require building a reusable contract factory that can be deployed by a Hummingbot client to perform on-chain swaps in atomic transactions, we intend to approach the Algorand foundation for a grant to develop this part of the code. And therefore it is not within the scope of HIP-13.