================ Liquidity Pool ================ `Contract `_ =========================================================================================================== Overview ================ Liquidity pools on Mero either support ERC20 tokens or ETH. The abstract base contract is the ``LiquidityPool`` contract. Depending on the underlying asset, the child contract is either an ``Erc20Pool`` contract or an ``EthPool`` contract. Users can deposit the single underlying asset in exchange for pool-specific LP Tokens. LP token holders can redeem their LP tokens for the underlying at any point in time. The LP token appreciates over the underlying as the pool accrues interest and fees over time Funds are held in part by the pool and by a pool-specific vault, which handles the yield-farming logic by allocating funds to a vault-specific strategy. The pool's LP token can be staked and used to pay for collateral top ups Withdrawal Fee ============== On withdrawals, a linearly decreasing withdrawal fee is enforced, which starts at a `MAX_WITHDRAWAL_FEE` and decreases linearly over 2 weeks to a `MIN_WITHDRAWAL_FEE`. The `LiquidityPool` contract maintains current withdrawal fees for each user, which are updated upon `deposit` and `redeem`. Upon `deposit`, the new fee percentage is calculated as the weighted average of the current balance at the current (linearly decreased) withdrawal fee and the added amount at the `MAX_WITHDRAWAL_FEE`. Note that actions are exempt from the withdrawal fee, i.e., when an action redeems funds for execution, it is not charged a withdrawal fee.