Closed c4-bot-6 closed 8 months ago
https://github.com/code-423n4/2024-02-spectra/blob/main/src/tokens/PrincipalToken.sol#L628 https://github.com/code-423n4/2024-02-spectra/blob/main/src/tokens/YieldToken.sol#L101
Passing an arbitrary from address to transferFrom (or safeTransferFrom) can lead to loss of funds, because anyone can transfer tokens from the from address if an approval is made.
from
transferFrom
safeTransferFrom
Found in src/tokens/PrincipalToken.sol Line: 628
IERC20(ibt).safeTransferFrom(address(_receiver), address(this), _amount + fee);
Found in src/tokens/YieldToken.sol Line: 101
return super.transferFrom(from, to, amount);
Manual Analysis
Token-Transfer
gzeon-c4 marked the issue as insufficient quality report
it need be a flashloan receiver
JustDravee marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-02-spectra/blob/main/src/tokens/PrincipalToken.sol#L628 https://github.com/code-423n4/2024-02-spectra/blob/main/src/tokens/YieldToken.sol#L101
Vulnerability details
Impact
Passing an arbitrary
from
address totransferFrom
(orsafeTransferFrom
) can lead to loss of funds, because anyone can transfer tokens from thefrom
address if an approval is made.Vulnerability Details
Found in src/tokens/PrincipalToken.sol Line: 628
Found in src/tokens/YieldToken.sol Line: 101
Proof of Concept
Tools Used
Manual Analysis
Assessed type
Token-Transfer