-
Notifications
You must be signed in to change notification settings - Fork 7
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
RetroBooster & BoostedStrategyBase #130
base: main
Are you sure you want to change the base?
Conversation
a17
commented
May 12, 2024
•
edited
Loading
edited
- RetroBooster
- hold veNFT
- increase lock period
- cast vote
- claim bribes
- hold pool strategy positions (NFT and ALM LP)
- store pool strategy earned Merkl rewards
- LiquidToken
- Platform
- boosters management
- Gauge
- BoostedStrategyBase
- skeleton
- logic
- tests
- ...
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
==========================================
- Coverage 94.73% 93.27% -1.47%
==========================================
Files 58 62 +4
Lines 4273 4340 +67
Branches 465 473 +8
==========================================
Hits 4048 4048
- Misses 77 144 +67
Partials 148 148 ☔ View full report in Codecov by Sentry. |
function __BoostedStrategyBase_init(address booster_) internal onlyInitializing { | ||
BoostedStrategyBaseStorage storage $ = _getBoostedStrategyBaseStorage(); | ||
$.booster = booster_; | ||
} |
Check warning
Code scanning / Slither
Dead-code Warning
abstract contract BoostedStrategyBase is StrategyBase, IBoostedStrategy { | ||
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ | ||
/* CONSTANTS */ | ||
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ | ||
|
||
/// @dev Version of BoostedStrategyBase implementation | ||
string public constant VERSION_BOOSTED_STRATEGY_BASE = "1.0.0"; | ||
|
||
// todo set | ||
// keccak256(abi.encode(uint256(keccak256("erc7201:stability.BoostedStrategyBase")) - 1)) & ~bytes32(uint256(0xff)); | ||
bytes32 private constant BOOSTEDSTRATEGYBASE_STORAGE_LOCATION = | ||
0xe61f0a7b2953b9e28e48cc07562ad7979478dcaee972e68dcf3b10da2cba6000; | ||
|
||
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ | ||
/* DATA TYPES */ | ||
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ | ||
|
||
/// @custom:storage-location erc7201:stability.BoostedStrategyBase | ||
struct BoostedStrategyBaseStorage { | ||
/// @inheritdoc IBoostedStrategy | ||
address booster; | ||
} | ||
|
||
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ | ||
/* INITIALIZATION */ | ||
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ | ||
|
||
//slither-disable-next-line naming-convention | ||
function __BoostedStrategyBase_init(address booster_) internal onlyInitializing { | ||
BoostedStrategyBaseStorage storage $ = _getBoostedStrategyBaseStorage(); | ||
$.booster = booster_; | ||
} | ||
|
||
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ | ||
/* VIEW FUNCTIONS */ | ||
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ | ||
|
||
/// @inheritdoc IBoostedStrategy | ||
function booster() external view returns (address) { | ||
return _getBoostedStrategyBaseStorage().booster; | ||
} | ||
|
||
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ | ||
/* INTERNAL LOGIC */ | ||
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ | ||
|
||
function _getBoostedStrategyBaseStorage() internal pure returns (BoostedStrategyBaseStorage storage $) { | ||
//slither-disable-next-line assembly | ||
assembly { | ||
$.slot := BOOSTEDSTRATEGYBASE_STORAGE_LOCATION | ||
} | ||
} | ||
} |
Check warning
Code scanning / Slither
Unimplemented functions Warning
- IControllable.VERSION()
- StrategyBase._assetsAmounts()
- StrategyBase._claimRevenue()
- StrategyBase._compound()
- StrategyBase._depositAssets(uint256[],bool)
- StrategyBase._liquidateRewards(address,address[],uint256[])
- StrategyBase._previewDepositAssets(address[],uint256[])
- StrategyBase._previewDepositAssets(uint256[])
- StrategyBase._processRevenue(address[],uint256[])
- StrategyBase._withdrawAssets(address[],uint256,address)
- StrategyBase._withdrawAssets(uint256,address)
- IStrategy.description()
- IStrategy.extra()
- IStrategy.getAssetsProportions()
- IStrategy.getRevenue()
- IStrategy.getSpecificName()
- IStrategy.initVariants(address)
- IStrategy.initialize(address[],uint256[],int24[])
- IStrategy.isHardWorkOnDepositAllowed()
- IStrategy.isReadyForHardWork()
- StrategyBase.strategyLogicId()
- StrategyBase.supportedVaultTypes()