LogoLogo
PAO DocsCommunity DocsInfrastructure DocsPeerplays.com
  • Developer Documentation
  • API Reference
    • Peerplays Core API
      • Popular API Calls
      • Account History
      • Asset API
      • Block API
      • Crypto API
      • Database API
      • Network Broadcast API
      • Network Nodes API
      • Orders API
    • Wallet API
      • Account Calls
      • Asset Calls
      • Blockchain Inspection
      • General Calls
      • Governance
      • Privacy Mode
      • Trading Calls
      • Transaction Builder
      • Wallet Calls
    • Bookie API
      • General Calls
      • Listeners
      • Tournaments
  • Peerplays API Libraries
    • Python Peerplays
      • Installation
      • Creating an Account
      • Creating a Peerplays Wallet
      • NFT API
      • Marketplace API
      • Role Based Permissions API
  • Development Guides
    • Creating User Issued Assets
    • Introduction to Permissions
    • NFT Minting
    • Calculating Costs
  • The Cookbook
    • NFTs for Staking Creator Tokens
  • Tools and Integrations
    • PeerID
      • 1.0.0
        • Infrastructure
          • Deployment on a Linux Serve
          • Deployment to AWS ECS
            • Building the Docker Images
            • Storing Secrets in Amazon Parameter Store to use in ECS
            • Creating the Task Definition
            • Creating the Cluster
            • Creating the Service
        • Development
          • How does PeerID work without storing the keys ?
          • Authentication with PeerID
          • Brain Storming
          • Software Requirements
      • Authentication with PeerID
      • Requirements Specification
    • Random Number Generator
      • RNG Technical Summary
      • RNG API
  • Supporting & Reference Docs
    • Peerplays Development FAQs
    • Sidechain Operator Node (SON) Development
      • Generic Sidechain Docs
        • Quick joining GLADIATOR
        • Changes to Peerplaysjs-lib
        • Requirements Specification
        • Low Level Designs
          • bitcoin-deposit-handling-lld
          • bitcoin-operations-draft
          • bitcoin-sidechain-handler-lld
          • bitcoin-sidechain-multisig-bitcoin-wallet-and-bitcoin-addresses-pw
          • bitcoin-withdrawal-handling-lld
          • btc-address-scripting-mechanism
          • comparison-between-scenarios-for-handling-deposits-and-withdrawals
          • exchange-rate-list
          • generic-sidechain-deposit-hld
          • generic-sidechain-high-level-design
          • generic-sidechain-listener-hld
          • generic-sidechain-withdrawal-hld
          • refund-btc-mechanism
          • son-configuration
          • son-consensus-communication-and-transaction-signing-on-chain-lld
          • son-de-register-proposals-lld
          • son-objects-and-operators
          • son-rewards-lld
          • son-voting-lld
          • son-wallet-list_sons-lld
          • creation of a multi-sig bitcoin address lld
          • claiming initial son vesting lld
          • changeover and SON maintenance scenarios lld
          • user-sidechain-addresses-mapping
          • wallet-commands-for-son
        • Functional Specs
          • SON Configuration
          • SON rewards
          • SON Voting and Consensus
          • SONs switchover scenarios
          • SON Status Operations & Monitoring
          • Proposals
          • SON Smart Contracts
      • Bitcoin Sidechain Docs
        • Functional Specs
          • btc-refunds
          • voting-and-consensus
          • son-switchover
          • son-rewards
          • son-proposals
          • son-configuration
          • heartbeat-monitoring
          • BTC Transaction Processing & Signing
          • Bitcoin Withdrawal Handling
          • Bitcoin Deposit Handling
          • SON Multisig Bitcoin Wallet
      • Hive Sidechain Docs
        • Functional Specs
          • HIVE Deposit Handling
          • HIVE Withdrawal Handling
    • Peerplays DEX Development
      • Peerplays NEX
        • Functional Specifications
          • NEX-FS01 Dashboard Page
            • NEX-FS12 ETH-SONs Deposit/Withdraw Functionality
          • NEX-FS02 Login and Account Creation
          • NEX-FS03 Menus and Nav
          • NEX-FS04 Notifications
          • NEX-FS05a Market Page (alpha)
          • NEX-FS05 Market Page
          • NEX-FS06 Profile Page
          • NEX-FS07 Wallet Functions
          • NEX-FS08 App Settings
          • NEX-FS09 Blockchain Page
          • NEX-FS10 GPOS Page
          • NEX-FS11 WhaleVault Integration
      • Requirements Specification
      • Functional Specs
        • Asset Info Page and Asset Lists
        • Dashboard
        • Exchange Page
        • Login and Account Creation
        • User Account Page
        • Voting Page
    • SPK Network
      • Functional Specs
        • Claimdrop Snapshot Functional Specification
        • Initial Claimdrop Functional Specification
    • NFT Development
      • NFT Store
        • NFT Store User Stories
        • NFT Store UI HLD
        • NFT Store Requirements Specification
        • Functional Specifications
          • APP-FS01 App Header
          • APP-FS02 App Body
          • APP-FS03 App Footer
          • APP-FS04 App Navigation
          • APP-FS05 Wallet Functions
          • APP-FS06 App Home Page
          • APP-FS07 Account Page
          • APP-FS08 Browse View
        • App Page List
        • Requirement Traceability Matrix
    • Operation IDs List
    • Sidechain Flow Diagram (HIVE coin)
    • Sidechain Flow Diagram (Bitcoin)
    • Sidechain Flow Diagram (Ethereum coin)
    • TradeHands Explorer
      • User Personas
      • User stories
      • APP-FS01 Detailed View
      • Draft: APP-FS02 Front Page
      • APP-FS03 Collection Details Page
    • Grafana
      • Grafana Installation
      • Install Grafana Behind reverse proxy
      • Loki Installation
      • Promtail agent Installation
      • Grafana Explorer
    • NEX Deployment & Configuration
      • NEX Deployment
      • NEX - Blockchain API configuration
      • Deploying NEX in a HA scenario
    • API Node
      • MarketCap API
    • TOTO Application
      • FS-Subscription Plan
      • FS-Achievements
  • Development Workflow Docs
    • Development Workflow
  • Other Documentation
    • Peerplays Home
    • Community Docs
    • Infrastructure Docs
    • Site Reliability Engineering
Powered by GitBook
On this page
  • 1. Transaction Fee Considerations
  • 1.1. get_global_properties
  • 1.2. An Example

Was this helpful?

Export as PDF
  1. Development Guides

Calculating Costs

PreviousNFT MintingNextNFTs for Staking Creator Tokens

Last updated 2 years ago

Was this helpful?

1. Transaction Fee Considerations

Every operation on the Peerplays blockchain requires a small fee to cover the cost of the use of the network and data storage on the chain. These fees can add up so it's best to plan ahead, especially if you'll need to make hundreds or thousands of transactions.

The fees are set individually for every operation. The fees will also change over time due to blockchain governance voting. You can check the current fees using the get_global_properties function, and then calculate your total costs given how many times you'll need to run each operation.

You might do something like the following:

  1. Use the get_global_properties function. Copy the whole list of operation IDs/fees from the return.

  2. Download the latest copy of the .

  3. Combine the two lists to get the fee for each operation.

Then you can use your combined list to easily calculate the total transaction costs for what you plan to do. At this time, there is no automated process for generating such a list.

The PPY asset has a precision of 5. So the numbers listed in the get_global_properties function are in Satoshi. That is to say, to convert this number to nominal units, a decimal point is added 5 places from the right.

Some examples:

  • "fee": 1000 is really 0.01 PPY.

  • "premium_fee": 250000 is really 2.5 PPY.

  • "membership_lifetime_fee": 500000 is really 5 PPY.

1.1. get_global_properties

This function returns the blockchain’s slowly-changing settings (like the fees for each operation).

This object contains all of the properties of the blockchain that are fixed or that change only once per maintenance interval (daily) such as the current list of witnesses, committee_members, block interval, etc.

return type, namespace, & method
global_property_object graphene::wallet::wallet_api::get_global_properties()const

Calling this function is simple:

In the cli_wallet...
get_global_properties

The global_property_object is returned:

get_global_properties
{
  "id": "2.0.0",
  "parameters": {
    "current_fees": {
      "parameters": [[
          0,{
            "fee": 1000,
            "price_per_kbyte": 1000
          }
        ],[
          1,{
            "fee": 50
          }
        ],[
          2,{
            "fee": 0
          }
        ],[
          3,{
            "fee": "500000000000"
          }
        ],[
          4,{}
        ],[
          5,{
            "basic_fee": 500,
            "premium_fee": 250000,
            "price_per_kbyte": 1000
          }
        ],[
          6,{
            "fee": 100,
            "price_per_kbyte": 1000
          }
        ],[
          7,{
            "fee": 1000
          }
        ],[
          8,{
            "membership_annual_fee": "500000000000",
            "membership_lifetime_fee": 500000
          }
        ]
		# ... #
      ],
      "scale": 10000
    },
    "block_interval": 3,
    "maintenance_interval": 3600,
    "maintenance_skip_slots": 3,
    "committee_proposal_review_period": 3600,
    "maximum_transaction_size": 99999,
    # ... #
    "extensions": {
      "betting_rake_fee_percentage": 100,
      "live_betting_delay_time": 0,
      "sweeps_distribution_percentage": 200,
      # ... #
    }
  },
  "next_available_vote_id": 118,
  "active_committee_members": [
    # ... #
  ],
  "active_witnesses": [
    # ... #
  ],
  "active_sons": [{
      # ... #
    }
  ]
}

Parts of the example return have been truncated to fit. The actual return is much longer.

1.2. An Example

Let's say you need to make 50,000 NFTs with custom permissions and issue them to various accounts.

To calculate the total cost for this, you'll find the transaction fees for each transaction to accomplish the goal and then multiply by how may times you need to execute each transaction.

Using get_global_properties and the list of operation ID's you find the following transaction fees:

  1. Operation #85 -> custom_account_authority_create_operation -> Fee = 0.005 PPY & Kb of Data = 0.01 PPY

  2. Operation #92 -> nft_metadata_create_operation -> Fee = 0.1 PPY & Kb of Data = 0.01 PPY

  3. Operation #94 -> nft_mint_operation -> Fee = 0.01 PPY & Kb of Data = 0.01 PPY

You will need to create the custom permissions once: 0.005 PPY (the fee) + 0.01 PPY (for 1 Kb worth of data). Then you will need to create the NFT metadata once: 0.1 PPY (the fee) + 0.01 PPY (for 1 Kb worth of data). Last you will need to mint the 50,000 NFTs, which issues them to the accounts that will ultimately own them: 500 PPY (the fee) + 500 PPY (for 1 Kb worth of data).

A Kb (Kilobyte) of data can accommodate about 1/2 page worth of text. So unless you have a lot of information to apply to your NFTs, the 0.01 PPY for a Kb of data should cover most use cases!

When added all together, you get:

0.005 + 0.01 + 0.1 + 0.01 + 500 + 500 = 1,000.125 PPY cost in transaction fees to accomplish your goal. And this accounts for the use of an entire Kb of data per NFT. Using less data will make the total much less in this case.

This could represent 50,000 movie tickets, 50,000 shares of a company, or even 50,000 college degrees!

Remember the 5 "P's"... Proper planning prevents poor performance!

Operation ID mapping