Skip to content

WOOF! Software USDC stream#985

Open
dmitriy-woof-software wants to merge 17 commits into
compound-finance:mainfrom
woof-software:woof-software/create-usdc-stream
Open

WOOF! Software USDC stream#985
dmitriy-woof-software wants to merge 17 commits into
compound-finance:mainfrom
woof-software:woof-software/create-usdc-stream

Conversation

@dmitriy-woof-software

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread contracts/Streamer.sol
Comment on lines +74 to +80
constructor(address _receiver) {
if(_receiver == address(0)) revert ZeroAddress();

compOracleDecimals = AggregatorV3Interface(COMP_ORACLE).decimals();
usdcOracleDecimals = AggregatorV3Interface(USDC_ORACLE).decimals();
receiver = _receiver;
}

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.non-payable-constructor

Consider making costructor payable to save gas.
Comment thread contracts/Streamer.sol
Comment on lines +100 to +103
if(
msg.sender != receiver &&
block.timestamp < lastClaimTimestamp + 7 days
) revert NotReceiver();

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.use-nested-if

Using nested is cheaper than using && multiple check combinations. There are more advantages, such as easier to read code and better coverage reports.
Comment thread contracts/Streamer.sol
}

lastClaimTimestamp = block.timestamp;
suppliedAmount += owed;

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.inefficient-state-variable-increment

<x> += <y> costs more gas than <x> = <x> + <y> for state variables.
Comment thread contracts/Streamer.sol

lastClaimTimestamp = block.timestamp;
suppliedAmount += owed;
claimedCompAmount += compAmount;

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.inefficient-state-variable-increment

<x> += <y> costs more gas than <x> = <x> + <y> for state variables.
Comment thread contracts/Streamer.sol
Comment on lines +130 to +133
if(
msg.sender != COMPOUND_TIMELOCK &&
block.timestamp < startTimestamp + STREAM_DURATION + 10 days
) revert StreamNotFinished();

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: rules.solidity.performance.use-nested-if

Using nested is cheaper than using && multiple check combinations. There are more advantages, such as easier to read code and better coverage reports.
@MishaShWoof
MishaShWoof force-pushed the woof-software/create-usdc-stream branch from 90ec56c to 1a4acd7 Compare May 15, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants