When changing state variables events are not emitted.
src\Lender.sol
setLenderFee
function
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L84-L87
setBorrowerFee
function
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L92-L95
setFeeReceiver
function
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L100-L102
src\Staking.sol
deposit
function
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Staking.sol#L38-L42
withdraw
function
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Staking.sol#L46-L50
claim
function
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Staking.sol#L53-L58
The end user may be confused about state changes
Manual
Emit proper events so that off-chain monitoring can be implemented.
For setLenderFee
function emit event LenderFeeUpdated(uint indexed fee)
For setBorrowerFee
function emit event BorrowerFeeUpdated(uint indexed fee)
For setFeeReceiver
function emit event ReceiverFeeUpdated(uint indexed fee)
For deposit
function emit event Deposited(address indexed from, uint256 amount)
For withdraw
function emit event Withdrawn(address indexed from, uint256 amount)
For claim
function emit event Claimed(address indexed from, uint256 amount)
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.