diff --git a/package.json b/package.json index f53a932b9..426e00853 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paraswap/dex-lib", - "version": "3.8.34", + "version": "3.8.34-inception.2", "main": "build/index.js", "types": "build/index.d.ts", "repository": "https://github.com/paraswap/paraswap-dex-lib", diff --git a/src/abi/inception/inception-ineth-pool.json b/src/abi/inception/inception-ineth-pool.json new file mode 100644 index 000000000..fb106f833 --- /dev/null +++ b/src/abi/inception/inception-ineth-pool.json @@ -0,0 +1,1062 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "claimed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "AmbiguousFee", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyGovernanceAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyOperatorAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyRestakingPoolAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "max", + "type": "uint64" + } + ], + "name": "PoolDistributeGasLimitNotInRange", + "type": "error" + }, + { + "inputs": [], + "name": "PoolFailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "PoolInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "PoolRestakerExists", + "type": "error" + }, + { + "inputs": [], + "name": "PoolRestakerNotExists", + "type": "error" + }, + { + "inputs": [], + "name": "PoolStakeAmGreaterThanAvailable", + "type": "error" + }, + { + "inputs": [], + "name": "PoolStakeAmLessThanMin", + "type": "error" + }, + { + "inputs": [], + "name": "PoolUnstakeAmLessThanMin", + "type": "error" + }, + { + "inputs": [], + "name": "PoolWrongInputLength", + "type": "error" + }, + { + "inputs": [], + "name": "PoolZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "PoolZeroAmount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "ClaimExpected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "pubkeys", + "type": "bytes[]" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "prevValue", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "newValue", + "type": "uint32" + } + ], + "name": "DistributeGasLimitChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "restaker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "treasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalClaimed", + "type": "uint256" + } + ], + "name": "FeeClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "prevValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "MaxTVLChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "prevValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "MinStakeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "prevValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "MinUntakeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiverAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "PendingUnstake", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Received", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "code", + "type": "bytes32" + } + ], + "name": "ReferralStake", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "restaker", + "type": "address" + } + ], + "name": "RestakerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "staker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "UnstakeClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Unstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IRestakingPool.Unstake[]", + "name": "unstakes", + "type": "tuple[]" + } + ], + "name": "UnstakesDistributed", + "type": "event" + }, + { + "inputs": [], + "name": "CALL_GAS_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + } + ], + "name": "activateRestaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + } + ], + "name": "addRestaker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "availableToStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "internalType": "bytes[]", + "name": "pubkeys", + "type": "bytes[]" + }, + { + "internalType": "bytes[]", + "name": "signatures", + "type": "bytes[]" + }, + { + "internalType": "bytes32[]", + "name": "deposit_data_roots", + "type": "bytes32[]" + } + ], + "name": "batchDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "claimRestaker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "claimer", + "type": "address" + } + ], + "name": "claimUnstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "claimer", + "type": "address" + } + ], + "name": "claimableOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "config", + "outputs": [ + { + "internalType": "contract IProtocolConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "internalType": "address", + "name": "elOperator", + "type": "address" + }, + { + "components": [ + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "internalType": "struct ISignatureUtils.SignatureWithExpiry", + "name": "approverSignatureAndExpiry", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "approverSalt", + "type": "bytes32" + } + ], + "name": "delegateTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "distributeUnstakes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getMinStake", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinUnstake", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPending", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + } + ], + "name": "getRestaker", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalClaimable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalPendingUnstakes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getTotalUnstakesOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getUnstakes", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct IRestakingPool.Unstake[]", + "name": "unstakes", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getUnstakesOf", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct IRestakingPool.Unstake[]", + "name": "unstakes", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "claimer", + "type": "address" + } + ], + "name": "hasClaimable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IProtocolConfig", + "name": "config", + "type": "address" + }, + { + "internalType": "uint32", + "name": "distributeGasLimit", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "maxTVL", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "internalType": "contract IERC20[]", + "name": "tokenList", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amountsToWithdraw", + "type": "uint256[]" + } + ], + "name": "recoverTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "newValue", + "type": "uint32" + } + ], + "name": "setDistributeGasLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "setMaxTVL", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "setMinStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "setMinUnstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "code", + "type": "bytes32" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + } + ], + "name": "undelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "internalType": "uint64", + "name": "oracleTimestamp", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "beaconStateRoot", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "proof", + "type": "bytes" + } + ], + "internalType": "struct BeaconChainProofs.StateRootProof", + "name": "stateRootProof", + "type": "tuple" + }, + { + "internalType": "uint40[]", + "name": "validatorIndices", + "type": "uint40[]" + }, + { + "internalType": "bytes[]", + "name": "validatorFieldsProofs", + "type": "bytes[]" + }, + { + "internalType": "bytes32[][]", + "name": "validatorFields", + "type": "bytes32[][]" + } + ], + "name": "verifyWithdrawalCredentials", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + } + ], + "name": "withdrawBeforeRestaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "provider", + "type": "string" + }, + { + "internalType": "uint256", + "name": "amountToWithdraw", + "type": "uint256" + } + ], + "name": "withdrawNonBeaconChainETHBalanceWei", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/src/abi/inception/inception-ratio-feed.json b/src/abi/inception/inception-ratio-feed.json new file mode 100644 index 000000000..743534031 --- /dev/null +++ b/src/abi/inception/inception-ratio-feed.json @@ -0,0 +1,329 @@ +[ + { "inputs": [], "name": "EnforcedPause", "type": "error" }, + { "inputs": [], "name": "ExpectedPause", "type": "error" }, + { "inputs": [], "name": "InconsistentInputData", "type": "error" }, + { + "inputs": [{ "internalType": "uint256", "name": "day", "type": "uint256" }], + "name": "IncorrectDay", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" } + ], + "name": "IncorrectToken", + "type": "error" + }, + { "inputs": [], "name": "InvalidInitialization", "type": "error" }, + { "inputs": [], "name": "NewRatioThresholdInvalid", "type": "error" }, + { "inputs": [], "name": "NotInitializing", "type": "error" }, + { "inputs": [], "name": "NullParams", "type": "error" }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "OperatorUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { "inputs": [], "name": "RatioThresholdNotSet", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "prevValue", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], + "name": "OperatorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "failedRatio", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "RatioNotUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "prevValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "RatioThresholdChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "prevValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "RatioUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_THRESHOLD", + "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "uint256", "name": "day", "type": "uint256" } + ], + "name": "averagePercentageRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" } + ], + "name": "getRatioFor", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "historicalRatios", + "outputs": [ + { "internalType": "uint40", "name": "lastUpdate", "type": "uint40" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inceptionOperator", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "operator", "type": "address" } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ratioThreshold", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" }, + { "internalType": "uint256", "name": "ratio", "type": "uint256" } + ], + "name": "repairRatioFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOperator", "type": "address" } + ], + "name": "setInceptionOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "newValue", "type": "uint256" } + ], + "name": "setRatioThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address[]", "name": "addresses", "type": "address[]" }, + { "internalType": "uint256[]", "name": "ratios", "type": "uint256[]" } + ], + "name": "updateRatioBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/abi/inception/inception-vault.json b/src/abi/inception/inception-vault.json new file mode 100644 index 000000000..5e8e85bd8 --- /dev/null +++ b/src/abi/inception/inception-vault.json @@ -0,0 +1,991 @@ +[ + { "inputs": [], "name": "AlreadyDelegated", "type": "error" }, + { "inputs": [], "name": "DelegationManagerImmutable", "type": "error" }, + { "inputs": [], "name": "EigenLayerOperatorAlreadyExists", "type": "error" }, + { + "inputs": [ + { "internalType": "uint256", "name": "max", "type": "uint256" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "ExceedsMaxPerDeposit", + "type": "error" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "max", "type": "uint256" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "ExceedsMaxTotalDeposited", + "type": "error" + }, + { "inputs": [], "name": "ImplementationNotSet", "type": "error" }, + { "inputs": [], "name": "InceptionOnPause", "type": "error" }, + { "inputs": [], "name": "InconsistentData", "type": "error" }, + { + "inputs": [ + { "internalType": "uint256", "name": "capacity", "type": "uint256" } + ], + "name": "InsufficientCapacity", + "type": "error" + }, + { "inputs": [], "name": "NotEigenLayerOperator", "type": "error" }, + { "inputs": [], "name": "NullParams", "type": "error" }, + { "inputs": [], "name": "OperatorNotRegistered", "type": "error" }, + { "inputs": [], "name": "RestakerNotRegistered", "type": "error" }, + { + "inputs": [ + { "internalType": "address", "name": "assetAddress", "type": "address" } + ], + "name": "TransferAssetFailed", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "assetAddress", "type": "address" } + ], + "name": "TransferAssetFromFailed", + "type": "error" + }, + { "inputs": [], "name": "WithdrawFutile", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "stakerAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operatorAddress", + "type": "address" + } + ], + "name": "DelegatedTo", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "prevValue", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], + "name": "DelegationManagerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "iShares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "prevValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "DepositFeeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "stakerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositedToEL", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newELOperator", + "type": "address" + } + ], + "name": "ELOperatorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "prevValue", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], + "name": "ImplementationUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "prevValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "MinAmountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "prevValue", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "newValue", + "type": "string" + } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "prevValue", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newValue", + "type": "address" + } + ], + "name": "OperatorChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "withdrawals", + "type": "uint256[]" + } + ], + "name": "RedeemedRequests", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "code", + "type": "bytes32" + } + ], + "name": "ReferralCode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "restaker", + "type": "address" + } + ], + "name": "RestakerDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "stakerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract IStrategy", + "name": "strategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "withdrawalStartBlock", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegatedAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "StartWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "iShares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "totalAmount", + "type": "uint256" + } + ], + "name": "WithdrawalClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "nonce", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "address", + "name": "withdrawer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegatedAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "withdrawalRoot", + "type": "bytes32" + } + ], + "name": "WithdrawalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [ + { "internalType": "address", "name": "newELOperator", "type": "address" } + ], + "name": "addELOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "restaker", "type": "address" }, + { + "components": [ + { "internalType": "address", "name": "staker", "type": "address" }, + { + "internalType": "address", + "name": "delegatedTo", + "type": "address" + }, + { + "internalType": "address", + "name": "withdrawer", + "type": "address" + }, + { "internalType": "uint256", "name": "nonce", "type": "uint256" }, + { "internalType": "uint32", "name": "startBlock", "type": "uint32" }, + { + "internalType": "contract IStrategy[]", + "name": "strategies", + "type": "address[]" + }, + { "internalType": "uint256[]", "name": "shares", "type": "uint256[]" } + ], + "internalType": "struct IDelegationManager.Withdrawal[]", + "name": "withdrawals", + "type": "tuple[]" + } + ], + "name": "claimCompletedWithdrawals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "claimerWithdrawalsQueue", + "outputs": [ + { "internalType": "uint256", "name": "epoch", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "iShares", "type": "uint256" } + ], + "name": "convertToAssets", + "outputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" } + ], + "name": "convertToShares", + "outputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "elOperator", "type": "address" }, + { "internalType": "bytes32", "name": "approverSalt", "type": "bytes32" }, + { + "components": [ + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { "internalType": "uint256", "name": "expiry", "type": "uint256" } + ], + "internalType": "struct IDelegationManager.SignatureWithExpiry", + "name": "approverSignatureAndExpiry", + "type": "tuple" + } + ], + "name": "delegateToOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "elOperator", "type": "address" }, + { "internalType": "bytes32", "name": "approverSalt", "type": "bytes32" }, + { + "components": [ + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { "internalType": "uint256", "name": "expiry", "type": "uint256" } + ], + "internalType": "struct IDelegationManager.SignatureWithExpiry", + "name": "approverSignatureAndExpiry", + "type": "tuple" + } + ], + "name": "delegateToOperatorFromVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delegationManager", + "outputs": [ + { + "internalType": "contract IDelegationManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" } + ], + "name": "deposit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "depositAssetIntoStrategyFromVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" }, + { "internalType": "bytes32", "name": "code", "type": "bytes32" } + ], + "name": "depositWithReferral", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "restaker", "type": "address" } + ], + "name": "forceUndelegateRecovery", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "elOperator", "type": "address" } + ], + "name": "getDelegatedTo", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPendingWithdrawalAmountFromEL", + "outputs": [ + { "internalType": "uint256", "name": "total", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "claimer", "type": "address" } + ], + "name": "getPendingWithdrawalOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalDelegated", + "outputs": [ + { "internalType": "uint256", "name": "total", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalDeposited", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "inceptionToken", + "outputs": [ + { + "internalType": "contract IInceptionToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "claimer", "type": "address" } + ], + "name": "isAbleToRedeem", + "outputs": [ + { "internalType": "bool", "name": "able", "type": "bool" }, + { "internalType": "uint256[]", "name": "", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minAmount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ratio", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "receiver", "type": "address" } + ], + "name": "redeem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "redeemReservedAmount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "restakers", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IDelegationManager", + "name": "newDelegationManager", + "type": "address" + } + ], + "name": "setDelegationManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "newMinAmount", "type": "uint256" } + ], + "name": "setMinAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "newVaultName", "type": "string" } + ], + "name": "setName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOperator", "type": "address" } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { "internalType": "contract IStrategy", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyManager", + "outputs": [ + { + "internalType": "contract IStrategyManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAmountToWithdraw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "elOperatorAddress", + "type": "address" + }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "undelegateFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "undelegateVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateEpoch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "iShares", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/dex/inception/config.ts b/src/dex/inception/config.ts new file mode 100644 index 000000000..dcddd8608 --- /dev/null +++ b/src/dex/inception/config.ts @@ -0,0 +1,109 @@ +import { DexParams, PricePoolParams } from './types'; +import { DexConfigMap } from '../../types'; +import { Network } from '../../constants'; + +export const InceptionConfig: DexConfigMap = { + InceptionLRT: { + [Network.MAINNET]: [ + { + symbol: 'instETH', + token: '0x7FA768E035F956c41d6aeaa3Bd857e7E5141CAd5', + vault: '0x814CC6B8fd2555845541FB843f37418b05977d8d', + baseToken: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', + baseTokenSlug: 'STETH', + }, + { + symbol: 'inrETH', + token: '0x80d69e79258FE9D056c822461c4eb0B4ca8802E2', + vault: '0x1Aa53BC4Beb82aDf7f5EDEE9e3bBF3434aD59F12', + baseToken: '0xae78736Cd615f374D3085123A210448E74Fc6393', + baseTokenSlug: 'rETH', + }, + { + symbol: 'inoETH', + token: '0x9181f633e9b9f15a32d5e37094f4c93b333e0e92', + vault: '0x4878F636A9Aa314B776Ac51A25021C44CAF86bEd', + baseToken: '0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3', + baseTokenSlug: 'oETH', + }, + { + symbol: 'inosETH', + token: '0xfD07fD5EBEa6F24888a397997E262179Bf494336', + vault: '0xA9F8c770661BeE8DF2D026edB1Cb6FF763C780FF', + baseToken: '0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38', + baseTokenSlug: 'osETH', + }, + { + symbol: 'inankrETH', + token: '0xfa2629B9cF3998D52726994E0FcdB750224D8B9D', + vault: '0x36B429439AB227fAB170A4dFb3321741c8815e55', + baseToken: '0xE95A203B1a91a908F9B9CE46459d101078c2c3cb', + baseTokenSlug: 'AnkETH', + }, + { + symbol: 'incbETH', + token: '0xbf19eead55a6b100667f04f8fbc5371e03e8ab2e', + vault: '0xfE715358368416E01d3A961D3a037b7359735d5e', + baseToken: '0xBe9895146f7AF43049ca1c1AE358B0541Ea49704', + baseTokenSlug: 'cbETH', + }, + { + symbol: 'inwbETH', + token: '0xda9b11cd701e10c2ec1a284f80820edd128c5246', + vault: '0xC0660932C5dCaD4A1409b7975d147203B1e9A2B6', + baseToken: '0xa2E3356610840701BDf5611a53974510Ae27E2e1', + baseTokenSlug: 'wbETH', + }, + { + symbol: 'inswETH', + token: '0xc3ade5ace1bbb033ccae8177c12ecbfa16bd6a9d', + vault: '0xc4181dC7BB31453C4A48689ce0CBe975e495321c', + baseToken: '0xf951E335afb289353dc249e82926178EaC7DEd78', + baseTokenSlug: 'SWETH', + }, + { + symbol: 'inETHx', + token: '0x57a5a0567187ff4a8dcc1a9bba86155e355878f2', + vault: '0x90E80E25ABDB6205B08DeBa29a87f7eb039023C2', + baseToken: '0xA35b1B31Ce002FBF2058D22F30f95D405200A15b', + baseTokenSlug: 'ETHx', + }, + { + symbol: 'insfrxETH', + token: '0x668308d77be3533c909a692302cb4d135bf8041c', + vault: '0x295234B7E370a5Db2D2447aCA83bc7448f151161', + baseToken: '0xac3E018457B222d93114458476f3E3416Abbe38F', + baseTokenSlug: 'sfrxETH', + }, + { + symbol: 'inmETH', + token: '0xeCf3672A6d2147E2A77f07069Fb48d8Cf6F6Fbf9', + vault: '0xd0ee89d82183D7Ddaef14C6b4fC0AA742F426355', + baseToken: '0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa', + baseTokenSlug: 'mETH', + }, + { + symbol: 'inlsETH', + token: '0x94b888e11a9e960a9c3b3528eb6ac807b27ca62e', + vault: '0x6E17a8b5D33e6DBdB9fC61d758BF554b6AD93322', + baseToken: '0x8c1BEd5b9a0928467c9B1341Da1D7BD5e10b6549', + baseTokenSlug: 'lsETH', + }, + { + symbol: 'inETH', + token: '0xf073bAC22DAb7FaF4a3Dd6c6189a70D54110525C', + vault: '0x46199cAa0e453971cedf97f926368d9E5415831a', + baseToken: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', + baseTokenSlug: 'ETH', + }, + ], + }, +}; + +export const InceptionPricePoolConfig: DexConfigMap = { + InceptionLRT: { + [Network.MAINNET]: { + ratioFeed: '0xFd73Be536503B5Aa80Bf99D1Fd65b1306c69B191', + }, + }, +}; diff --git a/src/dex/inception/inception-e2e.test.ts b/src/dex/inception/inception-e2e.test.ts new file mode 100644 index 000000000..ec9cb3cd8 --- /dev/null +++ b/src/dex/inception/inception-e2e.test.ts @@ -0,0 +1,80 @@ +/* eslint-disable no-console */ +import dotenv from 'dotenv'; +dotenv.config(); + +import { testE2E } from '../../../tests/utils-e2e'; +import { Holders, Tokens } from '../../../tests/constants-e2e'; +import { ContractMethod, Network, SwapSide } from '../../constants'; +import { StaticJsonRpcProvider } from '@ethersproject/providers'; +import { generateConfig } from '../../config'; +import { InceptionConfig } from './config'; +import { DexParams } from './types'; + +function testForNetwork( + network: Network, + inceptionName: string, + configs: DexParams[], +) { + const provider = new StaticJsonRpcProvider( + generateConfig(network).privateHttpProvider, + network, + ); + + for (const config of configs) { + const baseSlug = config.baseTokenSlug; + const tokens = Tokens[network]; + const holders = Holders[network]; + const inceptionSlug = config.symbol; + + const sideToContractMethods = new Map([ + [SwapSide.SELL, [ContractMethod.swapExactAmountIn]], + ]); + + describe(`${inceptionSlug}`, () => { + sideToContractMethods.forEach((contractMethods, side) => + describe(`${side}`, () => { + contractMethods.forEach((contractMethod: ContractMethod) => { + describe(`${contractMethod}`, () => { + it(`${baseSlug} -> ${inceptionSlug}`, async () => { + await testE2E( + tokens[baseSlug], + tokens[inceptionSlug], + holders[baseSlug], + '100000000', + side, + inceptionName, + contractMethod, + network, + provider, + ); + }); + it(`${inceptionSlug} -> ${baseSlug}`, async () => { + await testE2E( + tokens[inceptionSlug], + tokens[baseSlug], + holders[inceptionSlug], + '100000000', + side, + inceptionName, + contractMethod, + network, + provider, + ); + }); + }); + }); + }), + ); + }); + } +} + +describe('Inception E2E', () => { + describe('Mainnet', () => { + const network = Network.MAINNET; + + Object.entries(InceptionConfig).forEach(([inceptionName, chainConfig]) => { + testForNetwork(network, inceptionName, chainConfig[network]); + }); + }); +}); diff --git a/src/dex/inception/inception-event-pool.ts b/src/dex/inception/inception-event-pool.ts new file mode 100644 index 000000000..0f7eb2c84 --- /dev/null +++ b/src/dex/inception/inception-event-pool.ts @@ -0,0 +1,62 @@ +import _ from 'lodash'; +import { AsyncOrSync, DeepReadonly } from 'ts-essentials'; +import { Address, BlockHeader, Log, Logger } from '../../types'; +import { StatefulEventSubscriber } from '../../stateful-event-subscriber'; +import { IDexHelper } from '../../dex-helper/idex-helper'; +import { PoolConfig, PoolState } from './types'; +import { getOnChainState } from './utils'; +import { Interface } from '@ethersproject/abi'; +import INCEPTION_RATIO_FEED from '../../abi/inception/inception-ratio-feed.json'; +import { getTokenFromAddress } from './tokens'; + +export class InceptionEventPool extends StatefulEventSubscriber { + protected ratioFeedInterface: Interface = new Interface(INCEPTION_RATIO_FEED); + constructor( + parentName: string, + protected network: number, + protected dexHelper: IDexHelper, + logger: Logger, + protected ratioFeedAddress: Address, + public poolInterface: Interface, + ) { + super(parentName, ratioFeedAddress, dexHelper, logger); + + this.addressesSubscribed = [ratioFeedAddress]; + } + + protected processLog( + state: DeepReadonly, + log: Readonly, + blockHeader: Readonly, + ): AsyncOrSync | null> { + try { + const parsed = this.ratioFeedInterface.parseLog(log); + const _state: PoolState = _.cloneDeep(state); + switch (parsed.name) { + case 'RatioUpdated': { + const tokenInfo = getTokenFromAddress(this.network, parsed.args[0]); + if (tokenInfo) { + _state[tokenInfo.symbol.toLowerCase()] = { + ratio: BigInt(parsed.args[2].toString()), + }; + } + return _state; + } + default: + return _state; + } + } catch (e) { + this.logger.error('Failed to parse log', e); + return null; + } + } + + async generateState(blockNumber: number): Promise> { + return getOnChainState( + this.dexHelper.multiContract, + this.poolInterface, + this.network, + blockNumber, + ); + } +} diff --git a/src/dex/inception/inception-events.test.ts b/src/dex/inception/inception-events.test.ts new file mode 100644 index 000000000..5d5a19834 --- /dev/null +++ b/src/dex/inception/inception-events.test.ts @@ -0,0 +1,64 @@ +import dotenv from 'dotenv'; +dotenv.config(); +import { InceptionEventPool } from './inception-event-pool'; +import { InceptionPricePoolConfig } from './config'; +import { Network } from '../../constants'; +import { DummyDexHelper } from '../../dex-helper/index'; +import INCEPTION_VAULT_ABI from '../../abi/inception/inception-vault.json'; +import { testEventSubscriber } from '../../../tests/utils-events'; +import { PoolState } from './types'; +import { Interface } from '@ethersproject/abi'; +import { setTokensOnNetwork } from './tokens'; +import { getTokenList } from './utils'; + +jest.setTimeout(50 * 1000); +const dexKey = 'InceptionLRT'; +const network = Network.MAINNET; +const ratioFeedAddress = InceptionPricePoolConfig[dexKey][network].ratioFeed; +const poolInterface = new Interface(INCEPTION_VAULT_ABI); + +async function fetchPoolState( + inceptionEventPool: InceptionEventPool, + blockNumber: number, +): Promise { + return inceptionEventPool.generateState(blockNumber); +} + +describe('Inception Event', function () { + const blockNumbers: { [eventName: string]: number[] } = { + // RatioUpdated: [20438963, 20431766, 20424602], + RatioUpdated: [20438962, 20431765, 20424601, 20703959, 20711125], + }; + + describe('InceptionEventPool', function () { + Object.keys(blockNumbers).forEach((event: string) => { + blockNumbers[event].forEach((blockNumber: number) => { + it(`Should return the correct state after the ${blockNumber}: ${event}`, async function () { + const dexHelper = new DummyDexHelper(network); + const logger = dexHelper.getLogger(dexKey); + const inceptionEventPool = new InceptionEventPool( + dexKey, + network, + dexHelper, + logger, + ratioFeedAddress, + poolInterface, + ); + + const tokenList = await getTokenList(network); + setTokensOnNetwork(network, tokenList); + + await testEventSubscriber( + inceptionEventPool, + inceptionEventPool.addressesSubscribed, + (_blockNumber: number) => + fetchPoolState(inceptionEventPool, _blockNumber), + blockNumber, + `${dexKey}_${ratioFeedAddress}`.toLowerCase(), + dexHelper.provider, + ); + }); + }); + }); + }); +}); diff --git a/src/dex/inception/inception-integration.test.ts b/src/dex/inception/inception-integration.test.ts new file mode 100644 index 000000000..706e7f12c --- /dev/null +++ b/src/dex/inception/inception-integration.test.ts @@ -0,0 +1,76 @@ +import dotenv from 'dotenv'; +dotenv.config(); + +import { DummyDexHelper } from '../../dex-helper/index'; +import { Network, SwapSide } from '../../constants'; +import { BI_POWS } from '../../bigint-constants'; +import { Inception } from './inception'; +import { checkPoolPrices, checkPoolsLiquidity } from '../../../tests/utils'; +import { Tokens } from '../../../tests/constants-e2e'; +import { InceptionConfig } from './config'; + +const network = Network.MAINNET; +const dexKey = 'InceptionLRT'; +const dexHelper = new DummyDexHelper(network); + +describe('Inception', function () { + let blockNumber: number; + let inception: Inception; + + beforeAll(async () => { + blockNumber = await dexHelper.web3Provider.eth.getBlockNumber(); + inception = new Inception(network, dexKey, dexHelper); + await inception.initializePricing(blockNumber); + }); + + InceptionConfig[dexKey][network].forEach(Pair => { + const TokenASymbol = Pair.baseTokenSlug; + const TokenA = Tokens[network][TokenASymbol]; + + const TokenBSymbol = Pair.symbol; + const TokenB = Tokens[network][TokenBSymbol]; + const TokenBAmounts = [0n, BI_POWS[6], 2000000n]; + + describe(`deposit() Swap Function for ${TokenBSymbol} <> ${TokenASymbol}`, () => { + it('getPoolIdentifiers and getPricesVolume SELL', async function () { + const pools = await inception.getPoolIdentifiers( + TokenB, + TokenA, + SwapSide.SELL, + blockNumber, + ); + console.log( + `${TokenBSymbol} <> ${TokenASymbol} Pool Identifiers: `, + pools, + ); + + expect(pools.length).toBeGreaterThan(0); + + const poolPrices = await inception.getPricesVolume( + TokenB, + TokenA, + TokenBAmounts, + SwapSide.SELL, + blockNumber, + pools, + ); + console.log( + `${TokenBSymbol} <> ${TokenASymbol} Pool Prices: `, + poolPrices, + ); + + expect(poolPrices).not.toBeNull(); + checkPoolPrices(poolPrices!, TokenBAmounts, SwapSide.SELL, dexKey); + }); + + it('getTopPoolsForToken', async function () { + const poolLiquidity = await inception.getTopPoolsForToken( + TokenA.address, + 10, + ); + + checkPoolsLiquidity(poolLiquidity, TokenA.address, dexKey); + }); + }); + }); +}); diff --git a/src/dex/inception/inception.ts b/src/dex/inception/inception.ts new file mode 100644 index 000000000..69539fc41 --- /dev/null +++ b/src/dex/inception/inception.ts @@ -0,0 +1,279 @@ +import { Interface, JsonFragment } from '@ethersproject/abi'; +import { AsyncOrSync } from 'ts-essentials'; +import { NumberAsString, SwapSide } from '@paraswap/core'; +import { + AdapterExchangeParam, + Address, + DexExchangeParam, + ExchangePrices, + Logger, + PoolLiquidity, + PoolPrices, + Token, + TransferFeeParams, +} from '../../types'; +import INCEPTION_ABI from '../../abi/inception/inception-vault.json'; +import INCEPTION_POOL_ABI from '../../abi/inception/inception-ineth-pool.json'; +import { + DEST_TOKEN_PARASWAP_TRANSFERS, + Network, + NULL_ADDRESS, + SRC_TOKEN_PARASWAP_TRANSFERS, +} from '../../constants'; +import * as CALLDATA_GAS_COST from '../../calldata-gas-cost'; +import { getDexKeysWithNetwork } from '../../utils'; +import { IDex } from '../../dex/idex'; +import { IDexHelper } from '../../dex-helper/idex-helper'; +import { InceptionDexData, PoolState } from './types'; +import { SimpleExchange } from '../simple-exchange'; +import { InceptionConfig, InceptionPricePoolConfig } from './config'; +import { getTokenFromAddress, setTokensOnNetwork } from './tokens'; +import { getOnChainState, getTokenList } from './utils'; +import { InceptionEventPool } from './inception-event-pool'; +import { applyTransferFee } from '../../lib/token-transfer-fee'; +import { RETURN_AMOUNT_POS_0 } from '../../executor/constants'; + +const DECIMALS = BigInt(1e18); + +export class Inception + extends SimpleExchange + implements IDex +{ + protected vaultInterface: Interface; + protected poolInterface: Interface; + + readonly hasConstantPriceLargeAmounts = false; + readonly needWrapNative = false; + readonly isFeeOnTransferSupported = true; + + public static dexKeysWithNetwork: { key: string; networks: Network[] }[] = + getDexKeysWithNetwork(InceptionConfig); + + logger: Logger; + + private eventPool: InceptionEventPool; + + constructor( + readonly network: Network, + readonly dexKey: string, + readonly dexHelper: IDexHelper, + protected config = InceptionConfig[dexKey][network], + ) { + super(dexHelper, dexKey); + this.logger = dexHelper.getLogger(dexKey); + this.vaultInterface = new Interface(INCEPTION_ABI as JsonFragment[]); + this.poolInterface = new Interface(INCEPTION_POOL_ABI as JsonFragment[]); + this.eventPool = new InceptionEventPool( + dexKey, + network, + dexHelper, + this.logger, + InceptionPricePoolConfig[dexKey][network].ratioFeed, + this.poolInterface, + ); + } + + async initializePricing(blockNumber: number) { + const poolState = await getOnChainState( + this.dexHelper.multiContract, + this.vaultInterface, + this.network, + blockNumber, + ); + + await this.eventPool.initialize(blockNumber, { + state: poolState, + }); + await this.initializeTokens(); + } + + async initializeTokens() { + let tokenList = await getTokenList(this.network); + + setTokensOnNetwork(this.network, tokenList); + } + + getAdapters(side: SwapSide): { name: string; index: number }[] | null { + return null; + } + + async getPoolIdentifiers( + srcToken: Token, + destToken: Token, + side: SwapSide, + blockNumber: number, + ): Promise { + return [ + this.dexKey + + '-' + + [srcToken.address.toLowerCase(), destToken.address.toLowerCase()] + .sort((a, b) => (a > b ? 1 : -1)) + .join('_'), + ]; + } + + async getPoolState( + pool: InceptionEventPool, + blockNumber: number, + ): Promise { + const eventState = pool.getState(blockNumber); + if (eventState) return eventState; + const onChainState = await pool.generateState(blockNumber); + pool.setState(onChainState, blockNumber); + return onChainState; + } + + async getPricesVolume( + srcToken: Token, + destToken: Token, + amounts: bigint[], + side: SwapSide, + blockNumber: number, + limitPools?: string[], + transferFees: TransferFeeParams = { + srcFee: 0, + destFee: 0, + srcDexFee: 0, + destDexFee: 0, + }, + ): Promise> { + if (side === SwapSide.BUY) { + return null; + } + + const src = getTokenFromAddress(this.network, srcToken.address); + const dest = getTokenFromAddress(this.network, destToken.address); + + if (!src || !dest || src !== dest) { + return null; + } + + // TODO: Implement in both directions + // only baseToken -> inception token swaps are supported + if (src.baseToken.toLowerCase() !== srcToken.address.toLowerCase()) { + return null; + } + + const poolState = await this.getPoolState(this.eventPool, blockNumber); + if (!poolState) return null; + + const unitPrice = DECIMALS; + const prices = amounts.map(amount => { + const ratio = poolState[src.symbol.toLowerCase()].ratio; + return (ratio * amount) / DECIMALS; + }); + + const [unitPriceWithFee, ...pricesWithFee] = applyTransferFee( + [unitPrice, ...prices], + side, + side === SwapSide.SELL ? transferFees.srcFee : transferFees.destFee, + side === SwapSide.SELL + ? SRC_TOKEN_PARASWAP_TRANSFERS + : DEST_TOKEN_PARASWAP_TRANSFERS, + ); + + return [ + { + prices: pricesWithFee, + unit: unitPriceWithFee, + gasCost: 120_000, + exchange: this.dexKey, + data: { + exchange: dest.vault, + }, + poolAddresses: [dest.vault], + }, + ]; + } + + getCalldataGasCost( + poolPrices: PoolPrices, + ): number | number[] { + return CALLDATA_GAS_COST.DEX_OVERHEAD + CALLDATA_GAS_COST.LENGTH_SMALL; + } + + getAdapterParam(): AdapterExchangeParam { + return { + targetExchange: NULL_ADDRESS, + payload: '0x', + networkFee: '0', + }; + } + + getDexParam( + srcToken: Address, + destToken: Address, + srcAmount: NumberAsString, + destAmount: NumberAsString, + recipient: Address, + data: InceptionDexData, + side: SwapSide, + ): DexExchangeParam { + const dexParams = getTokenFromAddress(this.network, srcToken); + + if (!dexParams) { + throw new Error('Unknown token'); + } + + const isNative = dexParams.baseTokenSlug === 'ETH'; + let swapData; + let dexFuncHasRecipient; + let swappedAmountNotPresentInExchangeData; + let returnAmountPos = undefined; + if (isNative) { + swapData = this.poolInterface.encodeFunctionData('stake()', []); + dexFuncHasRecipient = false; + swappedAmountNotPresentInExchangeData = true; + } else { + swapData = this.vaultInterface.encodeFunctionData('deposit', [ + srcAmount, + recipient, + ]); + dexFuncHasRecipient = true; + swappedAmountNotPresentInExchangeData = false; + returnAmountPos = RETURN_AMOUNT_POS_0; + } + + return { + needWrapNative: false, + dexFuncHasRecipient, + exchangeData: swapData, + targetExchange: dexParams.vault, + swappedAmountNotPresentInExchangeData, + returnAmountPos, + }; + } + + async updatePoolState(): Promise {} + + async getTopPoolsForToken( + tokenAddress: Address, + limit: number, + ): Promise { + await this.initializeTokens(); + + const token = getTokenFromAddress(this.network, tokenAddress); + + if (token) { + return [ + { + liquidityUSD: 1e9, + exchange: this.dexKey, + address: token.vault, + connectorTokens: [ + { + address: + tokenAddress.toLowerCase() === token.token.toLowerCase() + ? token.baseToken + : token.token, + decimals: 1e18, + }, + ], + }, + ]; + } + return []; + } + + releaseResources(): AsyncOrSync {} +} diff --git a/src/dex/inception/tokens.ts b/src/dex/inception/tokens.ts new file mode 100644 index 000000000..7211644ea --- /dev/null +++ b/src/dex/inception/tokens.ts @@ -0,0 +1,37 @@ +import { Network } from '../../constants'; +import { DexParams } from './types'; + +export const Tokens: { [network: number]: { [symbol: string]: DexParams } } = + {}; + +const TokensByAddress: { + [network: number]: { [address: string]: DexParams }; +} = {}; + +export function setTokensOnNetwork(network: Network, tokens: DexParams[]) { + if (Tokens[network] === undefined) { + Tokens[network] = {}; + } + + if (TokensByAddress[network] === undefined) { + TokensByAddress[network] = {}; + } + + for (let token of tokens) { + token.vault = token.vault.toLowerCase(); + token.token = token.token.toLowerCase(); + token.baseToken = token.baseToken.toLowerCase(); + + Tokens[network][token.symbol] = token; + TokensByAddress[network][token.vault] = token; + TokensByAddress[network][token.token] = token; + TokensByAddress[network][token.baseToken] = token; + } +} + +export function getTokenFromAddress( + network: Network, + address: string, +): DexParams | undefined { + return TokensByAddress[network]?.[address.toLowerCase()]; +} diff --git a/src/dex/inception/types.ts b/src/dex/inception/types.ts new file mode 100644 index 000000000..0736e2eeb --- /dev/null +++ b/src/dex/inception/types.ts @@ -0,0 +1,26 @@ +export type PoolState = { + [symbol: string]: { + ratio: bigint; + }; +}; + +export type PoolConfig = { + ratioFeedAddress: string; + initState: PoolState; +}; + +export type InceptionDexData = { + exchange: string; +}; + +export type DexParams = { + symbol: string; + vault: string; + token: string; + baseToken: string; + baseTokenSlug: string; +}; + +export type PricePoolParams = { + ratioFeed: string; +}; diff --git a/src/dex/inception/utils.ts b/src/dex/inception/utils.ts new file mode 100644 index 000000000..c59995b51 --- /dev/null +++ b/src/dex/inception/utils.ts @@ -0,0 +1,44 @@ +import { Contract } from 'web3-eth-contract'; +import { DexParams, PoolState } from './types'; +import { AbiCoder, Interface } from '@ethersproject/abi'; +import { InceptionConfig } from './config'; +import { Network } from '../../constants'; + +const coder = new AbiCoder(); + +export async function getOnChainState( + multiContract: Contract, + poolInterface: Interface, + network: Network, + blockNumber: number | 'latest', +): Promise { + let tokenList = await getTokenList(network); + const state: PoolState = {}; + for (const p of tokenList) { + let addr; + if (p.baseTokenSlug === 'ETH') { + addr = p.token; + } else { + addr = p.vault; + } + + const data = await multiContract.methods + .aggregate([ + { + target: addr, + callData: poolInterface.encodeFunctionData('ratio', []), + }, + ]) + .call({}, blockNumber); + + const decodedData = coder.decode(['uint256'], data.returnData[0]); + const ratio = BigInt(decodedData[0].toString()); + state[p.symbol.toLowerCase()] = { ratio }; + } + + return state; +} + +export const getTokenList = async (network: Network): Promise => { + return InceptionConfig['InceptionLRT'][network]; +}; diff --git a/src/dex/index.ts b/src/dex/index.ts index 67f63d401..e0a78288f 100644 --- a/src/dex/index.ts +++ b/src/dex/index.ts @@ -83,6 +83,7 @@ import { EtherFi } from './etherfi'; import { Spark } from './spark/spark'; import { VelodromeSlipstream } from './uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream'; import { AaveV3Stata } from './aave-v3-stata/aave-v3-stata'; +import { Inception } from './inception/inception'; import { OSwap } from './oswap/oswap'; import { ConcentratorArusd } from './concentrator-arusd/concentrator-arusd'; import { FxProtocolRusd } from './fx-protocol-rusd/fx-protocol-rusd'; @@ -167,6 +168,7 @@ const Dexes = [ PharaohV1, Spark, AaveV3Stata, + Inception, OSwap, ConcentratorArusd, FxProtocolRusd, diff --git a/tests/constants-e2e.ts b/tests/constants-e2e.ts index c685588ee..2dca881f2 100644 --- a/tests/constants-e2e.ts +++ b/tests/constants-e2e.ts @@ -1,12 +1,12 @@ import { - SmartTokenParams, - balanceOfFn, + _allowancesFn, + _balancesFn, allowanceFn, - SmartToken, - balancesFn, allowedFn, - _balancesFn, - _allowancesFn, + balanceOfFn, + balancesFn, + SmartToken, + SmartTokenParams, } from '../tests/smart-tokens'; import { Address } from '../src/types'; import { ETHER_ADDRESS, Network } from '../src/constants'; @@ -503,6 +503,94 @@ export const Tokens: { address: '0x23878914efe38d27c4d67ab83ed1b93a74d4086a', decimals: 6, }, + instETH: { + address: '0x7FA768E035F956c41d6aeaa3Bd857e7E5141CAd5', + decimals: 18, + }, + inrETH: { + address: '0x80d69e79258FE9D056c822461c4eb0B4ca8802E2', + decimals: 18, + }, + inoETH: { + address: '0x9181f633e9b9f15a32d5e37094f4c93b333e0e92', + decimals: 18, + }, + inosETH: { + address: '0xfD07fD5EBEa6F24888a397997E262179Bf494336', + decimals: 18, + }, + inankrETH: { + address: '0xfa2629B9cF3998D52726994E0FcdB750224D8B9D', + decimals: 18, + }, + incbETH: { + address: '0xbf19eead55a6b100667f04f8fbc5371e03e8ab2e', + decimals: 18, + }, + inwbETH: { + address: '0xda9b11cd701e10c2ec1a284f80820edd128c5246', + decimals: 18, + }, + inswETH: { + address: '0xc3ade5ace1bbb033ccae8177c12ecbfa16bd6a9d', + decimals: 18, + }, + inETHx: { + address: '0x57a5a0567187ff4a8dcc1a9bba86155e355878f2', + decimals: 18, + }, + insfrxETH: { + address: '0x668308d77be3533c909a692302cb4d135bf8041c', + decimals: 18, + }, + inmETH: { + address: '0xeCf3672A6d2147E2A77f07069Fb48d8Cf6F6Fbf9', + decimals: 18, + }, + inlsETH: { + address: '0x94b888e11a9e960a9c3b3528eb6ac807b27ca62e', + decimals: 18, + }, + inETH: { + address: '0xf073bAC22DAb7FaF4a3Dd6c6189a70D54110525C', + decimals: 18, + }, + rETH: { + address: '0xae78736Cd615f374D3085123A210448E74Fc6393', + decimals: 18, + }, + oETH: { + address: '0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3', + decimals: 18, + }, + osETH: { + address: '0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38', + decimals: 18, + }, + cbETH: { + address: '0xBe9895146f7AF43049ca1c1AE358B0541Ea49704', + decimals: 18, + }, + wbETH: { + address: '0xa2E3356610840701BDf5611a53974510Ae27E2e1', + decimals: 18, + }, + ETHx: { + address: '0xA35b1B31Ce002FBF2058D22F30f95D405200A15b', + decimals: 18, + }, + sfrxETH: { + address: '0xac3E018457B222d93114458476f3E3416Abbe38F', + decimals: 18, + }, + mETH: { + address: '0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa', + decimals: 18, + }, + lsETH: { + address: '0x8c1BEd5b9a0928467c9B1341Da1D7BD5e10b6549', + decimals: 18, + }, rUSD: { address: '0x65D72AA8DA931F047169112fcf34f52DbaAE7D18', decimals: 18, @@ -1522,7 +1610,7 @@ export const Holders: { sDAI: '0x4C612E3B15b96Ff9A6faED838F8d07d479a8dD4c', CVX: '0x0aCA67Fa70B142A3b9bF2eD89A81B40ff85dACdC', MIM: '0xa046a8660e66d178ee07ec97c585eeb6aa18c26c', - AnkETH: '0xF7260D4ADc48fEefd5a19a9Eb23f9747CeE15C92', + AnkETH: '0xBB2d41AcfEA24A3A2aD4A6F95C3AcE1cC98c6ed6', DAI: '0xd1668fb5f690c59ab4b0cabad0f8c1617895052b', oldFRAX: '0x183d0dc5867c01bfb1dbbc41d6a9d3de6e044626', newFRAX: '0x183d0dc5867c01bfb1dbbc41d6a9d3de6e044626', @@ -1589,6 +1677,17 @@ export const Holders: { stataUSDT: '0x6803364AceD5181877abC11E865FB27cB654a426', aaveUSDT: '0x32c98a981Fe7C333Bd4e8E7630E8e0CF5ce20987', weETH: '0x267ed5f71EE47D3E45Bb1569Aa37889a2d10f91e', + rETH: '0x9985dF20D7e9103ECBCeb16a84956434B6f06ae8', + oETH: '0xDcEe70654261AF21C44c093C300eD3Bb97b78192', + osETH: '0xe080027Bd47353b5D1639772b4a75E9Ed3658A0d', + cbETH: '0xd35faBF6Ec806f4D772617956A2058CdE086C6E0', + wbETH: '0xc6C010287683FD3Db7865016e3e1D6468Dd73aA6', + ETHx: '0x4F2083f5fBede34C2714aFfb3105539775f7FE64', + sfrxETH: '0xC2545C68a71F6803264bdE885870fD72D361fB9E', + mETH: '0xc3350595eD42EbE94556277bc77D257c76065291', + lsETH: '0xAe60d8180437b5C34bB956822ac2710972584473', + SWETH: '0xc585DF3a8C9ca0c614D023A812624bE36161502B', + inankrETH: '0x310C8f5274F74258cDe1E5101b50A0502b884aC4', rUSD: '0xEC2eda1C4F981E468ABF62424a10B69B738b498E', arUSD: '0xeFc24206053a452e2299BF3b8f964512b041Db4C', },