deposit- this function allows a user to deposit an ERC-20 asset and receive bathTokens at a ratio of
underlyingBalance()with their deposit. This means that a user will receive shares in the pool that are proportional to the performance of shares in the pool already; this ensures there is no way to game the system and upside is correctly shared across all participants. A
bathTokenrepresents a share of the underlying liquidity and has a claim on future yield.
amount- the quantity of the ERC-20 asset to deposit.
withdraw- this function withdraws provided liquidity and any accrued yield that the user has (via the burning of BathTokens) earned back to their wallet.
shares- the quantity of
bathTokens(shares in the underlying pool) to withdraw in exchange for the underlying ERC-20 asset.