Submitted by ABAIKUNANBAEV, also found by berndartmueller
Currently, there is a resolver that helps to convert different coins to the corresponding amount of the base coin to ensure multiple fee coin market can be supported. However, it incorrectly fetches the multiplier using the base denom instead of taking denom of the denom in the function.
Take a look at how multiplier is now derived:
https://github.com/code-423n4/2024-11-mantra/blob/main/x/xfeemarket/keeper/resolver.go#L11-23
As you can see here, it fetches multiplier by putting denom in the mapping thats stored in the feemarket keeper:
https://github.com/code-423n4/2024-11-mantra/blob/main/x/xfeemarket/keeper/keeper.go#L28-29
So this mapping serves as a way to get the corresponding denom => multiplier against the default base fee denomination. The problem is that currently its the base denom thats provided in the Get() function:
Instead, it has to take coin.Denom as the previous line makes sure that the denom is not the base one:
This results in a situation where we take the multiplier for a base denom instead of taking it for the denom thats used against the base one.
Change the current functionality on the following line:
https://github.com/code-423n4/2024-11-mantra/blob/main/x/xfeemarket/keeper/resolver.go#L16
3docSec (judge) commented:
Lance Lan (MANTRA) confirmed and commented:
3docSec (judge) commented:
