Skip to content
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

Dev #2

Merged
merged 7 commits into from
Dec 14, 2023
Merged

Dev #2

merged 7 commits into from
Dec 14, 2023

Conversation

a17
Copy link
Member

@a17 a17 commented Dec 13, 2023

No description provided.

Comment on lines +141 to +145
function sharePrice() external view returns (uint) {
uint units = 10 ** uint(decimals());
uint totalSupply_ = totalSupply();
return totalSupply_ == 0 ? units : units * totalAssets() / totalSupply_;
}

Check warning

Code scanning / Slither

Dangerous strict equalities Medium

HarvesterVault.sharePrice() uses a dangerous strict equality:
- totalSupply_ == 0
src/PearlStrategy.sol Fixed Show fixed Hide fixed
IERC20(asset).approve(gauge_, type(uint).max);
address _gaugeRewardToken = IPearlGaugeV2(gauge_).rewardToken();

Check notice

Code scanning / Slither

Missing zero address validation Low

src/PearlStrategy.sol Fixed Show fixed Hide fixed
src/PearlStrategy.sol Fixed Show fixed Hide fixed
Comment on lines +104 to +108
function sharePrice() external view returns (uint) {
uint units = 10 ** uint(decimals());
uint totalSupply_ = totalSupply();
return totalSupply_ == 0 ? units : units * totalAssets() / totalSupply_;
}

Check warning

Code scanning / Slither

Dangerous strict equalities Medium

CompounderVault.sharePrice() uses a dangerous strict equality:
- totalSupply_ == 0
src/PearlStrategy.sol Fixed Show fixed Hide fixed

constructor(address governance_) {
require(governance_ != address(0), "WRONG_INPUT");
governance = governance_;
_operators.add(governance_);
}

function setup(address ifo_, address ve_, address stgn_, address multigauge_) external {
function setup(address ifo_, address ve_, address stgn_, address multigauge_, address liquidator_) external {

Check notice

Code scanning / Slither

Missing zero address validation Low

@@ -0,0 +1,119 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.21;

Check warning

Code scanning / Slither

Incorrect versions of Solidity Warning

Pragma version^0.8.21 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.
src/interfaces/ITetuLiquidator.sol Fixed Show fixed Hide fixed
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.21;

Check warning

Code scanning / Slither

Incorrect versions of Solidity Warning

Pragma version^0.8.21 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.
event VeTokenLocked(address indexed stakingToken, address indexed account, uint tokenId);
event VeTokenUnlocked(address indexed stakingToken, address indexed account, uint tokenId);

// *************************************************************
// INIT
// *************************************************************

function init(address controller_, address _ve, address _defaultRewardToken) external initializer {
function init(address controller_, address _defaultRewardToken) external initializer {

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

// todo Compounder CVR
address _compounder = compounder;
ITetuLiquidator l = ITetuLiquidator(controller.liquidator());
address asset = IERC4626(_compounder).asset();

Check notice

Code scanning / Slither

Local variable shadowing Low


address public compounder;

constructor(address vault_, address gauge_, bool ifo_, address compounder_) StrategyStrictBase(vault_) {

Check notice

Code scanning / Slither

Missing zero address validation Low


address public compounder;

constructor(address vault_, address gauge_, bool ifo_, address compounder_) StrategyStrictBase(vault_) {

Check notice

Code scanning / Slither

Missing zero address validation Low

} else {
// todo Compounder CVR
address _compounder = compounder;

Check warning

Code scanning / Slither

Variable names too similar Warning

@a17 a17 merged commit 5d645a3 into main Dec 14, 2023
4 checks passed
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.

1 participant