KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
104 stars 94 forks source link

Tx fees are extra high for Atom transactions #1847

Closed tonymorony closed 1 year ago

tonymorony commented 2 years ago

[ cc @ozkanonur ]

Adex:

image

Kelpr:

image
onur-ozkan commented 2 years ago

Could you lower the gas price in coins config and try again? Fee calculation uses gas price from coins config.

onur-ozkan commented 2 years ago

We simulate the transaction and get the used gas from rpc node, and multiply it with the gas price. So the final fee amount can be anything depending on the gas price. Cosmos don't provide gas prices from rpc node, sadly we have to provide this value for each platform coins in cosmos.

tonymorony commented 2 years ago

thank you for clarification @ozkanonur! since rn this problem can be solved only by assets configuration moved it into assets configuration repo

tonymorony commented 1 year ago

bumping this one since fees still hardcoded for Atom/IRIS and it's not competitive at all with Kelpr = not really usable

onur-ozkan commented 1 year ago

Could you lower the gas price in coins config and try again? Fee calculation uses gas price from coins config.

:point_up:

onur-ozkan commented 1 year ago

It's not completely hard-coded

onur-ozkan commented 1 year ago

I check the keplr sources, and saw this https://github.com/chainapsis/keplr-chain-registry/blob/f00637a3b9b8831043f64b87486d08fcea8e524d/cosmos/irishub.json#L48-L52 which means they are providing gas prices from the configuration files too.

shamardy commented 1 year ago

I check the keplr sources, and saw this https://github.com/chainapsis/keplr-chain-registry/blob/f00637a3b9b8831043f64b87486d08fcea8e524d/cosmos/irishub.json#L48-L52 which means they are providing gas prices from the configuration files too.

After discussion with @tonymorony and @yurii-khi we agreed that for this issue we need to have the ability for tendermint coin fees from config to be overridden in every withdraw call using WithdrawFee similar to how it works for UTXO and EVM.

For having 3 levels for fees (low priority, default/normal priority, high priority) and other enhancements, it will be done as part of https://github.com/KomodoPlatform/atomicDEX-API/issues/1848#issue-1732200837 later for all coins.

onur-ozkan commented 1 year ago

Feel free to re-open this and ping me if there are any issues with https://github.com/KomodoPlatform/komodo-defi-framework/pull/1894