đŸ€–Challenges

Challenges Faced in Developing CTM Widget

  • Whitelist Restrictions on MayaChain and Thorchain:

    1. MayaChain and Thorchain have stringent whitelist requirements that prevent us from directly calling their router contracts for cross-chain communication (CCM) integration.

    2. This restriction complicated the integration process, as direct interactions with these contracts are crucial for seamless swaps and liquidity aggregation.

  • Gas Budget Optimization for CCM Transactions:

    1. Accurately estimating and managing the gas budget for CCM transactions posed a significant challenge. Cross-chain operations are inherently complex, involving multiple steps and varying gas costs across different networks.

    2. Incorrect gas estimations could lead to failed transactions, increased costs, and suboptimal user experiences and user funds lockout.

    3. Had to call raw "eth_estimateGas" with state overrides to estimate gas.

  • Compatibility Issues with xchain-js and Vite-React:

    • The xchain-js library, which is essential for integrating Thorchain's SDK, was not compatible with Vite-React, our chosen framework for the frontend.

    • This incompatibility hindered our ability to utilize xchain-js directly, necessitating an alternative approach to interact with Thorchain's functionalities.

    • :To overcome this, we resorted to making raw API calls to Thorchain's nodes (ThorNodes). This involved manually handling the communication protocols and ensuring that all API interactions were robust, secure, and efficient. While this added complexity to our development process, it allowed us to maintain the high performance and compatibility required for CTM Widget.

Last updated