Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: high
Invalid

Malicious user will steal money from other user

Summary

In RToken.solin transferFrom function Malicious user will give sender address as user address and recipient address as own address. Using this malicious user will be able to steal money from other user.

Vulnerability Details

In RToken.solin transferFrom function Malicious user will give sender address as user address and recipient address as own address. Using this malicious user will be able to steal money from other user.

function transferFrom(address sender, address recipient, uint256 amount) public override(ERC20, IERC20) returns (bool) {
uint256 scaledAmount = amount.rayDiv(_liquidityIndex);
return super.transferFrom(sender, recipient, scaledAmount);
}

Impact

Users will lost his own money.

Tools Used

Manual review

Recommendations

In RToken.solin transferFrom function use sender address equal to msg.sender

function transferFrom(address sender, address recipient, uint256 amount) public override(ERC20, IERC20) returns (bool) {
+ // Logic for sender = msg.sender or not ? if not then revert
uint256 scaledAmount = amount.rayDiv(_liquidityIndex);
return super.transferFrom(sender, recipient, scaledAmount);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.