import { BinaryReader, BinaryWriter } from "../../binary"; import { JsonSafe } from "../../json-safe"; /** Params defines the parameters for the module. */ export interface LegacyParams { leverageMax: string; borrowInterestRateMax: string; borrowInterestRateMin: string; borrowInterestRateIncrease: string; borrowInterestRateDecrease: string; healthGainFactor: string; maxOpenPositions: bigint; poolOpenThreshold: string; borrowInterestPaymentFundPercentage: string; borrowInterestPaymentFundAddress: string; safetyFactor: string; borrowInterestPaymentEnabled: boolean; whitelistingEnabled: boolean; perpetualSwapFee: string; maxLimitOrder: bigint; fixedFundingRate: string; /** * minimum value for take_profit_price/current price for long, should be * greater than 1 */ minimumLongTakeProfitPriceRatio: string; /** * max value for take_profit_price/current price for long, should be greater * than 1 */ maximumLongTakeProfitPriceRatio: string; /** * max value for take_profit_price/current price for short, should be less * than 1 */ maximumShortTakeProfitPriceRatio: string; /** * No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in * validate message */ enableTakeProfitCustodyLiabilities: boolean; /** * We create this and send this value to estimate swap ONLY when opening and * closing the position Ideally this value is set to half. When trader open a * position if they receive a weight balance bonus (which is half of weight * breaking fee, ideally) then while closing position they are charged weight * breaking fee. So we just directly apply half weight breaking fee on * perpetual swaps Question: does each need to have separate value of this * because PoolParams.WeightRecoveryFeePortion can be different Also, if * trader has no bonus only fee, then overall we are only applying the fee * half time */ weightBreakingFeeFactor: string; } export interface LegacyParamsProtoMsg { typeUrl: "/elys.perpetual.LegacyParams"; value: Uint8Array; } /** * Params defines the parameters for the module. * @name LegacyParamsAmino * @package elys.perpetual * @see proto type: elys.perpetual.LegacyParams */ export interface LegacyParamsAmino { leverage_max?: string; borrow_interest_rate_max?: string; borrow_interest_rate_min?: string; borrow_interest_rate_increase?: string; borrow_interest_rate_decrease?: string; health_gain_factor?: string; max_open_positions?: string; pool_open_threshold?: string; borrow_interest_payment_fund_percentage?: string; borrow_interest_payment_fund_address?: string; safety_factor?: string; borrow_interest_payment_enabled?: boolean; whitelisting_enabled?: boolean; perpetual_swap_fee?: string; max_limit_order?: string; fixed_funding_rate?: string; /** * minimum value for take_profit_price/current price for long, should be * greater than 1 */ minimum_long_take_profit_price_ratio?: string; /** * max value for take_profit_price/current price for long, should be greater * than 1 */ maximum_long_take_profit_price_ratio?: string; /** * max value for take_profit_price/current price for short, should be less * than 1 */ maximum_short_take_profit_price_ratio?: string; /** * No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in * validate message */ enable_take_profit_custody_liabilities?: boolean; /** * We create this and send this value to estimate swap ONLY when opening and * closing the position Ideally this value is set to half. When trader open a * position if they receive a weight balance bonus (which is half of weight * breaking fee, ideally) then while closing position they are charged weight * breaking fee. So we just directly apply half weight breaking fee on * perpetual swaps Question: does each need to have separate value of this * because PoolParams.WeightRecoveryFeePortion can be different Also, if * trader has no bonus only fee, then overall we are only applying the fee * half time */ weight_breaking_fee_factor?: string; } export interface LegacyParamsAminoMsg { type: "/elys.perpetual.LegacyParams"; value: LegacyParamsAmino; } /** Params defines the parameters for the module. */ export interface LegacyParamsSDKType { leverage_max: string; borrow_interest_rate_max: string; borrow_interest_rate_min: string; borrow_interest_rate_increase: string; borrow_interest_rate_decrease: string; health_gain_factor: string; max_open_positions: bigint; pool_open_threshold: string; borrow_interest_payment_fund_percentage: string; borrow_interest_payment_fund_address: string; safety_factor: string; borrow_interest_payment_enabled: boolean; whitelisting_enabled: boolean; perpetual_swap_fee: string; max_limit_order: bigint; fixed_funding_rate: string; minimum_long_take_profit_price_ratio: string; maximum_long_take_profit_price_ratio: string; maximum_short_take_profit_price_ratio: string; enable_take_profit_custody_liabilities: boolean; weight_breaking_fee_factor: string; } export interface Params { leverageMax: string; borrowInterestRateMax: string; borrowInterestRateMin: string; borrowInterestRateIncrease: string; borrowInterestRateDecrease: string; healthGainFactor: string; maxOpenPositions: bigint; poolOpenThreshold: string; borrowInterestPaymentFundPercentage: string; borrowInterestPaymentFundAddress: string; safetyFactor: string; borrowInterestPaymentEnabled: boolean; whitelistingEnabled: boolean; perpetualSwapFee: string; maxLimitOrder: bigint; fixedFundingRate: string; /** * minimum value for take_profit_price/current price for long, should be * greater than 1 */ minimumLongTakeProfitPriceRatio: string; /** * max value for take_profit_price/current price for long, should be greater * than 1 */ maximumLongTakeProfitPriceRatio: string; /** * max value for take_profit_price/current price for short, should be less * than 1 */ maximumShortTakeProfitPriceRatio: string; /** * No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in * validate message */ enableTakeProfitCustodyLiabilities: boolean; /** * We create this and send this value to estimate swap ONLY when opening and * closing the position Ideally this value is set to half. When trader open a * position if they receive a weight balance bonus (which is half of weight * breaking fee, ideally) then while closing position they are charged weight * breaking fee. So we just directly apply half weight breaking fee on * perpetual swaps Question: does each need to have separate value of this * because PoolParams.WeightRecoveryFeePortion can be different Also, if * trader has no bonus only fee, then overall we are only applying the fee * half time */ weightBreakingFeeFactor: string; enabledPools: bigint[]; } export interface ParamsProtoMsg { typeUrl: "/elys.perpetual.Params"; value: Uint8Array; } /** * @name ParamsAmino * @package elys.perpetual * @see proto type: elys.perpetual.Params */ export interface ParamsAmino { leverage_max?: string; borrow_interest_rate_max?: string; borrow_interest_rate_min?: string; borrow_interest_rate_increase?: string; borrow_interest_rate_decrease?: string; health_gain_factor?: string; max_open_positions?: string; pool_open_threshold?: string; borrow_interest_payment_fund_percentage?: string; borrow_interest_payment_fund_address?: string; safety_factor?: string; borrow_interest_payment_enabled?: boolean; whitelisting_enabled?: boolean; perpetual_swap_fee?: string; max_limit_order?: string; fixed_funding_rate?: string; /** * minimum value for take_profit_price/current price for long, should be * greater than 1 */ minimum_long_take_profit_price_ratio?: string; /** * max value for take_profit_price/current price for long, should be greater * than 1 */ maximum_long_take_profit_price_ratio?: string; /** * max value for take_profit_price/current price for short, should be less * than 1 */ maximum_short_take_profit_price_ratio?: string; /** * No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in * validate message */ enable_take_profit_custody_liabilities?: boolean; /** * We create this and send this value to estimate swap ONLY when opening and * closing the position Ideally this value is set to half. When trader open a * position if they receive a weight balance bonus (which is half of weight * breaking fee, ideally) then while closing position they are charged weight * breaking fee. So we just directly apply half weight breaking fee on * perpetual swaps Question: does each need to have separate value of this * because PoolParams.WeightRecoveryFeePortion can be different Also, if * trader has no bonus only fee, then overall we are only applying the fee * half time */ weight_breaking_fee_factor?: string; enabled_pools?: string[]; } export interface ParamsAminoMsg { type: "/elys.perpetual.Params"; value: ParamsAmino; } export interface ParamsSDKType { leverage_max: string; borrow_interest_rate_max: string; borrow_interest_rate_min: string; borrow_interest_rate_increase: string; borrow_interest_rate_decrease: string; health_gain_factor: string; max_open_positions: bigint; pool_open_threshold: string; borrow_interest_payment_fund_percentage: string; borrow_interest_payment_fund_address: string; safety_factor: string; borrow_interest_payment_enabled: boolean; whitelisting_enabled: boolean; perpetual_swap_fee: string; max_limit_order: bigint; fixed_funding_rate: string; minimum_long_take_profit_price_ratio: string; maximum_long_take_profit_price_ratio: string; maximum_short_take_profit_price_ratio: string; enable_take_profit_custody_liabilities: boolean; weight_breaking_fee_factor: string; enabled_pools: bigint[]; } export declare const LegacyParams: { typeUrl: string; is(o: any): o is LegacyParams; isSDK(o: any): o is LegacyParamsSDKType; isAmino(o: any): o is LegacyParamsAmino; encode(message: LegacyParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): LegacyParams; fromJSON(object: any): LegacyParams; toJSON(message: LegacyParams): JsonSafe; fromPartial(object: Partial): LegacyParams; fromAmino(object: LegacyParamsAmino): LegacyParams; toAmino(message: LegacyParams): LegacyParamsAmino; fromAminoMsg(object: LegacyParamsAminoMsg): LegacyParams; fromProtoMsg(message: LegacyParamsProtoMsg): LegacyParams; toProto(message: LegacyParams): Uint8Array; toProtoMsg(message: LegacyParams): LegacyParamsProtoMsg; }; export declare const Params: { typeUrl: string; is(o: any): o is Params; isSDK(o: any): o is ParamsSDKType; isAmino(o: any): o is ParamsAmino; encode(message: Params, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): Params; fromJSON(object: any): Params; toJSON(message: Params): JsonSafe; fromPartial(object: Partial): Params; fromAmino(object: ParamsAmino): Params; toAmino(message: Params): ParamsAmino; fromAminoMsg(object: ParamsAminoMsg): Params; fromProtoMsg(message: ParamsProtoMsg): Params; toProto(message: Params): Uint8Array; toProtoMsg(message: Params): ParamsProtoMsg; };