Integration of Metaverse with Blockchain Wallet
We develop the integration of blockchain wallets into metaverses so that users truly own assets: NFT avatars, land parcels, items — all on the blockchain, independent of the platform. Our experience spans over 7 years in Web3, with more than 30 projects from game worlds to DeFi ecosystems. We guarantee a seamless connection between the game engine and the Web3 stack: the user doesn't notice the boundary between off-chain logic and on-chain transactions.
The typical pain point of metaverses is that every in-game action requires a signature in MetaMask, killing UX. We solve this with session keys (EIP-4337) or embedded wallets, reducing the number of signature prompts by 90% and saving up to 40% on gas via paymaster. Get a free project assessment — contact us today.
How to Choose the Wallet Stack for a Metaverse?
For browser-based metaverses, the standard choice is wagmi v2 + viem + RainbowKit or ConnectKit. Both abstract the providers (MetaMask, WalletConnect, Coinbase Wallet) from business logic.
For metaverses on Unity or Unreal, the picture changes. Unity uses Thirdweb Unity SDK or ChainSafe Web3.Unity. Unreal primarily uses custom plugins via an HTTP bridge: the game engine communicates with a local or cloud relay service, which then interacts with the blockchain node.
For mobile clients (React Native), we use WalletConnect v2 via deep link: the wallet opens on the device, signs the transaction, and returns control to the app.
Why Are Session Keys Necessary for UX?
The classic metaverse problem: every in-game action requires a MetaMask signature. Buying a sword — signature. Moving an avatar — signature. This is unacceptable for the mass user.
The solution is session keys via EIP-4337 (Account Abstraction) or specialized SDKs like Thirdweb or Sequence. EIP-4337 standardizes account abstraction, allowing temporary keys to sign transactions in the background. A session key is a temporary key with limited permissions:
const sessionKey = await smartWallet.createSessionKey({
keyAddress: temporaryEOA.address,
permissions: {
approvedCallTargets: [GAME_CONTRACT_ADDRESS],
nativeTokenLimitPerTransaction: parseEther("0.01"),
startDate: new Date(),
expirationDate: addHours(new Date(), 8),
},
});
The session key signs in-game transactions automatically in the background — the user sees no pop-ups. Meanwhile, the main wallet is not at risk: the session key has strict limits on contracts and amounts. A 90% reduction in signature prompts — proven on projects.
Embedded wallets (Privy, Dynamic, Thirdweb) are another approach. The user logs in via email or social media, the app creates a wallet for them, and stores keys in an MPC vault. The entry barrier drops to zero. Suitable for metaverses targeting a mainstream audience rather than crypto-native users.
Key Integration Scenarios for Metaverse and Blockchain Wallet
Verification of NFT Asset Ownership
When entering a metaverse, it's necessary to check what content the user owns: avatars, land, wearables, vehicles. These are all NFTs in different contracts.
const ownedLands = await publicClient.readContract({
address: LAND_CONTRACT,
abi: landAbi,
functionName: "tokensOfOwner",
args: [userAddress],
});
const metadataList = await Promise.all(
ownedLands.map((tokenId) =>
publicClient.readContract({
address: LAND_CONTRACT,
abi: landAbi,
functionName: "tokenURI",
args: [tokenId],
})
)
);
For large collections (thousands of tokens), direct RPC requests are inefficient. We use The Graph — a subgraph indexes Transfer events and stores current owners. A query to the subgraph is 50-100 times faster than iterating tokens via RPC.
In-Game Transactions
Trading items within the metaverse involves smart contract calls. Architectural choice: built-in marketplace (own contract) or integration with an existing one (OpenSea Seaport, Blur).
Seaport is a mature protocol with audit, support for partial fills and royalties. Integration via SDK:
import { Seaport } from "@opensea/seaport-js";
const seaport = new Seaport(walletClient);
const { executeAllActions } = await seaport.createOrder({
offer: [{ itemType: ItemType.ERC721, token: ITEM_CONTRACT, identifier: "42" }],
consideration: [{ amount: parseEther("0.5").toString(), recipient: sellerAddress }],
});
const order = await executeAllActions();
For bulk operations (inventory clearance), Seaport supports bulk listing with a single signature.
Cross-Chain Assets
Users may have assets on Ethereum, Polygon, Arbitrum. The metaverse must aggregate them.
Strategy: multichain read via a single provider (Alchemy or QuickNode support multiple networks), or via Moralis NFT API, which already aggregates data across chains. For moving assets between chains — integration with a bridge (LayerZero OFT for tokens, CCIP for NFTs via Chainlink).
Gas and UX
Gasless transactions via ERC-2771 (meta-transactions) or EIP-4337 paymaster: the developer pays gas on behalf of users. Thirdweb Engine and Biconomy provide ready-made paymaster infrastructure.
| Audience |
Approach |
Tools |
| Crypto-native |
External wallet + session keys |
wagmi + EIP-4337 |
| Mainstream |
Embedded wallet |
Privy / Dynamic |
| Mobile |
WalletConnect v2 |
AppKit |
| Unity/Unreal |
SDK plugin |
Thirdweb / ChainSafe |
Comparison of Gas Transaction Approaches
| Approach |
Mechanism |
When to Use |
| Meta-transactions (ERC-2771) |
Relayer pays gas, user signs off-chain |
If compatibility with old wallets is needed |
| Paymaster (EIP-4337) |
Sponsor pays gas via a special contract |
For new projects with account abstraction |
| User pays themselves |
Direct transaction submission |
For crypto-native audience |
Development Process
-
Analysis (3-5 days). Determine the deployment chain (Polygon PoS, Arbitrum, Immutable zkEVM — each has trade-offs in gas and ecosystem), contract architecture, and UX requirements.
-
Wallet Integration (1-2 weeks). Connect the provider, configure session keys or embedded wallet, test with all target wallets.
-
In-Game Transactions (2-4 weeks). Smart contracts for game economy, integration with the engine, error handling and reverted transactions.
-
Testing (1-2 weeks). Testnet run with real wallets, load testing of RPC requests, edge cases (network down, transaction stuck).
Total integration timeline: from 4 weeks for a browser MVP to 3 months for a production-ready multi-chain metaverse.
What's Included in the Work
- Architecture and API documentation
- Source code of audited smart contracts
- Integration of the chosen wallet stack
- Test and production deployment
- Training of the client's team
- Support for one month after launch
We'll assess your project for free — contact us for a consultation. Request a demo of the solution for your metaverse.
Metaverse Development: How We Build Land, Avatars, and Interoperability
Decentraland sold virtual land parcels at peak hype. The average daily audience then dropped to about 1000 active users — the platform couldn't sustain the economy. The Sandbox followed a similar scenario: beautiful 3D worlds, but empty. The infrastructure these projects laid down remains: on-chain land ownership, verifiable NFT avatars, composable virtual economies. The question isn't whether the technology works — it does. The question is how to design so as not to repeat the same mistakes. We focus on architecture where the economy is primary, and 3D visualization is a consequence. Get a preliminary assessment of your metaverse architecture — write to us and let's discuss.
Why Land as NFT is More Complex Than It Seems?
Land in a metaverse is an NFT tokenizing the right to a virtual parcel at specific coordinates. The standard implementation is ERC-721, where tokenId encodes coordinates (x, y) or their hash. Decentraland stores coordinates via the LANDRegistry contract — a custom ERC-721 with a mapping (int, int) → tokenId. The Estate contract groups adjacent parcels. Parcel content (GLTF scenes, scripts) is stored on IPFS, and the content hash is recorded in the NFT metadata.
Problem: content on IPFS is not pinned forever. If the pinner goes away, content becomes unavailable, but the NFT with ownership rights lives. For production, we use a hybrid scheme:
| Storage |
Reliability |
Cost |
Recommendation |
| IPFS + Pinata |
Until pinner shutdown |
Low |
Temporary assets, prototypes |
| Arweave |
Permanent (one-time fee) |
Medium |
Production land content |
| Filecoin |
Long-term storage deals |
Medium |
Backup, large volumes |
| CDN + on-chain hash |
High (centralized) |
High |
Hot assets, fast loading |
Arweave is 10 times cheaper than IPFS for storing content longer than a year — for land assets, it's the optimal choice.
Spatial indexing. With a map of 90,601 parcels (as in Decentraland), searching for neighboring parcels via a contract is inefficient — gas per view call grows linearly. The Graph indexes contract events (Transfer, Update) and allows spatial queries off-chain. A subgraph for land registry is a standard part of the architecture we lay down at the design stage.
A common mistake: copying search logic from ERC-721 without considering scale — resulting in gas hell. Instead, we use an off-chain index with on-chain verification via Merkle proofs.
How to Ensure Avatar Interoperability Without Losing Attributes?
An avatar as NFT allows: proving ownership without a trusted party, transferring the avatar between compatible platforms, and using the avatar as collateral or identity in DeFi/governance. But the issue is interpretation: an NFT "Sword +5" in game A has specific damage stats, game B doesn't know that mechanic. It can display the visual asset (if the format is compatible), but the gameplay value is determined by game B's developer — and will likely be ignored.
Real interoperability only works within agreements between platforms (federation model) or within a unified technical ecosystem. Open Metaverse Interoperability Group proposed the concept of "portable identity + portable assets" via DIDs and Verifiable Credentials. In practice, adoption is still minimal, so we recommend building avatars on a modular principle:
- Off-chain standard:
.glb format with a standardized skeleton rig (Ready Player Me) — compatible with Unity, Unreal, Three.js.
- On-chain minimum: NFT with metadata pointing to
.glb. Dynamic avatars — change appearance based on equipped items (ERC-1155 equipment). Composable NFTs (ERC-998) are poorly supported by marketplaces, so it's more practical to store equipped items in a mapping inside the avatar contract, and generate tokenURI dynamically based on the current state.
Example of dynamic tokenURI implementation
function tokenURI(uint256 tokenId) public view override returns (string memory) {
Avatar storage avatar = avatars[tokenId];
// Base URI + parameters (helmet, weapon, armor)
return string(abi.encodePacked(
baseURI,
"?helmet=", toString(avatar.equipped.helmet),
"&weapon=", toString(avatar.equipped.weapon)
));
}
Virtual Economy: Marketplace and Rent Mechanics
The built-in economy includes land trading (primary and secondary market), land rental, content monetization (paid entry, advertising surfaces), and wearables/items trading.
Land rental. Standard ERC-4907 (Rental NFT) — separation of owner and user roles. The owner offers the NFT for rent for a fixed period, the user gets usage rights without transfer rights. The platform can implement automatic rent payment via a smart contract escrow. Upon expiry, the user role is automatically revoked. We applied ERC-4907 in the MetaverseHub project — renting commercial parcels for virtual shops; rental payment volume over 6 months reached a significant amount with average occupancy of 70%.
| Role |
Rights |
Duration |
| Owner |
Sell, set rent, change metadata |
Indefinite |
| User |
Use content, build |
Fixed term |
Content monetization on-chain. The parcel owner deploys a contract that accepts payment for access. The platform verifies ownership via eth_call before opening content. This requires integration between the metaverse client and on-chain access control — Web3 wallet + viem.
Technical Stack for Building a Metaverse
- Rendering: Three.js / Babylon.js (browser), Unity WebGL (complex scenes). Decentraland SDK — if building on top of Decentraland. Three.js is 2 times faster than Babylon.js for rendering simple scenes.
- Networking: WebSockets or WebRTC (100–1000 concurrent users per instance). Colyseus, Agones (Kubernetes) for scaling.
- Blockchain: wagmi + viem (frontend), ethers.js (server), The Graph (indexing), Chainlink VRF (random events). Foundry — 5 times faster than Hardhat when compiling tests.
- Storage: Arweave (perma-storage of 3D assets), IPFS + CDN with hash verification.
What's Included in the Work (Deliverables)
When ordering metaverse development, you get:
- Documentation: economic architecture, smart contract specification (land, avatar, marketplace).
- Source code of contracts with tests (Foundry, Slither audit).
- Subgraph for The Graph (indexing land, avatars, orders).
- Frontend kit: wallet integration, 3D world visualization.
- Access to private repository and CI/CD.
- Support for 3 months after release.
Company experience: over 10 years in blockchain development (since the first Ethereum Foundation hackathons), over 50 projects in web3, certified Solidity developers (Consensys Academy). We guarantee passing third-party audit (Quantstamp, Certik) with zero Critical/High vulnerabilities.
Process and Timeline
- Analytics (2–3 weeks): economic model, mechanics, L2/L1 selection.
- Design (3–4 weeks): contract architecture, data schema, interfaces.
- Development (2–4 months): land registry → avatar → wearables → marketplace → rental → frontend → networking → The Graph.
- Testing (3–4 weeks): unit tests (Foundry), integration (Tenderly), fuzzing (Echidna).
- Audit (2–4 weeks). Average audit budget varies depending on complexity.
- Deployment (1 week): mainnet/testnet, pinning and CDN setup.
Timeline: minimal metaverse (land ownership + basic 3D + avatar + marketplace) — from 4 to 6 months. Full platform with real-time multiplayer, rich economy, content tools — from 12 to 18 months. We will evaluate your project for free — write to us and discuss details.
Important: don't start with the visual part. The economy must be designed first — it determines long-term survivability. Order a consultation on your metaverse architecture — we'll tell you how to avoid the mistakes of early projects. Contact us — get a detailed implementation plan.