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

Silo strategy #220

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

Silo strategy #220

wants to merge 3 commits into from

Conversation

0xhokugava
Copy link
Member

No description provided.

@0xhokugava 0xhokugava linked an issue Feb 6, 2025 that may be closed by this pull request
@0xhokugava 0xhokugava requested a review from a17 February 6, 2025 18:38
Comment on lines +42 to +44
function extra() external pure returns (bytes32) {
return CommonLib.bytesToBytes32(abi.encodePacked(bytes3(0x00d395), bytes3(0x000000)));
}

Check warning

Code scanning / Slither

Too many digits Warning

) internal virtual override returns (uint[] memory amountsOut) {
amountsOut = new uint[](1);
StrategyBaseStorage storage $base = _getStrategyBaseStorage();
amountsOut[0] = ISilo($base._underlying).withdraw(value, receiver, address(this), ISilo.CollateralType.Collateral);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error. value is ISilo shares, not asset amount. need use redeem or calculate asset amount to withdraw

@0xhokugava 0xhokugava requested a review from a17 February 10, 2025 15:36
Comment on lines +293 to +296
function _getMarketId() internal view returns (uint marketId) {
IFactory.Farm memory farm = _getFarm();
marketId = ISiloConfig(ISilo(farm.addresses[1]).siloConfig()).SILO_ID();
}

Check notice

Code scanning / Slither

Calls inside a loop Low

Comment on lines +123 to +131
function _genDesc(address silo) internal view returns (string memory) {
return string.concat(
"Earn ",
" and supply APR by lending ",
IERC20Metadata(ISilo(silo).asset()).symbol(),
" to Silo V2 ",
CommonLib.u2s(_getMarketId(silo))
);
}
Comment on lines +133 to +135
function _getMarketId(address _silo) internal view returns (uint marketId) {
marketId = ISiloConfig(ISilo(_silo).siloConfig()).SILO_ID();
}

Check notice

Code scanning / Slither

Calls inside a loop Low

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.17%. Comparing base (9463c87) to head (f1acd3b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   93.12%   93.17%   +0.04%     
==========================================
  Files          91       92       +1     
  Lines        8296     8348      +52     
  Branches      708      711       +3     
==========================================
+ Hits         7726     7778      +52     
  Misses        534      534              
  Partials       36       36              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

📜 [AWAITING] Silo
2 participants