In this guide we cover the use of a utility which calculates pricing used by an Akash Provider based on inputted server specifications.
Following a dry run of the Provider price script within this guide, the utility will be used within the execution of the provider build and will tune the provider’s bin engine appropriately.
Review these sections for Provider pricing and bid info:
Download Git Repository
- Download the Akash Helm Chart repository which includes script we will use for Provider pricing calculations
Calculate Pricing
Overview
In the steps that follow we will conduct example Akash Provider bid calculations based on resource (CPU/mem/stroage/GPU/etc) values passed in.
NOTE - we assume Ubuntu 22.04 usage when executing commands covered in this section. The steps outlined have been fully tested and verified on this Ubuntu version. If you are attempting these commands on other operating systems - I.e. MacOS - ensure Bash is updated or issues may arise. We recommended conducting these steps on Ubuntu if possible.
Akash Provider Pricing Calculations
Example Resource/Order Input
- To calculate the bid price that your Akash Provider will extend based on specific resource requests, we make use of an input file.
- In our example we name the input file
ibc-gpu-3-services-1-gpu-each-different.jq
- which is an example JSON formatted file containing specified order hardware specs. - The example
ibc-gpu-3-services-1-gpu-each-different.jq
file below defines an order that consists of three separate services. - Edit this file as necessary with your own pricing specifications.
- A single or multiple services may be defined in your own file use.
Create the File
Populate the File
Execute Order Pricing Estimation
NOTE - that in this example we are feeding desired per resource USD pricing within the command
NOTE - the outputted value is the UAKT block rate. In the example below this would be:
982.378419
X429909
- calculate price in UAKT/Month with approx429909
blocks/month422333323.733871
- UAKT/Month calculated using formula above422
- AKT/Month approximatelyCurrent AKT price
X422
- USD/Month
- Example -
PRICE_TARGET_CPU=1.60
- in this command line provided value we are specifying our desired CPU core price as$1.60/month
. - In a subsequent section we outline the use of environment variables for resource pricing instead of defining within a single command.
Example/Expected Output
- In this example the script is executed and the output suggests that the monthly cost of the example order is
982
UAKT/block
Environment Variable Declarations for Resource Pricing
- Instead of including the per resource prices within the CLI command, we can instead define these environment variables
- Use of these variables makes the use of the command to estimate provider pricing much cleaner
Default Values
- If certain pricing variables are not defined the following defaults are used
- Note that the GPU mappings variable can be expanded to include more than three models as necessitated
Command Execution with Environment Varaible Use
- If Akash Provider pricing environment variables are used, the pricing estimation script execution becomes much more concise such as:
Example/Expected Output