subtensor icon indicating copy to clipboard operation
subtensor copied to clipboard

Investigate Transfer Fees

Open sam0x17 opened this issue 1 year ago • 0 comments

The transfer fee is currently exorbitantly low. This value should be investigated and made more suitable to protect the chain against DDOS.

The current implementation for calculating our fees is fee = 0 + (0.001 × weight) based on:

fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
    let coefficient = WeightToFeeCoefficient {
        coeff_integer: 0,
        coeff_frac: Perbill::from_parts(1),
        negative: false,
        degree: 1,
    };

    smallvec!(coefficient)
}

In this implementation we are increasing the fees linearly degree: 1.

We can increase the fee by increasing the weight to fee ratio, charging per byte in the transaction, enabling the FeeMultiplier, raising the base fee from 0, or ditching this and writing our own algorithm.

https://docs.substrate.io/reference/how-to-guides/weights/calculate-fees/

sam0x17 avatar Jun 25 '24 17:06 sam0x17