Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@zikriya zikriya released this 29 Jul 07:44

Major Features

1. CCPT Circle USDC Swaps Integration

CCTP Feature Enhancements:

  • Code Simplification: The codebase has been streamlined by removing the CCTPFundManager related code and the logic for deciding between FundManager or CCTPFundManager. The cctpType parameter has also been removed from withdrawal functions. These changes reduce the complexity in the FiberRouter and simplify the overall integration script.
  • Integration Script Update:
    • The script now dynamically determines the CCTP type based on the balance of the FundManager on the target network.
    • Executes the appropriate flow (normal or CCTP) accordingly.
    • For CCTP flows, the script now includes:
      • Calling the circleAttestation function to handle withdrawals to the FundManager on the target network.
      • Following up with withdrawSigned and withdrawSignedAndSwapRouter functions once attestation is complete.
  • Gas Estimation Feature: Added a feature to estimate the gas required for the receivedMessage() function and handle gas fee transmission to the target network.
  • Removing Sync Pattern: The synchronous pattern in CCTP FundManager has been deprecated, enhancing asynchronous handling and improving efficiency.

2. Fee Distribution and Referral Fee Distribution Logic Implementation

Fee Distribution Logic Improvements:

  • New Fee Distribution Mechanism: Implemented a separate contract for fee distribution that integrates seamlessly with the swapSigned function. This mechanism securely deducts fees based on signature verification.
  • Referral System Integration: Added a robust referral system for fee and referral fee distribution. This includes features for managing referral discounts and a fixed fee distribution model.
  • Unit Tests: Developed comprehensive unit tests to ensure the correctness and reliability of the fee distribution logic.

3. OmniRouter / Omnichain Swaps Integration in MultiSwap

Omnichain Integration:

  • Omnichain and Axelar Contracts: Incorporated omnichain and Axelar contracts within the FiberRouter.
  • OmniRouter Integration: Enabled MultiSwap to perform omnichain swaps by integrating the OmniRouter.
  • LayerZero Integration: Enhanced the stargatecomposer to include the ability to set target networks for seamless cross-chain swaps.

4. Stargate v2 Integration with MultiSwap

Stargate v2 Enhancements:

  • Stargate v2 Integration:
    • Added support for swapSigned within the FiberRouter.
    • Integrated swapStargate(), swapUSDC, and stargateComposer functionalities with the FundManager.
    • Developed decentralized on-chain withdrawal processes to enhance security and efficiency.
  • Custom LzCompose Implementation: Implemented a custom Stargate LzCompose for secure and restricted withdrawals.
  • PrepareTakeTaxi Function: Implemented to provide backend gas fee estimation, covering total swap and withdrawal on-chain gas costs.

Other Notable Improvements and Fixes

  • Multiple Network Integrations: Added support for a variety of blockchain networks to expand the platform's reach and interoperability.
  • ZkSync Contracts Implementation: Integrated ZkSync contracts using the Hardhat framework for enhanced development and deployment processes.
  • Asset Transfer Fix: Addressed and resolved issues related to asset transfers in the swapSigned function.
  • Foundry Assets Swap Fix: Fixed issues related to asset swaps within Foundry, improving reliability and functionality.
  • Swap Types Decoder Restructuring: Restructured the swap types decoder and introduced new structs to support multiple swap types, including CCTP swaps.
  • Live Testing Scripts: Developed and implemented live testing scripts for swapSigned, swapSignedAndCrossRouter, and withdrawal functions (withdrawSigned / withdrawSignedAndCrossRouter).
  • Stargate v1 Integration: Successfully integrated Stargate v1 with the MultiSwap FiberRouter, enhancing overall swap capabilities.
  • Audit Documentation: Detailed documentation of the audit process for MultiSwap features has been added to ensure transparency and enhance security measures.

These updates significantly enhance the functionality, security, and user experience of the MultiSwap platform. Each feature and improvement has been meticulously developed and tested to ensure optimal performance.