threefoldtech / tfchain

Threefold Chain.
Apache License 2.0
15 stars 11 forks source link

How to calculate the billing rate for name contract #960

Closed A-Harby closed 8 months ago

A-Harby commented 8 months ago

What is your question?

Ex. How can I calculate the name contract bill rate?

What have you tried so far?

I created a name contract on Testnet. image I checked the billing amount on GraphQL. image And from this calculation, image The result was supposed to be 0.01315775, not 0.069 or 0.008

renauter commented 8 months ago

On Testnet farming policy is (%50 lower compared to mainnet):

image

Current TFT price is 21 mUSD => 1 USD = 47,6 TFT

image

So in USD for 1h we have: uniqueName cost in USD per hour = 1250 (units USD) * 10e-7 = 0.000125 USD/hour

Converted in TFT uniqueName cost in TFT per hour = 0.000125 * 47,6 = 0,00595 TFT/hour

Which should appears as 0,00595 * 10e7 = 59500 amountBilled in GraphQL and you have 69444. Close difference should be due to TFT price increasing during the last days so you should spend less TFT for same contract.

From chain side it seems OK

A-Harby commented 8 months ago

On Testnet farming policy is (%50 lower compared to mainnet):

Totally forget about the Testnet discount; it throws me off.

After calculating the new billing rate and TFT new price, it was correct even after applying discounts. image