There is no check for address(staking) != address(0). Which can cause WETH to be sent to address(0) causing loss for funds.
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Fees.sol#L43
Add a check address(staking) != address(0) at the begining of the method.
Anybody can call this function and the swapped amount local variable is not used. Rather all the WETH hold by the contract is trasfered to the staking contract.
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Fees.sol#L42-L43
There is no check to validate if the msg.sender is the borrower of the loan. Instead the balance is deducted from the msg.sender and is debt of the borrower of the loan is repaid.
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L316-L332
A check should be in place to ensure the msg.sender is the borrower before proceeding further.
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.