Gas and Fee events don't take slip into account
Summary
Gas and fee events reduce the value of liquidity stake units in a pool.
Detail
Gas events: Currently, in order to cover the gas for internal transactions, assets are taken from liquidity pools. An amount of RUNE is added back to the pool to compensate liquidity providers for this withdrawal. However, because slip is not taken into account, the amount of RUNE added to the pool is not of equivalent value to the assets that were withdrawn. Thus the value of a liquidity stake unit decreases.
Fee events similarly don't take slip into account and as a result represents decrease in the value of a liquidity stake unit.
The burning of dust also does decreases the value of a liquidity stake unit. When the dust is burned, the pool is subsidized by the reserve, but the subsidy amount is not equivalent to what is burned because it also does not take slip into account.
Although the amounts in question may be considered small, if the above issues are fixed, the liquidity stake unit value should never decrease and this is a very powerful invariant that if checked could prevent complex bug in the Thornode state machine.
Further background, with links to mathematical proofs and experimental verification of the non-decreasing value of liquidity units (apart from the issues outlined above) can be found in this presentation:
Code references
Gas events: https://gitlab.com/thorchain/thornode/-/blob/develop/x/thorchain/manager_gas_current.go#L229 Fee events: https://gitlab.com/thorchain/thornode/-/blob/develop/x/thorchain/manager_txout_current.go#L362 Burn dust events: https://gitlab.com/thorchain/thornode/-/blob/develop/x/thorchain/manager_network_current.go#L215
A suggested code change is attached for illustrative purposes only.