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 Duration | Lock Period | Investor Share Rate | Platform Share |
|---|---|---|---|
| 7 days | 7 days | 60% | 40% |
| 14 days | 14 days | 65% | 35% |
| 30 days | 30 days | 70% | 30% |
| 60 days | 60 days | 75% | 25% |
| 90 days | 90 days | 80% | 20% |
| 180 days | 180 days | 85% | 15% |
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.
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
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
strategyId | string | Yes | -- | Strategy ID for available cycles |
selectedCycle | number | No | -- | Currently selected cycle (days) |
onSelect | (cycleDays: number) => void | Yes | -- | Selection callback |
showShareRate | boolean | No | true | Show share rate labels |
shareRates | Record<number, number> | No | DEFAULT_SHARE_RATES | Custom share rate mapping |
style | ViewStyle | No | -- | Container style |
itemStyle | ViewStyle | No | -- | Individual option style |
selectedItemStyle | ViewStyle | No | -- | Selected option style |
testID | string | No | -- | 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
- Creating Orders -- use the selected cycle in the order creation flow.
- Early Withdrawal -- understand penalties for redeeming before cycle end.
- OneCycleSelector Reference -- full component API reference.