Referenda

Open and closed proposals

Polkadot
#1127ExecutedWhitelisted CallerProtocol & Governance

Snowbridge: Update Bridge Pricing Parameters to Lower Transfer Fees

Proposer
Requested
0
Ended
13 Sept 2024
Comments
3
Category Protocol & Governance
  • Snowbridge proposes updating bridge pricing parameters to lower transfer fees based on changed market conditions.
  • The new parameters use a 25 Gwei worst-case gas price and a 1:566 ETH:DOT exchange rate.
  • Resulting fees are 6.1278015332 DOT from Polkadot to Ethereum and 0.000317 ETH from Ethereum to Polkadot.

Description

Written by the proposer, as published on Subsquare · last edited 30 Aug 2024, 11:21 UTC

When Snowbridge was launched the transfer fees were calculated based on the following parameters which reflected market conditions at the time:

  • Worst Case Gas price: 60 Gwei
  • ETH:DOT exchange rate: 1:450

This resulted in price in the following prices: 

  • 11.456568 DOT to transfer from Polkadot to Ethereum.
  • 0.000399 ETH to transfer from Ethereum to Polkadot.

This proposal will change the pricing parameters to:

  • Worst Case Gas price: 25 Gwei
  • ETH:DOT exchange rate: 1:566

Resulting in the following fees:

  • 6.1278015332 DOT to transfer from Polkadot to Ethereum.
  • 0.000317 ETH to transfer from Ethereum to Polkadot.

Old Pricing Params:

setPricingParameters({
    exchangeRate: 2,222,222,222,222,222
    rewards: {
        local: 100,000,000
        remote: 250,000,000,000,000
    }
    feePerGas: 60,000,000,000
    multiplier: 1,333,333,333,333,333,333
})

New Pricing Params:

setPricingParameters({
	exchangeRate: 1,766,784,452,296,820
	rewards: {
		local: 100,000,000
		remote: 250,000,000,000,000
	}
	feePerGas: 25,000,000,000
	multiplier: 1,333,333,333,333,333,333
})

Discussion

3 comments from OpenShore and Subsquare; spam hidden

Markdown
Signed with your wallet. No fee, nothing on-chain.
Alex823d 22h ago

The first xcm message is setting the pricing parameters on the bridge hub. But the second message is setting a storage item on AssetHub. Can you please explain which storage item you are setting and why?

Screenshot 2024-08-31 at 11.54.48.png

Alex821d 22h ago

Thanks. The more interesting part for me was to do verify the storage key. AFAIK storage items which do not belong to a pallet are not in metadata. So I manually verified the key like this:

fn main() {
	let hash = sp_crypto_hashing::twox_128(b":BridgeHubEthereumBaseFee:");
	println!("{hash:x?}");
}

I can confirm that it matches the storage key set in this referendum. Is there an easier way. How did you derive the storage key?

ordian821d 21h ago

@Alex

not much easier way, but one could also write a test for asset-hub-polkadot

#[test]
fn print_storage_address() {
	let key = BridgeHubEthereumBaseFee::key();
	println!("{}", HexDisplay::from(&key));
}