Zen Protocol Documentation
WebsiteTelegramBlogForum
  • Zen Protocol Docs
  • Apps
    • Headless Full Node
      • Full Node NPM Package
      • Build from Source
      • CLI
      • API
        • Wallet
        • Contracts
        • General
        • Blockchain
        • AddressDB
      • Deploy
        • Systemd
        • Shell script
        • Docker
      • Technical Model
      • AddressDB
    • Wallet
      • Desktop Wallet
        • Installers
      • Web Wallet
        • Run Locally
      • Wallet User Guide
        • Connect a Wallet
          • Create a Wallet
          • Import a Wallet
          • Watch Mode
        • My Wallet
          • Navigation Bar
          • Portfolio
          • Receive
          • Send / Execute
          • Transaction History
        • Contracts
          • Active Contracts
          • Execute a Contract
            • Message Body Field
          • Extend a Contract
          • Activate a Contract
        • Voting
          • Common Goods Pool
            • Generating a Ballot ID
          • Governance
        • Signer
        • Settings
          • Account Settings
          • Node Connectivity
      • Deprecated Desktop Wallet
        • Executable Installers
        • Wallet Structure
          • Video Tutorials
    • Explorer
    • Zen.js
      • Payment Processing
    • Oracle
      • Oracle GUI
      • Oracle Service
      • Oracle's API
      • Deploy
        • Systemd
        • Docker
      • How the Oracle contract works
      • How to create an Attestation token
    • Dex
      • Dex User Guide
        • Traded Pairs
        • Search Pairs
        • Order Book
        • Operations
        • My Wallet
        • Settings
      • How DEX contract works
    • Fixed Payout
      • Fixed Payout Generator User Guide
        • Issue
        • Redeem
        • Cancel
        • Verify
        • Settings
      • How the FP Contract works
      • How are the asset named?
  • Smart Contracts
  • Contract Structure
  • Contract Cost
  • Contract Activation
  • Contract Examples
  • Smart Contracts SDK
  • Contracts Language ZF*
  • Named Token Tutorial
  • Consensus
  • Common Goods Pool
  • Block Validation
  • Transaction Validation
  • Serialization
  • Use Cases
    • Create Unsigned Transaction
    • Secure Sign Transaction
    • Cold Storage using Full Node
  • Troubleshooting
    • Responsible Disclosure
    • Bug Bounty
    • Known Bugs
  • For Miners
    • Pools
    • GPU Mining
    • GPU Bounties
  • Check Crowdsale Contribution
  • Alpha call option
Powered by GitBook
On this page
  • Why?
  • How?
  1. Apps
  2. Fixed Payout

How are the asset named?

Asset Name Server

Why?

Using an asset identifier, its secure as it's unique, but it's not memorable, so it was used a similar principle to the DNS to create an ANS (Asset Name System) We develop an external actor which reads over the blockchain data and provides a simple API For each Fixed Payout asset the pre-image of the asset identifier is taken from the message body.

How?

Asset: "00000000a16a47c2640e5a3b40a50cbbaca19ac6c9a57666cf1d298c1ddf0049469a05a17b1077bde2c9548c651675353a320690f54c9d30e9797edd25e4fdcb2c351d09" has a long name GOOGL240122Bear261500 and a short name GOOGLBear261500.

The addressDB allows us to request the mint information of an asset by using /addressdb/contract/mint :

{
    "executionBlock": 470957,
    "sender": "0278e2befe3063f02b01d1f7c08abae7d0669b58be6691baac94e67ad52c540f22",
    "command": "Issue",
    "messageBody": {
        "dict": [
            [
                "Price",
                {
                    "u64": 261500
                }
            ],
            [
                "Start",
                {
                    "u64": 1643058000000
                }
            ],
            [
                "Expiry",
                {
                    "u64": 1643058000000
                }
            ],
            [
                "Ticker",
                {
                    "string": "GOOGL"
                }
            ],
            [
                "Collateral",
                {
                    "string": "000000000000000000000000000000000000000000000000000000000000000000000000"
                }
            ],
            [
                "OraclePubKey",
                {
                    "pk": "020dc7cad106e9284be13576f5271c4f694da464076d2eb44fd5c74265316f70a3"
                }
            ],
            [
                "OracleContractId",
                {
                    "string": "00000000065ee39e9f6af7d6e185f5b72eace28cc48bba05969742f0f9066519f3452369"
                }
            ]
        ]
    }

This infos are then formatted to take for the short name: Ticker-Start-Position-Price

PreviousHow the FP Contract worksNextContract Structure

Last updated 3 years ago