Zap from a different chain
Deposit any token from any chain into any strategies in a single transaction
struct UniversalHookPayload {
address to;
uint32 txGas;
bytes callData;
}
struct Strategy {
address strategy; // The vault to deposit into
address underlyingToken; // The token required for deposit
uint256 amountToDeposit; // The amount of underlying token to deposit
address lpReceiver; // The receiver of LP tokens
bytes4 funcSelector; // Determines which function to call based on the type of strategy
bytes loopingStrategy; // Empty if not a looping strategy; otherwise, it contains the encoded data for SiloLoopingStrategy/AaveLoopingStrategy
}
struct SiloLoopingStrategy {
bool isVaultProtected; // Indicates if the Silo’s vault is non-borrowable
uint256 leverage; // Leverage of the position
uint256 flashAmount; // Amount of the borrow token to flash loan from the Silo Borrow vault
bytes swapFlashloanData; // Swap data to convert the borrow token into the deposit token, encoded per the Swap struct
}
struct Swap {
address fromToken;
uint256 fromAmount;
address dexAggregatorRouter;
bytes data;
uint256 value;
}
Last updated

