Skip to content

Commit

Permalink
SiAL 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
a17 committed Mar 4, 2025
1 parent f6b21e5 commit f17659d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/strategies/SiloAdvancedLeverageStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import {IFlashLoanRecipient} from "../integrations/balancer/IFlashLoanRecipient.
import {IBVault} from "../integrations/balancer/IBVault.sol";

/// @title Silo V2 advanced leverage strategy
/// Changelog:
/// 1.0.1: initVariants bugfix
/// @author Alien Deployer (https://github.com/a17)
contract SiloAdvancedLeverageStrategy is LeverageLendingBase, IFlashLoanRecipient {
using SafeERC20 for IERC20;
Expand All @@ -34,7 +36,7 @@ contract SiloAdvancedLeverageStrategy is LeverageLendingBase, IFlashLoanRecipien
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

/// @inheritdoc IControllable
string public constant VERSION = "1.0.0";
string public constant VERSION = "1.0.1";

/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* INITIALIZATION */
Expand Down Expand Up @@ -119,7 +121,7 @@ contract SiloAdvancedLeverageStrategy is LeverageLendingBase, IFlashLoanRecipien
uint len = params.initAddresses.length / 4;
variants = new string[](len);
addresses = new address[](len * 4);
nums = new uint[](0);
nums = new uint[](len);
ticks = new int24[](0);
for (uint i; i < len; ++i) {
address collateralAsset = IERC4626(params.initAddresses[i * 2]).asset();
Expand All @@ -129,6 +131,7 @@ contract SiloAdvancedLeverageStrategy is LeverageLendingBase, IFlashLoanRecipien
addresses[i * 2 + 1] = params.initAddresses[i * 2 + 1];
addresses[i * 2 + 2] = params.initAddresses[i * 2 + 2];
addresses[i * 2 + 3] = params.initAddresses[i * 2 + 3];
nums[i] = params.initNums[i];
}
}

Check warning

Code scanning / Slither

Divide before multiply Medium

Check notice

Code scanning / Slither

Calls inside a loop Low

Check notice

Code scanning / Slither

Calls inside a loop Low


Expand Down
4 changes: 2 additions & 2 deletions test/strategies/SiAL.Sonic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ contract SiloAdvancedLeverageStrategyTest is SonicSetup, UniversalTest {
}

function testSiALSonic() public universalTest {
_addStrategy(SonicLib.SILO_VAULT_23_wstkscUSD, SonicLib.SILO_VAULT_23_USDC, 80_00);
//_addStrategy(SonicLib.SILO_VAULT_23_wstkscUSD, SonicLib.SILO_VAULT_23_USDC, 80_00);
// not work because Swapper need support longer route
//_addStrategy(SonicLib.SILO_VAULT_26_wstkscETH, SonicLib.SILO_VAULT_26_wETH, 80_00);
//_addStrategy(SonicLib.SILO_VAULT_22_wOS, SonicLib.SILO_VAULT_22_wS, 87_00);
_addStrategy(SonicLib.SILO_VAULT_22_wOS, SonicLib.SILO_VAULT_22_wS, 87_00);
}

function _addStrategy(
Expand Down
1 change: 1 addition & 0 deletions test/strategies/SiL.LeverageDebug.Sonic.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ contract SiloLeverageLendingStrategyDebugTest is Test {
vault = IStrategy(STRATEGY).vault();
multisig = IPlatform(IControllable(STRATEGY).platform()).multisig();
factory = IFactory(IPlatform(IControllable(STRATEGY).platform()).factory());
//console.logBytes4(type(ILeverageLendingStrategy).interfaceId);
}

function testSiloDepositWithdrawUsersImpact() public {
Expand Down

0 comments on commit f17659d

Please sign in to comment.