[
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "lendingServiceAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "tokenAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "groupStorageAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "cycleStorageAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "treasuryAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "savingsConfigAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "rewardConfigAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "xendTokenAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "derivativeTokenAddress",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "maximumSlots",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "hasMaximumSlots",
        "type": "bool"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "stakeAmount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "expectedCycleStartTimeStamp",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "cycleDuration",
        "type": "uint256"
      }
    ],
    "name": "CycleCreated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "blockTimeStamp",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "blockNumber",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "totalDerivativeAmount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "totalUnderlyingAmount",
        "type": "uint256"
      }
    ],
    "name": "CycleStartedEvent",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address payable",
        "name": "memberAddress",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "underlyingAmount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "tokenAddress",
        "type": "address"
      }
    ],
    "name": "DerivativeAssetWithdrawn",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address payable",
        "name": "groupCreator",
        "type": "address"
      }
    ],
    "name": "GroupCreated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address payable",
        "name": "memberAddress",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      }
    ],
    "name": "MemberJoinedCycle",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address payable",
        "name": "memberAddress",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      }
    ],
    "name": "MemberJoinedGroup",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address payable",
        "name": "memberAddress",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "underlyingAmount",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "tokenAddress",
        "type": "address"
      }
    ],
    "name": "UnderlyingAssetDeposited",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "date",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "member",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "XendTokenReward",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address payable",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address payable",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "percent",
        "type": "uint256"
      }
    ],
    "name": "setGroupCreatorRewardPercent",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "feePrecision",
        "type": "uint256"
      }
    ],
    "name": "UpdateFeePrecision",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "setAdapterAddress",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "GetTotalTokenRewardDistributed",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      }
    ],
    "name": "withdrawFromCycleWhileItIsOngoing",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "internalType": "address payable",
        "name": "memberAddress",
        "type": "address"
      }
    ],
    "name": "getDerivativeAmountForUserStake",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "internalType": "address payable",
        "name": "memberAddress",
        "type": "address"
      }
    ],
    "name": "withdrawFromCycle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      }
    ],
    "name": "withdrawFromCycle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newServiceAddress",
        "type": "address"
      }
    ],
    "name": "deprecateContract",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      }
    ],
    "name": "getRecordIndexLengthForCycleMembers",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "depositorAddress",
        "type": "address"
      }
    ],
    "name": "getRecordIndexLengthForCycleMembersByDepositor",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      }
    ],
    "name": "getRecordIndexLengthForGroupMembers",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "depositorAddress",
        "type": "address"
      }
    ],
    "name": "getRecordIndexLengthForGroupMembersByDepositor",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      }
    ],
    "name": "getRecordIndexLengthForGroupCycles",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "groupCreator",
        "type": "address"
      }
    ],
    "name": "getRecordIndexLengthForCreator",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      }
    ],
    "name": "getSecondsLeftForCycleToEnd",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      }
    ],
    "name": "getSecondsLeftForCycleToStart",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "index",
        "type": "uint256"
      }
    ],
    "name": "getCycleFinancials",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "underlyingTotalDeposits",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "underlyingTotalWithdrawn",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "underlyingBalance",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "derivativeBalance",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "underylingBalanceClaimedBeforeMaturity",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "derivativeBalanceClaimedBeforeMaturity",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "index",
        "type": "uint256"
      }
    ],
    "name": "getCycleByIndex",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "numberOfDepositors",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "cycleStartTimeStamp",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "cycleDuration",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "maximumSlots",
        "type": "uint256"
      },
      {
        "internalType": "bool",
        "name": "hasMaximumSlots",
        "type": "bool"
      },
      {
        "internalType": "uint256",
        "name": "cycleStakeAmount",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "totalStakes",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "stakesClaimed",
        "type": "uint256"
      },
      {
        "internalType": "enum IGroupSchema.CycleStatus",
        "name": "cycleStatus",
        "type": "uint8"
      },
      {
        "internalType": "uint256",
        "name": "stakesClaimedBeforeMaturity",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "index",
        "type": "uint256"
      }
    ],
    "name": "getCycleMember",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "totalLiquidityAsPenalty",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "numberOfCycleStakes",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "stakesClaimed",
        "type": "uint256"
      },
      {
        "internalType": "bool",
        "name": "exist",
        "type": "bool"
      },
      {
        "internalType": "address payable",
        "name": "_address",
        "type": "address"
      },
      {
        "internalType": "bool",
        "name": "hasWithdrawn",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      }
    ],
    "name": "activateCycle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      }
    ],
    "name": "endCycle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "string",
        "name": "name",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "symbol",
        "type": "string"
      }
    ],
    "name": "createGroup",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "index",
        "type": "uint256"
      }
    ],
    "name": "getGroupByIndex",
    "outputs": [
      {
        "internalType": "bool",
        "name": "exists",
        "type": "bool"
      },
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "string",
        "name": "name",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "symbol",
        "type": "string"
      },
      {
        "internalType": "address payable",
        "name": "creatorAddress",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_id",
        "type": "uint256"
      }
    ],
    "name": "getGroupById",
    "outputs": [
      {
        "internalType": "bool",
        "name": "exists",
        "type": "bool"
      },
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "string",
        "name": "name",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "symbol",
        "type": "string"
      },
      {
        "internalType": "address payable",
        "name": "creatorAddress",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "groupId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "startTimeStamp",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "duration",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "maximumSlots",
        "type": "uint256"
      },
      {
        "internalType": "bool",
        "name": "hasMaximumSlots",
        "type": "bool"
      },
      {
        "internalType": "uint256",
        "name": "cycleStakeAmount",
        "type": "uint256"
      }
    ],
    "name": "createCycle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cycleId",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "numberOfStakes",
        "type": "uint256"
      }
    ],
    "name": "joinCycle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]