SpotManager
Inherits: Initializable, OwnableUpgradeable, ISpotManager
Author: Logarithm Labs
SpotManager is a dedicated smart contract that manages spot positions for a trading strategy, enabling it to buy or sell assets on a decentralized exchange (DEX) or other spot market. This manager operates in tandem with a basis strategy, allowing it to adjust the spot position dynamically based on the strategy’s target exposure. The primary objective is to provide liquidity for the basis trade, maintaining optimal spot exposure relative to the short hedge position.
SpotManager is an upgradeable smart contract, deployed through the beacon proxy pattern.
State Variables
SpotManagerStorageLocation
Functions
_getSpotManagerStorage
authCaller
Authorizes a caller if it is the specified account.
initialize
_setManualSwapPath
buy
Buys product in the spot market.
Parameters
amount
uint256
The asset amount to be swapped to product.
swapType
SwapType
The swap type.
swapData
bytes
The data used in swapping if necessary.
sell
Sells product in the spot market.
Parameters
amount
uint256
The product amount to be swapped to asset.
swapType
SwapType
The swap type.
swapData
bytes
The data used in swapping if necessary.
exposure
The spot exposure that is needed to be hedged by the perpetual positions.
uniswapV3SwapCallback
_verifyCallback
strategy
The strategy address.
asset
The asset address.
product
The product address.
Events
SpotBuy
Emitted when product is bought in spot markets.
SpotSell
Emitted when product is sold in spot markets.
Structs
SpotManagerStorage
Last updated