8000 Create new USDC stream by MishaShWoof · Pull Request #160 · woof-software/comet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Create new USDC stream #160

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 26 commits into
base: main
Choose a base branch
from
Open

Conversation

MishaShWoof
Copy link
Collaborator

params:
Recipient - 0xc10785fB7b1adD4fD521A27d0d55c5561EEf0940
Seed - 17710 COMP
Distribute 700,000 USDC
Duration - 2 months
Slippage - 0.5%

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();

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