Skip to content

Token Type

Different Token Types are supported on the platform using Ethereum-based Token Management Contract named Skucode.

Overview

The Skucode contract is a versatile Ethereum-based token management solution designed to handle complex operations like minting, wrapping, and unwrapping tokens. It supports secure token transactions with built-in protections against unauthorized actions and errors. This contract is suitable for businesses looking to manage digital assets with advanced token capabilities and seamless integration into decentralized applications.

Key Features:

  • Mintable & Wrappable Tokens:
    • Mintable Tokens: Tokens that can be created (minted) by the owner.
    • Wrappable Tokens: Tokens that can only be created by wrapping another token type at predefined ratios.
  • Attachment Management: Allows for attachments that link additional information to tokens using Content Identifiers (CID).
  • Inter-Token Type Token Wrapping and Unwrapping: Tokens can be wrapped into or unwrapped from other token type tokens using specified ratios.
  • Safe Interactions with ERC1155 Skusets: Implements secure and whitelisted logic for interactions with ERC1155 skusets when tokens are deposited, ensuring compatibility and controlled handling of SKU assets.

Wrap Ratio Protocol:

The Wrap Ratio Protocol is a mechanism that governs the conversion of tokens between different token types. It ensures a controlled and verifiable process for creating new tokens by wrapping existing ones.

  • Parent-Child Relationship:
    • The protocol is hosted by the parent token type, which is created with the Wrappable type.
    • A Child token type can only have a supply by wrapping tokens from the parent token type at a specified ratio.
  • Token Conversion:
    • The conversion process involves wrapping tokens of the Child token type into the Parent token type according to predefined ratios.
    • These wrap ratios or conversion ratios can be dynamically added by the Child token type to the Parent token type, defining the rate at which the Child tokens can be minted by utilizing the underlying tokens of the Parent.

This protocol ensures that Wrappable token types have a transparent and well-defined relationship with their Child token type, maintaining consistent value alignment and supply control between different token sets.

How It Works

1. Mintable Tokens

When the token type is set to Mintable, the contract owner can generate new tokens and assign them to specific accounts. This is useful when creating digital assets that need to be controlled and distributed by a central entity.

2. Wrappable Tokens

In Wrappable mode, token types can both wrap tokens from other token types and have their supply exclusively created by wrapping tokens from an existing token type, allowing them to be exchanged for another type of token type at a specified ratio.

3. Attachment Management

The contract supports adding attachments using a Content Identifier (CID) that points to additional metadata or documents associated with the token.

4. Secure Token Transfers

The contract includes functions to securely transfer tokens between addresses. If the recipient is a smart contract, the transfer will check for compatibility and ensure the transaction is processed correctly, preventing potential token loss.

5. Wrap Ratios and Conversion

Tokens can be wrapped into another token type using predefined ratios, and the process ensures the wrapped token amount reflects this conversion. Similarly, the unwrap process ensures that the original token amount is correctly returned.

Security Features

  • Reentrancy Guard: Protects the contract from reentrancy attacks, ensuring that recursive calls do not compromise security.
  • Twin Contract Verification: Ensures that only authorized twin contracts (with identical bytecode) can interact with the wrapping and unwrapping functions.
  • Derived Keys: Utilizes derived keys to maintain the privacy of the involved members, ensuring secure and confidential transactions. It ensure that the original identity of individuals or organizations remains confidential. These keys are generated uniquely for each trade, and if a trade is discarded for any reason, the generated keys are not reused in subsequent trades, enhancing security and privacy.
  • Pausable: In the event of any misbehavior detected during trade processing, involved members have the ability to pause the trade by providing proofs and valid reasons.

Use Cases

  • Digital Asset Management: Manage and distribute digital assets such as loyalty points, game tokens, or credits.
  • Decentralized Finance (DeFi): Implement token swaps and interoperability between different token standards.
  • Document and Metadata Linking: Securely attach and manage metadata or additional information related to tokens.

Conclusion

Different token types are supported on the platform using Skucode contract providing a comprehensive, secure, and flexible solution for token management on the Ethereum blockchain. It is suitable for businesses and projects looking to innovate in the areas of digital asset management, token interoperability, and secure token transfers.