• Solutions
  • Developers
  • Blockchains
  • Blog
Wormholescan
Subscribe

Subscribe for updates

Subscribe to the Wormhole newsletter for exclusive updates.

Use Multichain Apps

Products

MessagingQueriesConnectNTTGateway

2024 Ⓒ Wormhole. All Rights Reserved.

20 Dec 2023

4 min read

Enabling Cross-Chain Deposits with Wormhole Queries: A UX Upgrade for Any Perpetual Futures DEX

Share:

With the emergence of tech stacks like the OP Stack or Polygon’s CDK, rollup as a service providers, and a still increasing number of non-EVM L1s, the trend towards a multi-chain world and the need for efficient, cost-effective, and seamless cross-chain interactions is clear. Wormhole, as the leading decentralized interoperability platform, offers developers a whole suite of cross-chain products to leverage to scale faster and expand use cases. Its latest innovation, Wormhole Queries, is set to revolutionize the way developers approach cross-chain data retrieval.

This blog post delves into the transformative potential of Wormhole Queries in the context of cross-chain deposits on any orderbook-based Perpetual Futures DEX (PerpDEX).


Understanding Wormhole Queries

Before diving into the use case, let's very briefly touch upon the innovative mechanics of Wormhole Queries though. Traditionally, interoperability protocols like Wormhole have relied on a "push" mechanism for data retrieval and attestation, requiring specific contracts for data retrieval across chains, leading to high costs and slow transaction times due to on-chain processing. 

Wormhole Queries introduces a groundbreaking "pull" mechanism, enabling rapid and cost-efficient cross-chain data access. This is achieved through off-chain requests handled by Guardians, bypassing the need for costly on-chain transactions.

Core Mechanics:

  • Guardian Nodes: These nodes are pivotal, acting as intermediaries that receive requests and fetch data from the appropriate RPC nodes across different chains.
  • Off-Chain Requests: Leveraging off-chain requests, Wormhole Queries bypasses the need for on-chain transactions, effectively reducing both cost and time.
  • Query Server: A dedicated server to handle off-chain requests more efficiently, providing a REST endpoint for seamless execution of these requests against the guardian network.

Transforming Perp DEXs with Cross-Chain Deposits

In a typical perpetual DEX, users often face challenges when trying to deposit assets from one chain (e.g., Base) to another (e.g., Arbitrum). This process traditionally involves bridging assets, and moving wrapped assets around, leading to high costs and end user complexity, which creates a disjointed user experience.

Wormhole Queries can solve this. This innovative approach allows users to deposit on one chain (like Arbitrum) and have the transaction reflected on another chain (like Base) where they primarily interact with the app. The process is streamlined through the Wormhole Queries mechanism, enabling the application to verify deposits on Arbitrum swiftly and efficiently. Removing the need to move around (multiple times) wrapped tokens abstracts the inherent risk to these assets. More importantly though, these deposits and withdrawals could be processed individually or in arbitrary batches, which could further reduce gas costs to the user/protocol.

  1. Initiating Deposit:

A user deposits assets into the PerpDEX contract on Arbitrum with the deposit verified via Wormhole Queries. More specifically, the guardians fetch the data from Arbitrum, to check if the user has deposited his funds. However, the PerpDEX will likely still want to wait for finality on Arbitrum to ensure the deposit transaction cannot be rolled back. Nonetheless, there could be designs/mechanisms in which the PerpDEX takes on some additional risk for a fee to make the user experience more seamless. 

  1. Seamless Integration on Base:

If the user has successfully deposited his assets on Arbitrum, and the guardian-maintained multisig has verified the validity of a query response, the balance reflects on Base where the user can start trading.

  1. Efficient Cross-Chain Exit:

When the user decides to exit, they can effortlessly move their assets back to another chain. The process is again facilitated by Wormhole Queries, ensuring that the user's assets are transferred quickly and without the additional costs typically associated with cross-chain movements.

Why does it matter?

Cost-Effectiveness:

Removes the gas costs associated with bridging assets, translating to significant savings for users.

Enhanced User Experience:

Offers a seamless and integrated experience, allowing users to manage their assets across chains without the typical hurdles of cross-chain interactions.

Scalability and Flexibility:

The Queries architecture allows for scalability and flexibility in handling a multitude of cross-chain interactions, enabling cross-chain deposits across all Wormhole-connected chains.

Conclusion

Wormhole Queries bears significant potential to improve the UX of Perpetual Future DEXs. By enabling secure, efficient, and cost-effective cross-chain deposits, it paves the way for a more interconnected and user-friendly blockchain ecosystem. As we move forward, the potential of Wormhole Queries in enhancing the functionality and appeal of DEXs is bound to unfold in exciting and innovative ways.


Get started building with Wormhole products today! Check out our website for more information about Wormhole Queries, and you can also sign up for the Queries beta here. Developers can learn more about Queries by reading our Whitepaper in our Github!

About Wormhole

Wormhole is a decentralized interoperability platform powering multi-chain applications and bridges. It provides developers with access to liquidity and users on over 30 leading blockchain networks, enabling use cases in DeFi, NFTs, governance, and more. To date, the platform has facilitated the transfer of over 35 billion dollars through over 800 million cross-chain messages.

Stay up to date with the latest news

Here’s your chance to get in on this one.

Discover More

Take a deep dive into our ever-evolving discussion on xChain technologies, new feature announcements, research, and more.

Introducing Native Token Transfers: A new open framework for making any token natively multichain

Introducing Native Token Transfers: A new open framework for making any token natively multichain

29 Feb 2024

4 min read

Wormhole is leading the way in blockchain interoperability, focusing on creating resilient, future-proof decentralized systems that prioritize ownership, control, and permissionles...

29 Feb 2024

4 min read

Subscribe for updates

Subscribe to the Wormhole newsletter for exclusive updates.

Products

MessagingConnectGateway

About

Terms of UsePrivacy Policy

2024 Ⓒ Wormhole. All Rights Reserved.