The transferFrom function in the setPool function uses an arbitrary address p.lender to transfer tokens from. If p.lender has not approved the contract to spend tokens on their behalf, the transferFrom will fail due to insufficient allowance. Ensure p.lender has called the approve function on the p.loanToken contract to set a sufficient allowance for the contract before calling the setPool function.
Alice approves this contract to spend her ERC20 tokens. Bob can call a and specify Alice's address as the from parameter in transferFrom, allowing him to transfer Alice's tokens to himself.
Lender.setPool(Pool) src/Lender.sol Lines #130-176; specifically #152-156 IERC20(p.loanToken).transferFrom
Alice approves this contract to spend her ERC20 tokens. Bob can call a and specify Alice's address as the from parameter in transferFrom, allowing him to transfer Alice's tokens to himself.
Manual Review.
Slither reference: https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom
Use msg.sender as from in transferFrom
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.