Introduction to Questdriem OmniChain Contracts (QOC)
Build truly interoperable dApps that exist on multiple blockchains simultaneously, without bridges.
The Problem with Bridges
Traditional cross-chain communication relies on "bridges"—centralized or multi-sig contracts that lock assets on one chain and mint wrapped versions on another. This model has proven to be the single greatest security vulnerability in Web3, responsible for billions of dollars in losses. Bridges introduce a central point of failure and a lucrative target for attackers.
The QOC Solution: True Interoperability
Questdriem OmniChain Contracts (QOCs), a proprietary technology of XOLIXBlock, fundamentally solve this problem. Instead of bridging assets, QOCs allow a single smart contract's state to be replicated and synchronized across multiple supported blockchains in near real-time. This is achieved through our novel Stochastic Proof-of-Stake (SPoS) consensus layer, which validates and relays state changes trustlessly between networks.
In simple terms: A QOC is one contract that lives on many chains at once. When you change its state on Polygon, that same state change is reflected on Ethereum, XOLIXBlock, and others automatically.
Example: A Cross-Chain "HelloWorld" QOC
Let's look at a simple QOC written in Solidity. This contract stores a message that can be updated from any supported chain.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// Import the QOC base contract from the XOLIXBlock SDK
import "@xolixblock/contracts/qoc/QOC.sol";
// Inherit from QOC and specify which chains this contract will exist on.
contract CrossChainHelloWorld is QOC(["xolix", "ethereum", "polygon"]) {
string public message;
event MessageUpdated(address sender, string newMessage, string originatingChain);
constructor() {
message = "Hello, OmniChain World!";
}
// This function can be called from any of the specified chains.
// The 'qoc' modifier ensures the state change is propagated.
function updateMessage(string memory newMessage) public qoc {
message = newMessage;
emit MessageUpdated(msg.sender, newMessage, QOC.getChainId());
}
}How It Works: Step-by-Step
- You deploy the \`CrossChainHelloWorld\` contract once to XOLIXBlock.
- The XOLIXBlock network automatically deploys "proxy" versions of this contract to Ethereum and Polygon, all linked to the same state root.
- A user on Polygon calls \`updateMessage("Hello, Polygon!")\`.
- The transaction is validated by XOLIXBlock's SPoS validators, who create a cryptographic proof of the state change.
- This proof is broadcast to the relayer networks on Ethereum and XOLIXBlock.
- The relayers execute a transaction on the other chains to apply the same state change, updating the \`message\` variable everywhere. The entire process takes seconds.
Key Advantages
- Unmatched Security: Eliminates the honeypot risk associated with asset-locking bridges.
- Unified Liquidity: Assets are not wrapped or fragmented. A token has a single shared state across all chains.
- Simplified Development: Write one contract, deploy it everywhere. Drastically reduces complexity for developers.
- Superior User Experience: Users can interact with your dApp from their preferred chain without needing to manually bridge assets.