The Vault contracts deposit(uint256 assets, address to), deposit(uint256 assets, address to, uint256 minSharesOut), mint(uint256 shares, address to), and startRedeem(uint256 shares, address beneficiary) functions all require msg.sender to be the actual staker, and the stakers approved spender cannot call these functions on behalf of the staker.
According to https://eips.ethereum.org/EIPS/eip-4626:
Since the Vault contracts deposit(uint256 assets, address to), deposit(uint256 assets, address to, uint256 minSharesOut), mint(uint256 shares, address to), and startRedeem(uint256 shares, address beneficiary) functions do not support the stakers approved spender to call these functions on behalf of the staker, these functions are not EIP-4626 compliant.
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Vault.sol#L78-L87
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Vault.sol#L94-L103
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Vault.sol#L110-L119
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Vault.sol#L125-L149
The Vault contracts deposit(uint256 assets, address to), deposit(uint256 assets, address to, uint256 minSharesOut), mint(uint256 shares, address to), and startRedeem(uint256 shares, address beneficiary) functions can be updated to allow the stakers approved spender to call these functions on behalf of the staker.
