# Transferring In-Game Assets On-Chain

**Partners**

<div align="left"><figure><img src="/files/kKDRkNUzXqoDUaTuj9mL" alt=""><figcaption></figcaption></figure></div>

* **iDOS**: Manages identity verification and credentials throughout the gaming transaction process.&#x20;
* **Cube3**: Provides security services and fraud prevention checks for all asset transfers.&#x20;
* **Privado ID**: Provides secure credentialing and identity verification services.
* **Space and Time**: Maintains game state storage and ensures synchronization between game world and blockchain.

**Example Use Case**\
\
When a player forges a new item in the game, the system verifies the transaction, handles the token payments, creates the appropriate NFT, and updates both the game world and blockchain records while maintaining security and verifiability throughout the process.

**Benefits**

* End-to-end transaction verification through comprehensive hashing
* Secure handling of both fungible and non-fungible tokens
* Seamless synchronization between game state and blockchain
* Immutable proof of ownership and transaction history

**Overview of Steps**\
\
When a player forges a new item in the game, a series of orchestrated steps are triggered to ensure the process is smooth, secure, and verifiable.&#x20;

**Sequence**<br>

Trigger: The forging event kicks off the recipe.

{% stepper %}
{% step %}
Verify: The event is verified through our decentralized network to ensure it’s legitimate.

{% endstep %}

{% step %}
Security: Additional security checks are performed to prevent fraud and ensure compliance.&#x20;

{% endstep %}

{% step %}
ERC-20 Token Handling: The cost of the item is verified as paid.

{% endstep %}

{% step %}
ERC-721 Transfer: The new item (an ERC-721 token) is created and transferred to the player's wallet.

{% endstep %}

{% step %}
Update Game World: The item is added to the player's inventory in the game.&#x20;

{% endstep %}

{% step %}
Hash Data: All relevant data is hashed in sequence to maintain integrity and provide a verifiable record.&#x20;

{% endstep %}

{% step %}
Merkle Tree Aggregation: The hashed data is aggregated into a Merkle tree structure for efficient verification.&#x20;

{% endstep %}

{% step %}
Record on Blockchain: The event is recorded on the blockchain, providing a transparent and immutable record of execution.&#x20;
{% endstep %}
{% endstepper %}

Verifiability: Throughout this process, every action (on-chain or off-chain) is hashed and logged, ensuring that each step can be verified. This builds trust and transparency, letting players know their transactions are secure and tamper-proof.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.w3.io/cookbook/gaming/transferring-in-game-assets-on-chain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
