Several public functions can be made external
The following functions can be made external as they are not called within the contracts they are defined
function sellProfits(address _profits) public {... // Fees.sol line 26
function borrow(Borrow[] calldata borrows) public { ... // Lender.sol line 232
function repay(uint256[] calldata loanIds) public {. ... // Lender.sol line 292
function startAuction(uint256[] calldata loanIds) public { .. // Lender.sol line 437
function seizeLoan(uint256[] calldata loanIds) public {... // Lender.sol line 548
function refinance(Refinance[] calldata refinances) public { ... // Lender.sol line 591
Informational + Gas: It is best practise as it represents functions are truly external to contract and never called in the contracts like public functions. It saves gas as external functions can read directly from calldata, there is no need to write arguments to memory first in the case of public functions. This saves gas of copying to memory computations. so external functions are cheaper than public functions. As can be seen all functions listed take in calldata arguments
Manual Analysis
It is recommended to make all public functions not called in the contracts they are defined as external functions
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.