8000 WOOF! Software USDC stream by dmitriy-woof-software · Pull Request #985 · compound-finance/comet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WOOF! Software USDC stream #985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dmitriy-woof-software
Copy link
Contributor

No description provided.

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 Note

Consider making costructor payable to save gas.
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 Note

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

lastClaimTimestamp = block.timestamp;
suppliedAmount += owed;

Check notice

Code scanning / Semgrep OSS

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

+= costs more gas than = + for state variables.

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

Check notice

Code scanning / Semgrep OSS

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

+= costs more gas than = + for state variables.
Comment on lines +130 to +133
if(
msg.sender != COMPOUND_TIMELOCK &&
block.timestamp < startTimestamp + STREAM_DURATION + 10 days
) revert StreamNotFinished();
8EA3

Check notice

Code scanning / Semgrep OSS

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

Using nested is cheaper than using && multiple check combinations.
There are more advantages, such as easier to read code and better coverage reports.
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.

2 participants
0