First depositor can steal asset tokens of others
The first depositor can be front run by an attacker and as a result will lose a considerable part of the assets provided. When the pool has no share supply, in `_mintInternal()`, the amount of shares to be minted is equal to the assets provided. An attacker can abuse of this situation and profit of the rounding down operation when calculating the amount of shares if the supply is non-zero.\\n```\\n        function _mintInternal(address _receiver, uint _balanceIncreased, uint _totalAsset\\n             ) internal returns (uint mintShares) {\\n                unfreezeTime[_receiver] = block.timestamp + mintFreezeInterval;\\n        if (freezeBuckets.interval > 0) {\\n             FreezeBuckets.addToFreezeBuckets(freezeBuckets, _balanceIncreased.toUint96());\\n        }\\n                 uint _totalSupply = totalSupply();\\n                    if (_totalAsset == 0 || _totalSupply == 0) {\\n                     mintShares = _balanceIncreased + _totalAsset;\\n                 } else {\\n             mintShares = (_balanceIncreased * _totalSupply) / _totalAsset;\\n             }\\n            if (mintShares == 0) {\\n        revert ZeroAmount();\\n        }\\n        _mint(_receiver, mintShares);\\n        }\\n```\\n\\nConsider the following scenario.\\nAlice wants to deposit 2M * 1e6 USDC to a pool.\\nBob observes Alice's transaction, frontruns to deposit 1 wei USDC to mint 1 wei share, and transfers 1 M * 1e6 USDC to the pool.\\nAlice's transaction is executed, since _totalAsset = 1M * 1e6 + 1 and totalSupply = 1, Alice receives 2M * 1e6 * 1 / (1M * 1e6 + 1) = 1 share.\\nThe pool now has 3M*1e6 +1 assets and distributed 2 shares. Bob profits 0.5 M and Alice loses 0.5 M USDC.
When _totalSupply == 0, send the first min liquidity LP tokens to the zero address to enable share dilution Another option is to use the ERC4626 implementation(https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC4626.sol#L199C14-L208) from OZ.
```\\n        function _mintInternal(address _receiver, uint _balanceIncreased, uint _totalAsset\\n             ) internal returns (uint mintShares) {\\n                unfreezeTime[_receiver] = block.timestamp + mintFreezeInterval;\\n        if (freezeBuckets.interval > 0) {\\n             FreezeBuckets.addToFreezeBuckets(freezeBuckets, _balanceIncreased.toUint96());\\n        }\\n                 uint _totalSupply = totalSupply();\\n                    if (_totalAsset == 0 || _totalSupply == 0) {\\n                     mintShares = _balanceIncreased + _totalAsset;\\n                 } else {\\n             mintShares = (_balanceIncreased * _totalSupply) / _totalAsset;\\n             }\\n            if (mintShares == 0) {\\n        revert ZeroAmount();\\n        }\\n        _mint(_receiver, mintShares);\\n        }\\n```\\n