Yearn: Re-entrancy attack during deposit
During the deposit in the `supplyTokenTo` function, the token transfer is happening after the shares are minted and before tokens are deposited to the yearn vault:\\n```\\nfunction supplyTokenTo(uint256 \\_amount, address to) override external {\\n    uint256 shares = \\_tokenToShares(\\_amount);\\n\\n    \\_mint(to, shares);\\n\\n    // NOTE: we have to deposit after calculating shares to mint\\n    token.safeTransferFrom(msg.sender, address(this), \\_amount);\\n\\n    \\_depositInVault();\\n\\n    emit SuppliedTokenTo(msg.sender, shares, \\_amount, to);\\n}\\n```\\n\\nIf the token allows the re-entrancy (e.g., ERC-777), the attacker can do one more transaction during the token transfer and call the `supplyTokenTo` function again. This second call will be done with already modified shares from the first deposit but non-modified token balances. That will lead to an increased amount of shares minted during the `supplyTokenTo`. By using that technique, it's possible to steal funds from other users of the contract.
Have the re-entrancy guard on all the external functions.
```\\nfunction supplyTokenTo(uint256 \\_amount, address to) override external {\\n    uint256 shares = \\_tokenToShares(\\_amount);\\n\\n    \\_mint(to, shares);\\n\\n    // NOTE: we have to deposit after calculating shares to mint\\n    token.safeTransferFrom(msg.sender, address(this), \\_amount);\\n\\n    \\_depositInVault();\\n\\n    emit SuppliedTokenTo(msg.sender, shares, \\_amount, to);\\n}\\n```\\n