Contract fails to deliver promised returns, but doesn't lose value
Description
Brief/Intro
AlchemistV3::getTotalDeposited doesn't reflect the correct total deposited. It returns the balance of the contract, but that contradicts with the purpose of the presence of the variable _mytSharesDeposited, which is present to differentiate between the contract's balance and the amount deposited.
Vulnerability Details
In this comment, it is said that the _mytSharesDeposited variable is used to differentiate between tokens deposited and balance of the contract.
This means that _mytSharesDeposited reflects the tokens deposited, and this is why it is increased in deposit()here
But, if we look at getTotalDeposited(), we find that it returns the balance of the contract:
This contradicts the comment above, as the balance is not always equal the total deposited amount (due to direct token transfers for example).
Impact Details
getTotalDeposited() fails to deliver promised returns, as it fails to return the correct total amount deposited.