Closed code423n4 closed 2 years ago
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/CrvDepositorWrapper.sol#L132
Issue: If BPT is sent to the contract for any reason, an attacker can call deposit and claim the BPT for themselves.
Consequences: Loss of any BPT sent to the contract directly.
Proof of Concept:
deposit
_investBalToPool
Mitigations: User education and documentation.
As I've said in other issues, users who directly send funds randomly to smart contracts should expect to lose them. Invalid.
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/CrvDepositorWrapper.sol#L132
Vulnerability details
Issue: If BPT is sent to the contract for any reason, an attacker can call deposit and claim the BPT for themselves.
Consequences: Loss of any BPT sent to the contract directly.
Proof of Concept:
deposit
afterwards.deposit
call._investBalToPool
.Mitigations: User education and documentation.