Submitted by 0x007 
NibiruBankKeeper.SyncStateDBWithAccount function in bank_extension.go is responsible for synchronizing the EVM state database (StateDB) with the corresponding bank account balance whenever the balance is updated. However, this function is not invoked by all operations that modify bank balances.
The following functions call bankKeeper.setBalance, but some do not trigger SyncStateDBWithAccount:
The EVM can mint or burn an arbitrary amount of Nibi tokens when the obj.Account.BalanceWei in the StateDB is out of sync. Specifically, the EVMs SetAccBalance function allows this discrepancy to occur if balances are updated outside of the SyncStateDBWithAccount mechanism.
The bankKeeper.DelegateCoins function illustrates this vulnerability. It would reduce the balance of delegator address and increase the balance BondedPoolName or NotBondedPoolName module address. And this could be triggered because
https://github.com/code-423n4/2024-11-nibiru/blob/main/app/keepers.go#L462-L465
https://github.com/NibiruChain/wasmd/blob/v0.44.0-nibiru/app/wasm.go#L9
https://github.com/code-423n4/2024-11-nibiru/blob/main/x/evm/precompile/wasm.go#L118C1-L162C2
Make sure EVM statedb is synced for every action that changes bank balances, preferably from setBalance.
k-yang (Nibiru) confirmed and commented:
Nibiru mitigated:
Status: Mitigation confirmed. 
