Submitted by berndartmueller, also found by 0xbepresent, 8olidity, and tonisives
Collected community fees from each swap and flash loan are immediately sent to the defined AlgebraFactor.vaultAddress address. Contrary to the used pull pattern in Uniswap V3.
Having fees (ERC-20 tokens) immediately sent to the vault within each swap and flash loan, opens up potential issues if the vault address is set to the zero address.
The following AlgebraPool functions are affected:
If the AlgebraFactor.vaultAddress address is set to address(0), all Algebra pools deployed by this factory contract will have their swap and flash loan functionality affected in a either completely broken way (transactions will revert due to ERC-20 token transfers to the zero address) or fees are sent (effectively burned) to the zero address. In the end, it will depend on the ERC-20 token implementation if it reverts or simply burns the fees.
AlgebraFactory.setVaultAddress
AlgebraFactory.setVaultAddress is used by the owner of the AlgebraFactory to set the vault address.
AlgebraPool.sol#L918
AlgebraPool._payCommunityFee
This function is called from within the AlgebraPool.swap and AlgebraPool.swapSupportingFeeOnInputTokens functions.
Either
vladyan18 (QuickSwap & StellaSwap) confirmed
IliaAzhel (QuickSwap & StellaSwap) disagreed with severity
0xean (judge) decreased severity to Medium and commented:
