
Teller Finance audit contest
A public audit contest on Sherlock (lending), completed on 23rd April 2024. 0xSimao placed #3. 17 of his findings are published: 7 high severity and 10 medium.
What Teller Finance is
Teller is a non-custodial lending book that enables time-based loans. The protocol supports any ERC-20 token or ERC-721 / ERC-1155 NFT as collateral, with no margin liquidations for the duration of a loan. Teller is live on Ethereum, Base, Arbitrum and Polygon.
Scope
The TellerV2 lending book: bids and repayments, the lender commitment forwarder, collateral escrow and the market registry.
High severity findings
_sendOrEscrowFundswill brick LCG funds causing insolvencyburnSharesToWithdrawEarningsburns before math, causing the share value to increase- liquidateDefaultedLoanWithIncentive sends the collateral to the wrong account
- Anyone can steal pool shares from lender group if no-revert-on-failure tokens are used
- Drained lender due to
LenderCommitmentGroup_Smart::acceptFundsForAcceptBid()_collateralAmountbySTANDARD_EXPANSION_FACTORmultiplication LenderCommitmentGroup_Smartpicks the wrong Uniswap price, allowing borrowing at a discount by swapping before withdrawing- Interest rate in
LenderCommitmentGroup_Smartmay be easily manipulated by depositing, taking a loan and withdrawing
Medium severity findings
- Issue #497 'Add parameter to lender accept bid for MaxMarketFee' from previous audit is still present
- Incorrect selector in
FlashRolloverLoan_G5::_acceptCommitment()does not matchSmartCommitmentForwarder::acceptCommitmentWithRecipient() FlashRolloverLoan_G5will fail forLenderCommitmentGroup_Smartdue toCollateralManagerpulling collateral fromFlashRolloverLoan_G5FlashRolloverLoan_G5will not work for certain tokens due to not setting the approval to0after repaying a loan- Performing a direct multiplication in
_getPriceFromSqrtX96will overflow for some uniswap pools - Missing
__Ownable_init()call inLenderCommitmentGroup_Smart::initialize() LenderCommitmentGroup_Smartdoes not usemulDivwhen converting between token and share amounts, possibly leading to DoS or loss of fundsLenderCommitmentGroup_Smart_test::addPrincipalToCommitmentGroup/burnSharesToWithdrawEarnings()are vulnerable to slippage attacks- APRs are lower than they should
LenderCommitmentGrouppools will have incorrect exchange rate when fee-on-transfer tokens are used
The contest