Last active
February 24, 2021 22:53
-
-
Save richardliang/76c54a28db924e688c112d47b8089d07 to your computer and use it in GitHub Desktop.
FlexibleLeverageStrategyAdapter ABI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract IICManagerV2", | |
"name": "_manager", | |
"type": "address" | |
}, | |
{ | |
"components": [ | |
{ | |
"internalType": "contract ISetToken", | |
"name": "setToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICompoundLeverageModule", | |
"name": "leverageModule", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract IComptroller", | |
"name": "comptroller", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICompoundPriceOracle", | |
"name": "priceOracle", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICErc20", | |
"name": "targetCollateralCToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICErc20", | |
"name": "targetBorrowCToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "collateralAsset", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrowAsset", | |
"type": "address" | |
} | |
], | |
"internalType": "struct FlexibleLeverageStrategyAdapter.ContractSettings", | |
"name": "_strategy", | |
"type": "tuple" | |
}, | |
{ | |
"components": [ | |
{ | |
"internalType": "uint256", | |
"name": "targetLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "minLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "maxLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "recenteringSpeed", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "rebalanceInterval", | |
"type": "uint256" | |
} | |
], | |
"internalType": "struct FlexibleLeverageStrategyAdapter.MethodologySettings", | |
"name": "_methodology", | |
"type": "tuple" | |
}, | |
{ | |
"components": [ | |
{ | |
"internalType": "uint256", | |
"name": "unutilizedLeveragePercentage", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "twapMaxTradeSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "twapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "slippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "string", | |
"name": "exchangeName", | |
"type": "string" | |
}, | |
{ | |
"internalType": "bytes", | |
"name": "exchangeData", | |
"type": "bytes" | |
} | |
], | |
"internalType": "struct FlexibleLeverageStrategyAdapter.ExecutionSettings", | |
"name": "_execution", | |
"type": "tuple" | |
}, | |
{ | |
"components": [ | |
{ | |
"internalType": "uint256", | |
"name": "etherReward", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedSlippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedTwapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedTwapMaxTradeSize", | |
"type": "uint256" | |
} | |
], | |
"internalType": "struct FlexibleLeverageStrategyAdapter.IncentiveSettings", | |
"name": "_incentive", | |
"type": "tuple" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "bool", | |
"name": "_status", | |
"type": "bool" | |
} | |
], | |
"name": "AnyoneCallableUpdated", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "_caller", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "bool", | |
"name": "_status", | |
"type": "bool" | |
} | |
], | |
"name": "CallerStatusUpdated", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_currentLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_newLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_chunkRebalanceNotional", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_totalRebalanceNotional", | |
"type": "uint256" | |
} | |
], | |
"name": "Disengaged", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_currentLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_newLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_chunkRebalanceNotional", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_totalRebalanceNotional", | |
"type": "uint256" | |
} | |
], | |
"name": "Engaged", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_unutilizedLeveragePercentage", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_twapMaxTradeSize", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_twapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_slippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "string", | |
"name": "_exchangeName", | |
"type": "string" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "bytes", | |
"name": "_exchangeData", | |
"type": "bytes" | |
} | |
], | |
"name": "ExecutionSettingsUpdated", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_etherReward", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_incentivizedLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_incentivizedSlippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_incentivizedTwapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_incentivizedTwapMaxTradeSize", | |
"type": "uint256" | |
} | |
], | |
"name": "IncentiveSettingsUpdated", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_targetLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_minLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_maxLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_recenteringSpeed", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_rebalanceInterval", | |
"type": "uint256" | |
} | |
], | |
"name": "MethodologySettingsUpdated", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_currentLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_newLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_chunkRebalanceNotional", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_totalRebalanceNotional", | |
"type": "uint256" | |
} | |
], | |
"name": "RebalanceIterated", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_currentLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_newLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_chunkRebalanceNotional", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_totalRebalanceNotional", | |
"type": "uint256" | |
} | |
], | |
"name": "Rebalanced", | |
"type": "event" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_currentLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_newLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_rebalanceNotional", | |
"type": "uint256" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "_etherIncentive", | |
"type": "uint256" | |
} | |
], | |
"name": "RipcordCalled", | |
"type": "event" | |
}, | |
{ | |
"inputs": [], | |
"name": "anyoneCallable", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "callAllowList", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "disengage", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "engage", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "execution", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "unutilizedLeveragePercentage", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "twapMaxTradeSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "twapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "slippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "string", | |
"name": "exchangeName", | |
"type": "string" | |
}, | |
{ | |
"internalType": "bytes", | |
"name": "exchangeData", | |
"type": "bytes" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "getCurrentEtherIncentive", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "getCurrentLeverageRatio", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "gulp", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "incentive", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "etherReward", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedSlippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedTwapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedTwapMaxTradeSize", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "iterateRebalance", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "lastTradeTimestamp", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "manager", | |
"outputs": [ | |
{ | |
"internalType": "contract IICManagerV2", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "methodology", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "targetLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "minLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "maxLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "recenteringSpeed", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "rebalanceInterval", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "rebalance", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "ripcord", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "uint256", | |
"name": "unutilizedLeveragePercentage", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "twapMaxTradeSize", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "twapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "slippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "string", | |
"name": "exchangeName", | |
"type": "string" | |
}, | |
{ | |
"internalType": "bytes", | |
"name": "exchangeData", | |
"type": "bytes" | |
} | |
], | |
"internalType": "struct FlexibleLeverageStrategyAdapter.ExecutionSettings", | |
"name": "_newExecutionSettings", | |
"type": "tuple" | |
} | |
], | |
"name": "setExecutionSettings", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "uint256", | |
"name": "etherReward", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedSlippageTolerance", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedTwapCooldownPeriod", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "incentivizedTwapMaxTradeSize", | |
"type": "uint256" | |
} | |
], | |
"internalType": "struct FlexibleLeverageStrategyAdapter.IncentiveSettings", | |
"name": "_newIncentiveSettings", | |
"type": "tuple" | |
} | |
], | |
"name": "setIncentiveSettings", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"components": [ | |
{ | |
"internalType": "uint256", | |
"name": "targetLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "minLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "maxLeverageRatio", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "recenteringSpeed", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "rebalanceInterval", | |
"type": "uint256" | |
} | |
], | |
"internalType": "struct FlexibleLeverageStrategyAdapter.MethodologySettings", | |
"name": "_newMethodologySettings", | |
"type": "tuple" | |
} | |
], | |
"name": "setMethodologySettings", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "shouldRebalance", | |
"outputs": [ | |
{ | |
"internalType": "enum FlexibleLeverageStrategyAdapter.ShouldRebalance", | |
"name": "", | |
"type": "uint8" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "strategy", | |
"outputs": [ | |
{ | |
"internalType": "contract ISetToken", | |
"name": "setToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICompoundLeverageModule", | |
"name": "leverageModule", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract IComptroller", | |
"name": "comptroller", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICompoundPriceOracle", | |
"name": "priceOracle", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICErc20", | |
"name": "targetCollateralCToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract ICErc20", | |
"name": "targetBorrowCToken", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "collateralAsset", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "borrowAsset", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "twapLeverageRatio", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bool", | |
"name": "_status", | |
"type": "bool" | |
} | |
], | |
"name": "updateAnyoneCallable", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address[]", | |
"name": "_callers", | |
"type": "address[]" | |
}, | |
{ | |
"internalType": "bool[]", | |
"name": "_statuses", | |
"type": "bool[]" | |
} | |
], | |
"name": "updateCallerStatus", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "withdrawEtherBalance", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"stateMutability": "payable", | |
"type": "receive" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment