Skip to main content

Investment Cycles

An investment cycle defines the lock period for an AI trading order. During the lock period the AI agent has full discretion to trade the allocated capital. Longer cycles generally offer higher share rates (the percentage of profits returned to the investor).

How Cycles Work

When a user creates an AI trading order, they select a cycle duration. The capital is locked for that duration and the AI agent trades on their behalf.

Order Created ─────── Lock Period ─────── Cycle End
│ │
│ AI agent trades freely │
│ User cannot withdraw without penalty │
│ │
└── Early withdrawal incurs penalty ─────┘
  • Lock period: The number of days the capital is committed.
  • Share rate: The percentage of net profits that goes to the investor. The remaining share goes to the platform/agent operator.
  • Early withdrawal: Users can redeem before the cycle ends, but a penalty is applied based on the remaining time. See Early Withdrawal.

Cycle Options

Typical cycle durations and their corresponding share rates:

Cycle DurationLock PeriodInvestor Share RatePlatform Share
7 days7 days60%40%
14 days14 days65%35%
30 days30 days70%30%
60 days60 days75%25%
90 days90 days80%20%
180 days180 days85%15%
tip

Longer lock periods give the AI agent more time to execute its strategy and recover from temporary drawdowns, which is why they offer a higher share rate.

DEFAULT_SHARE_RATES Constant

The DEFAULT_SHARE_RATES constant provides the standard mapping from cycle duration (in days) to investor share rate.

import { DEFAULT_SHARE_RATES } from '@one_deploy/sdk';

// DEFAULT_SHARE_RATES is a Record<number, number>
console.log(DEFAULT_SHARE_RATES[7]); // 0.60
console.log(DEFAULT_SHARE_RATES[14]); // 0.65
console.log(DEFAULT_SHARE_RATES[30]); // 0.70
console.log(DEFAULT_SHARE_RATES[60]); // 0.75
console.log(DEFAULT_SHARE_RATES[90]); // 0.80
console.log(DEFAULT_SHARE_RATES[180]); // 0.85
const DEFAULT_SHARE_RATES: Record<number, number> = {
7: 0.60,
14: 0.65,
30: 0.70,
60: 0.75,
90: 0.80,
180: 0.85,
};

OneCycleSelector Component

The OneCycleSelector is a React Native component that presents available cycle options for a given strategy, showing the lock duration and share rate for each.

React Native Only

OneCycleSelector is exported from the React Native entry point of @one_deploy/sdk. It is not available on web.

Quick Start

import { useState } from 'react';
import { OneCycleSelector } from '@one_deploy/sdk';

function CycleSelection() {
const [selectedCycle, setSelectedCycle] = useState<number | null>(null);

return (
<OneCycleSelector
strategyId="strat_abc123"
onSelect={(cycleDays) => {
setSelectedCycle(cycleDays);
console.log('Selected cycle:', cycleDays, 'days');
}}
/>
);
}

OneCycleSelectorProps

interface OneCycleSelectorProps {
/** Strategy ID to determine available cycles. */
strategyId: string;

/** Currently selected cycle duration in days. */
selectedCycle?: number;

/** Callback fired when the user selects a cycle. */
onSelect: (cycleDays: number) => void;

/** Whether to display the share rate next to each option. Defaults to true. */
showShareRate?: boolean;

/** Custom share rates to override DEFAULT_SHARE_RATES. */
shareRates?: Record<number, number>;

/** Additional style applied to the container. */
style?: ViewStyle;

/** Style applied to each cycle option. */
itemStyle?: ViewStyle;

/** Style applied to the selected cycle option. */
selectedItemStyle?: ViewStyle;

/** Test ID for testing frameworks. */
testID?: string;
}

Props Table

PropTypeRequiredDefaultDescription
strategyIdstringYes--Strategy ID for available cycles
selectedCyclenumberNo--Currently selected cycle (days)
onSelect(cycleDays: number) => voidYes--Selection callback
showShareRatebooleanNotrueShow share rate labels
shareRatesRecord<number, number>NoDEFAULT_SHARE_RATESCustom share rate mapping
styleViewStyleNo--Container style
itemStyleViewStyleNo--Individual option style
selectedItemStyleViewStyleNo--Selected option style
testIDstringNo--Test ID

Displaying Share Rate Information

import { OneCycleSelector, DEFAULT_SHARE_RATES } from '@one_deploy/sdk';

function CycleWithInfo() {
const [selectedCycle, setSelectedCycle] = useState<number | null>(null);

const shareRate = selectedCycle ? DEFAULT_SHARE_RATES[selectedCycle] : null;

return (
<View>
<OneCycleSelector
strategyId="strat_abc123"
selectedCycle={selectedCycle ?? undefined}
showShareRate={true}
onSelect={setSelectedCycle}
/>

{selectedCycle && shareRate && (
<View style={styles.info}>
<Text>Lock period: {selectedCycle} days</Text>
<Text>Your share of profits: {(shareRate * 100).toFixed(0)}%</Text>
<Text>Platform share: {((1 - shareRate) * 100).toFixed(0)}%</Text>
</View>
)}
</View>
);
}

Custom Share Rates

You can override the default share rates with custom values if your project uses a different fee structure.

import { OneCycleSelector } from '@one_deploy/sdk';

const CUSTOM_RATES: Record<number, number> = {
7: 0.55,
30: 0.72,
90: 0.82,
};

function CustomCycleSelector() {
return (
<OneCycleSelector
strategyId="strat_abc123"
shareRates={CUSTOM_RATES}
onSelect={(days) => console.log('Cycle:', days)}
/>
);
}

Next Steps