Open code423n4 opened 2 years ago
The contract does not hold any funds except the funds that the user itself sends to the contract. I'm considering adding reentry protection anyway.
As there is no current exploit, I don't think this can be argued to be anything but non-critical
.
Handle
defsec
Vulnerability details
Impact
In the contract there is no re-entrancy mitigations. Contracts interact with various outside sources (tokens, aave pools, other possible strategies that may be added in the future, etc). so, for instance, now you have to be careful and do not allow tokens that have a receiver callback (e.g. erc777) or untrustable sources of yield (strategies).
Proof of Concept
The contract does not follow Check Effect Interaction Pattern. It is vulnerable to re-entrancy.
Locations
Tools Used
None
Recommended Mitigation Steps
Consider using ReentrancyGuard on main action functions: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol