Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.12 KB

055.md

File metadata and controls

29 lines (15 loc) · 1.12 KB

moneyversed

high

Reentrancy vulnerability in acceptBid function

Summary

The acceptBid function may be vulnerable to a reentrancy attack. If the ERC20 token used as principal is malicious and allows for a reentrant call, it could exploit the contract during the _transferTokens call.

Vulnerability Detail

In the LenderCommitmentForwarder.sol contract, the acceptBid function may be susceptible to reentrancy attacks. If the ERC20 token used as principal is malicious and allows for a reentrant call, it could exploit the contract during the _transferTokens call.

Impact

Potential for reentrancy attacks, leading to unexpected behavior or loss of funds.

Code Snippet

https://github.com/sherlock-audit/2023-03-teller/blob/main/teller-protocol-v2/packages/contracts/contracts/LenderCommitmentForwarder.sol#L390

Tool used

Manual Review

Recommendation

Implement a reentrancy guard, such as the ReentrancyGuard from the OpenZeppelin library, to protect against potential reentrancy attacks. Ensure the contract's state is updated before interacting with external contracts or tokens to reduce the risk of reentrancy.