> For the complete documentation index, see [llms.txt](https://botlyz.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://botlyz.gitbook.io/docs/english/installation-pas-a-pas/deployer-une-strategie.md).

# Deploy a strategy

This guide describes the complete process of deploying an automated trading strategy on Botlyz, from the initial choice all the way to live execution.

> **Warning**: trading carries a risk of loss, which may extend to the entire committed capital. Past performance does not guarantee future performance. Botlyz is an automation software editor, not a financial adviser. You remain solely responsible for your configuration and your capital.

## Process overview

Deploying a strategy always follows the same path, whether you choose an exclusive SIGMA strategy or a Builder strategy:

1. **Strategy choice** (exclusive SIGMA or no-code Builder)
2. **Configuration** (pair, strategy parameters, risk parameters)
3. **Pre-deployment checks** (sufficient capital, total allocation, pair conflict)
4. **EIP-712 signature** (secure confirmation of your configuration, with no blockchain transaction)
5. **Activation and execution** (orders are placed at candle close)

Two paths are possible. Path **(A)** deploys an exclusive SIGMA strategy, ready to use on HYPE. Path **(B)** deploys a strategy that you build or customize in the Builder, on the pair of your choice. Both go through the same checks and the same signature.

***

## Path A. Deploy an exclusive SIGMA strategy

### A.1. Choose SIGMA v2 or SIGMA v2.1

Botlyz offers two proprietary strategies on **Lighter DEX** (zkLighter), a decentralized marketplace in perpetual contracts:

| Strategy       | Logic                                                                                                                                                                | Pair     |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| **SIGMA v2**   | Mean-reversion with a moving-average envelope. Enters when the price deviates from the envelope, exits on the return toward the mean. LIMIT orders, fixed stop-loss. | **HYPE** |
| **SIGMA v2.1** | Identical to v2, plus an **anti-momentum RSI filter**: no entry as long as the RSI stays within its neutral band (no entry in overly pronounced momentum).           | **HYPE** |

Both strategies trade **HYPE only**: it is the only pair, it is **fixed and not modifiable**. There is no other version (no multi-pair variant, no capital tiers). The operating details are presented on the [Exclusive SIGMA strategies](/docs/english/strategies-exclusives-sigma.md) page.

None of these strategies guarantees a result. The logic described explains the entry and management mechanism, not a promise of gain.

### A.2. Configure the strategy parameters

The parameters are **pre-filled** with the default values and remain **modifiable** before signing.

**SIGMA v2**:

| Parameter    | Default value | Range                |
| ------------ | ------------- | -------------------- |
| MA period    | 140           | 20 to 400            |
| Envelope (%) | 3%            | 0.5% to 15%          |
| Timeframe    | 5 min         | 5 min / 15 min / 1 h |

**SIGMA v2.1**: same parameters as v2, with the additional RSI filter.

| Parameter       | Default value | Range    |
| --------------- | ------------- | -------- |
| RSI period      | 80            | 5 to 200 |
| RSI lower bound | 42            | 0 to 100 |
| RSI upper bound | 58            | 0 to 100 |

As long as the RSI stays between the lower bound and the upper bound, the strategy does not open a new position.

### A.3. Set the risk parameters

Three families of settings determine your exposure. They are detailed on the [Risk parameters](/docs/english/parametres-de-risque.md) page.

**Leverage (1 to 20)**

Leverage multiplies your capital to increase the size of positions.

Formula: `Tradable capital = Capital × Leverage × Allocation (%)`

Example on HYPE:

* Capital: 100 USDC
* Leverage: 2
* Allocation: 100%
* Tradable capital: 100 × 2 × 1.0 = **200 USDC**

Important points:

* Higher leverage = larger position = greater risk.
* HYPE has its own maximum leverage depending on its Lighter margin requirement. If you request more, it is reduced automatically.
* Minimum leverage: **1** (no leverage effect).

A leverage of 1 produces no leverage effect. The higher the leverage, the larger the position size and the liquidation risk, and the closer the liquidation threshold gets to the entry price. Botlyz recommends no value: the choice of leverage is your decision, according to your own analysis.

**Allocation (1% to 100%)**

Allocation is the percentage of the account capital dedicated to this strategy. SIGMA's default value is **100%**.

Important points:

* The **total allocation per account** cannot exceed 100%.
* You can have several strategies on the same account as long as the total stays less than or equal to 100%.
* Allocation 100%: all of the account capital is used by this strategy.

Allocation is a percentage that you set between 1% and 100%. The higher the allocation, the larger the share of your balance exposed to this strategy. Botlyz recommends no value: the choice is your decision.

**Stop-loss and slippage**

| Setting         | Default value | Range     |
| --------------- | ------------- | --------- |
| Stop-loss (%)   | 11%           | 1% to 50% |
| SL slippage (%) | 10%           | 1% to 50% |
| TP slippage (%) | 10%           | 1% to 50% |

* **Stop-loss (%)**: maximum loss per position before automatic cutoff.
* **SL slippage (%)**: slippage tolerance at stop-loss execution. The order accepts this maximum slippage beyond the level to be sure of filling in case of a gap.
* **TP slippage (%)**: slippage tolerance at take-profit execution, to increase the probability of execution.

### A.4. Checks, signature, activation

Once the configuration is ready, deployment goes through the checks described in the **Common step** below (sufficient capital, total allocation, pair conflict), then the **EIP-712 signature**, then **activation**.

***

## Path B. Deploy a Builder strategy

### B.1. Build or choose a generic strategy

The **Builder** lets you compose your own strategy from indicators, or start from a generic preset ready to customize. See [The Builder](/docs/english/le-builder.md).

Unlike SIGMA, a Builder strategy is **fully configurable**, including its pair.

### B.2. Choose the pair and timeframe

* **Pair**: choose **one** pair among the markets available on Lighter. The default pair is **BTC**. You can select another known pair, for example **ETH**, **SOL** or **HYPE**.
* **Timeframe**: signals and entries are computed at the close of the candle of the chosen timeframe.

A pair can only be used by a single strategy at a time on the same account (see the pair conflict check below).

### B.3. Define the conditions and risk

* **Entry and exit conditions**: combine indicators (moving averages, RSI, MACD, Bollinger, etc.) with AND / OR operators to define when to enter long, short, and when to exit.
* **Stop-loss and take-profit**: by default, generic strategies exit through their exit conditions. You can add a stop-loss and a take-profit before signing.
* **Leverage and allocation**: same ranges as for SIGMA (leverage 1 to 20, allocation 1% to 100%).

### B.4. Backtest before deploying

Before deploying, **test your strategy with a backtest**. A backtest replays the strategy over the real market history (fees and slippage included): you see how many trades it would have taken, its return and its worst drawdowns, without risking a cent.

Past performance does not guarantee the future, but it is the best way to understand the behavior of your configuration. See the [Backtest](/docs/english/backtest.md) page.

### B.5. Checks, signature, activation

As with SIGMA, deployment then goes through the checks, the EIP-712 signature and the activation described below.

***

## Common step. Pre-deployment checks

Before validating, Botlyz performs several **checks** to avoid unusable configurations. These controls apply to SIGMA as well as to Builder strategies.

### Check 1: sufficient capital

Botlyz verifies that your **tradable capital** allows the strategy's orders to be placed above the minimum order size required by Lighter.

Each order on Lighter has a **minimum size** (the pair's minimum notional, on the order of 10 to 17 USDC depending on the pair and its price). Botlyz compares your tradable capital to a required minimum, calculated with a safety margin to absorb lot-size rounding.

Formula (see `gates.py`):

```
Tradable capital = Capital × Leverage × Allocation (%)
Required tradable capital ≈ 2 × Minimum order size of the pair
Minimum capital (own funds) = Required tradable capital / (Leverage × Allocation)
```

**Example on HYPE (SIGMA, leverage 2, allocation 100%)**:

* Suppose a HYPE minimum order size on the order of 12 USDC.
* Required tradable capital ≈ 2 × 12 = 24 USDC.
* Minimum capital ≈ 24 / (2 × 1.0) = **12 USDC** of own funds.

This figure is **indicative**: the actual minimum size depends on the price of HYPE at the time of deployment. Botlyz calculates the exact minimum live and displays:

* Your available capital (account balance),
* The required minimum capital,
* An error message if the balance is insufficient, with possible solutions.

### Check 2: total allocation less than or equal to 100%

Botlyz adds up the allocation of **all active, pending or paused strategies on this account** and verifies that the total does not exceed 100%.

Example:

* Lighter "Main" account
* SIGMA v2.1 strategy: allocation 60% (OK)
* You want to add a Builder strategy: allocation 50%
* Total: 110%, greater than 100%, therefore **refused**
* Solution: bring one allocation down to 40% (40% + 60% = 100%), or free up allocation by stopping another strategy.

### Check 3: no pair conflict

Botlyz verifies that the **pair of the new strategy** is not already used by another strategy on this account.

Reason: on Lighter, a pair can only be managed by a single strategy at a time on the same account. Two strategies cannot drive the same position.

Example:

* Strategy 1 (SIGMA v2): HYPE
* You want to deploy a Builder strategy on HYPE as well
* **Conflict on HYPE**, so the deployment is refused
* Solution: choose another pair for the Builder strategy (for example BTC or ETH), or use another Lighter account.

### Other account prerequisites

Deployment also requires the account to be complete:

* **API key present** on the account (required to execute the strategy). Otherwise, complete your account on the Accounts page.
* **Integration fee approval (0.10%)** signed for this account.

### Error messages and solutions

**Insufficient capital**: this message indicates that the tradable capital (funds × leverage × allocation) is below the minimum required by the pair on Lighter. The parameters that influence tradable capital are the available funds, the allocation and the leverage. Any modification is your decision and each combination carries its own risks (notably leverage: increasing leverage or allocation increases the risk of loss and liquidation). Botlyz recommends none of these options.

**Allocation exceeded**: Botlyz indicates the percentage already allocated on the account and the total requested. Solutions: reduce the allocation of the new strategy, or stop/reduce an existing strategy.

**Pair conflict**: Botlyz indicates the pair already in use and the strategy occupying it. Solutions: change the pair (Builder), delete the existing strategy, or use another Lighter account.

**How to deposit capital on Lighter**:

1. Go to [app.lighter.xyz/?referral=BOTLYZ](https://app.lighter.xyz/?referral=BOTLYZ)
2. Connect with your wallet (MetaMask, etc.)
3. Open the "Deposit" section
4. Select USDC
5. Send from Ethereum mainnet or via a bridge
6. Wait for confirmation (usually a few minutes)

See also [Connect your account to Botlyz](/docs/english/installation-pas-a-pas/connecter-un-compte-lighter.md).

***

## Common step. EIP-712 signature

Once the checks have passed, you **confirm your configuration** via an EIP-712 signature (off-chain blockchain signature, with no transaction). The mechanism is detailed in [Signature and transparency](/docs/english/signature-et-transparence.md).

### Why a signature?

Botlyz is a **software editor**, not a custodian of funds (non-custodial), see [Non-custodial security](/docs/english/securite-non-custodial.md):

* Your Lighter API keys are **trade-only** (read and orders, no withdrawal possible).
* You keep control of your funds and your private keys.
* The EIP-712 signature proves that **you** authorized this precise configuration.
* It is a proof of authorization, with no gas cost.

### The process

1. **Botlyz prepares a message** containing all the parameters: the pair, the leverage, the allocation, the wallet ETH address and a timestamp.
2. **You receive an invitation** to sign the configuration with your wallet.
3. **You sign** via MetaMask (or another Ethereum wallet): click "Sign". No gas cost, no sending of funds.
4. **Botlyz verifies the signature**: if it is valid, the strategy is deployed. In case of timeout or rejection, return to the configuration screen.

### Important points

* **No blockchain transaction**: the signature is off-chain.
* **No gas fees.**
* **Modifiable afterward**: once deployed, you can modify or delete the strategy via the interface. Any modification of the parameters requires a **new signature**; the old instance is stopped (orders cancelled, positions closed) then replaced.

***

## Common step. Activation and execution

After signing, your strategy is **deployed and active**.

### When does execution start?

The strategy is active as soon as it is validated, but orders are placed at the moment of **candle close**:

* **SIGMA**: at the close of the candle of the chosen timeframe (5 min, 15 min or 1 h).
* **Builder**: at the close of the candle of the timeframe you selected.

Example: you deploy SIGMA on the 5 min timeframe at 2:32 PM. The first signals are evaluated at the next 5 min candle close, i.e. 2:35 PM.

### Monitoring

Once the strategy is running:

* **"My strategies"**: status, PnL, open positions, orders.
* **Notifications**: opening and closing of positions, alerts.
* **History**: all trades, with entry, exit and fee details.

### Fees

The **only Botlyz fee** is a **protocol fee of 10 bps (0.10%)**, automatically deducted from the notional of each order via Lighter's "partner attribution" program, and capped at 10 bps. It is a protocol fee: it is neither an invoice nor a Botlyz commission. **Botlyz takes no commission on your gains.**

Example: for an order with a notional of 100 USDC, the protocol fee is about 0.10 USDC.

In addition, the fees specific to the Lighter platform (trading fees, funding) apply independently of Botlyz, according to Lighter's rules. The details are presented on the [Fees](/docs/english/frais.md) page.

### Pause, resume and delete

**Pause**: the strategy stops placing new orders. Open positions remain open. You can resume later.

**Resume**: the strategy restarts. New positions can open as early as the next candle close.

**Delete**: all positions are closed at market, the strategy is deleted permanently and the allocation is freed for another strategy.

***

## Risks and warnings

> **WARNING, RISK OF LOSS**
>
> Trading carries a risk of loss that may extend to the entire committed capital. Past performance does not guarantee future performance. Botlyz is an **automation software editor**, not a financial adviser. You are solely responsible for your trading decisions and your capital.

See also the [Risk warning](/docs/english/avertissement-risques.md).

### Specific risks

**Liquidation** (notably with high leverage): if the price moves sufficiently against you, a position can be liquidated at a loss. The higher the leverage, the closer the liquidation threshold is to the entry price. The choice of leverage is your decision.

**DEX slippage**: Lighter is a DEX, the price can move between the decision and the execution. Slippage acts as an implicit cost. Illiquid pairs present potentially higher slippage.

**Sharp market movements**: the price can drop sharply within a few seconds. A stop-loss triggers, but may be executed at a degraded price. This type of event is not predictable.

**Operational risk**: configuration error, software anomaly (rare, but possible), unavailability of Lighter DEX.

***

## Full example: deploy SIGMA v2.1 on HYPE

### Situation

* You have 300 USDC on the Lighter "Main" account.
* You wish to deploy SIGMA v2.1 (HYPE).
* Risk appetite: moderate.

### Chosen configuration

* Pair: **HYPE** (fixed, not modifiable).
* Strategy parameters: default values (MA 140, envelope 3%, RSI 80 with bounds 42 / 58, timeframe 5 min).
* Leverage: **2** (tradable capital = 300 × 2 × 0.8 = 480 USDC).
* Allocation: **80%** (the rest of the capital remains free).
* Stop-loss: **11%**, SL and TP slippage: **10%**.

### Checks

1. Capital: 300 USDC, well above the minimum required for HYPE at this leverage.
2. Allocation: 80%, below 100% (no other strategy on this account).
3. Pair: no other strategy uses HYPE on this account, so no conflict.

### Signature

* The message presents the HYPE pair, the leverage 2 and the allocation 80%.
* You sign via MetaMask, with no gas cost.
* The signature is validated, the deployment is confirmed.

### Execution

* The strategy is active as soon as it is validated.
* The first signals are evaluated at the next 5 min candle close.
* Monitoring is updated in "My strategies".

***

## Support

In case of a question or a problem:

* **In-app form**: "Help" tab.
* **Documentation**: consult the knowledge base and the [FAQ](/docs/english/faq.md).

See also the [Support](/docs/english/support.md) page and the [Legal notices](/docs/english/mentions-legales.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://botlyz.gitbook.io/docs/english/installation-pas-a-pas/deployer-une-strategie.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
