Submitted by 0xRajkumar, also found by 0xAlix2, carrotsmuggler, Egis_Security, Egis_Security, jasonxiale, Lambda, oakcobalt, Tigerfrake, Tigerfrake, and Tigerfrake
/contracts/pool-manager/src/helpers.rs#L561-L592
When a user creates a pool, they must pay both denom_creation_fee and pool_creation_fee.
The denom_creation_fee can be paid using multiple coins or a single coin and may also include the same coin as pool_creation_fee. If multiple denom_creation_fee coins options are available, and one of them matches the coin used for pool_creation_fee, it can lead to issues.
The issue arises when the user attempts to pay both fees using the same coin.
As both are equal, thats why both checks will pass. The impact is High as it can cause a DoS and allow the bypass of one of the fees.
How it happens when amounts are different:
How it happens when amounts are the same:
We can verify whether the user is paying with one coin or multiple coins. If the user is paying with one coin, we can combine both amounts and perform the validation. Similarly, if the user is paying with multiple coins, we can apply the same approach. This will effectively mitigate the issue.
jvr0x (MANTRA) confirmed and commented:
3docSec (judge) commented:
