Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network fees infomation #317

Closed
wants to merge 13 commits into from

Conversation

AnthonyLaw
Copy link
Member

@AnthonyLaw AnthonyLaw commented Feb 7, 2020

Resolved: #267

Added

  • Statistics Menu
  • Recommended Network fees on Statistics page
  • Effective Rental Fees on Statistics page
  • getAverageNetworkFees

Recommended Network fees

myself define the network rate forFast : 3 and Slow : 0.5
taking the rate * averageNetworkFees = Recommended Network fees

Effective Rental Fees

I refer the calculation here

namespaceRentalEffectiveFee = rootNamespaceRentalFeePerBlock * medianNetworkMultiplier

medianNetworkMultiplier = 0.000282
rootNamespaceRentalFeePerBlock = 0.000001

The fees i will get 0.000000000282 with fix 6 decimal 0.000000 which is something wrong.

need input from you guys.
@dgarcia360 @evias

@dgarcia360
Copy link
Contributor

Hi @AnthonyLaw, you might want to wait a bit until this is merged to just call one endpoint: symbol/catapult-rest#251


const getAverageNetworkFees = async () => {
const maxDifficultyBlocks = await sdkBlock.getBlocksFromHeightWithLimit(Constants.NetworkConfig.MAX_DIFFICULTY_BLOCKS)
const maxDifficultyBlocksFeeMultipliers = maxDifficultyBlocks.map(({ feeMultiplier }) => parseFloat(feeMultiplier) > 0 ? parseFloat(feeMultiplier) : Constants.NetworkConfig.DEFAULT_DYNAMIC_FEE_MULTIPLIER / Math.pow(10, Constants.NetworkConfig.NATIVE_MOSAIC_DIVISIBILITY))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constants.NetworkConfig.DEFAULT_DYNAMIC_FEE_MULTIPLIER only applies to rental fees, not to transaction fees recommendation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, thanks for clearify

@AnthonyLaw
Copy link
Member Author

AnthonyLaw commented Feb 7, 2020

Hi @AnthonyLaw, you might want to wait a bit until this is merged to just call one endpoint: nemtech/catapult-rest#251

@dgarcia360 Glad to know that, Thanks.

@AnthonyLaw
Copy link
Member Author

refer #388

@AnthonyLaw AnthonyLaw closed this Apr 2, 2020
@AnthonyLaw AnthonyLaw deleted the network-fees-infomation branch April 2, 2020 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add information about network multipliers and rental fees
3 participants