DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: low
Invalid

`balanceDeployed` can be manipulated by using donation attack

Summary

A malicious actor could manipulate the StrategyMainnet::balanceDeployed, StrategyArb::balanceDeployed and StrategyOp::balanceDeployed by depositing either the underlying or asset token into the strategy contract.

Vulnerability Details

The protocol has a balanceDeployed function in all three contracts, which allows the protocol / anyone to view the current state of balance deployed.

function balanceDeployed() public view returns (uint256) {
return transmuter.getUnexchangedBalance(address(this)) + underlying.balanceOf(address(this)) + asset.balanceOf(address(this));
}

However, due to the use of balanceOf(address(this)), it makes the contract susceptible to donation attack, manipulating the balanceDeployed value.

Impact

This function is likely to be used by protocol, protocol's keeper and users, returning a false value could hinder the operations of off-chain mechanim of the protocol.

Tools Used

Manual Review

Recommendations

It is recommmended to directly fetch values from the transmuter itself.

Updates

Appeal created

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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