# Knots

Knots are limits you tie yourself while you're calm. Tying or tightening one is instant; loosening or untying one waits your untie delay.

## The rules

- **Nothing is tied until you tie it.** Every knot starts off. Koine holds you only to what you tie.
- **Tying or tightening is instant.** It also cancels any loosening of that knot that's waiting.
- **Loosening or untying waits your untie delay.** You choose the delay once, before your first buy. None is an allowed answer. With none, every change applies at once.
- **A waiting loosening can be stopped.** Until it lands, the knot holds as it was. You get a message when it lands.
- **A knot never holds a sell or a withdrawal.** Exit knots don't hold anything: they sell for you.
- **The same knots hold everywhere,** in the bot and on the web.

Apart from your knots, a buy stops only for an [admin halt](https://docs.koine.markets/terminal/trading#admin-halts), an account that isn't active, changed terms not yet accepted, an untie delay not yet chosen, a waiting withdrawal of everything, or a balance that can't cover it.

Source: trade/server/knots.ts (change, loosens, chooseDelay, delayChosen), trade/server/rules.ts

## Every knot

All are off until you tie them. Presets are the buttons on the knot's screen. You can also type another value.

### Size

| Knot | Holds a buy when | Presets |
| --- | --- | --- |
| 💵 Most per buy | The buy spends more than this | 0.1, 0.25, 0.5, 1 SOL |
| 🪙 Most in one token | The cost of what you hold in the token plus the buy would pass this | 0.25, 0.5, 1, 2 SOL |
| 🧺 Most open positions | You already hold this many tokens. Adding to one you hold still works | 1, 3, 5, 10 |
| 🏦 Most in tokens at once | The cost of everything you hold plus the buy would pass this | 0.5, 1, 2, 5 SOL |

Size knots count cost, not current value. The buy amount doesn't include Koine's fee or the tip. SOL you have in presales counts as held when a presale deposit is checked.

Source: trade/server/knots.ts (checkKnots, factsOf), trade/server/presale.ts (checkDeposit)

### Discipline

| Knot | Holds a buy when | Presets |
| --- | --- | --- |
| ⛔ Stop all buying | Always, while tied. It's your kill switch | On or off |
| 🩸 Daily loss limit | Your net realized loss since 00:00 UTC reaches this, until the next 00:00 UTC | 0.1, 0.25, 0.5, 1 SOL |
| 🧊 Pause after a loss | Your last sell at a loss was less than this long ago | 10, 30, 60, 240 minutes |
| 🚫 No re-buying a loser | This token was sold at a loss less than this long ago | 1, 6, 24, 72 hours |

The daily loss limit nets realized profit against realized loss, so a winning sell today gives room back. Unrealized losses don't count. Sells by exits count like any other.

Source: trade/server/knots.ts (checkKnots, factsOf)

### Exits

These sell for you. See [Exits](https://docs.koine.markets/terminal/exits).

| Knot | Sells | Presets |
| --- | --- | --- |
| 💰 Get my cost back at | Enough to get the cost back, once a position is worth this many times its cost | 1.5, 2, 3, 5× |
| 📈 Take profit at | The share set in 🥧 Take profit sells, once a position is worth this many times its cost | 2, 3, 5, 10× |
| 🥧 Take profit sells | Sets how much 📈 Take profit at sells. Both must be tied | 25, 33, 50, 75% |
| 📉 Trailing stop | All of it, if the price falls this far from its high after the high was above cost | 20, 30, 40, 50% |
| 🔻 Hard stop | All of it, once it's worth this much less than it cost | 25, 40, 50, 70% |

Source: trade/server/knots.ts (KNOTS, exitDue)

### Untie delay

| Knot | What it does | Presets |
| --- | --- | --- |
| 🔒 Untie delay | How long any loosening waits, including shortening this delay | 1 hour, 24 hours, 3 days, 7 days |

A withdrawal, a change of withdrawal address (the first one applies at once), key export and linking a second way in also wait the delay. The trading service sends the withdrawal approver a notice on every delay change, reporting where a pending shortening is heading. A notice that fails is only logged.

Source: trade/server/knots.ts (KNOTS, DELAY_NOTICE), trade/server/approver.ts (delayHours, syncDelay), trade/server/withdraw.ts, trade/server/links.ts

## Typed values

A value you type must fit:

| Kind | Allowed |
| --- | --- |
| SOL | Above 0, up to 10,000 |
| Percentage | Above 0, up to 100, kept to one decimal |
| Count | A whole number from 1 to 1,000 |
| Minutes | Above 0, up to 7 days, kept to whole minutes |
| Hours | Above 0, up to 90 days, kept to whole hours. In the bot you can type days, like `2 days` |
| Multiple | Above 1, up to 1,000, kept to two decimals |

Source: trade/server/knots.ts (boundKnot), trade/server/bot.ts (parseKnotValue)

## What counts as loosening

| Knot | Loosening means |
| --- | --- |
| Any knot | Untying it |
| Size limits, 🩸 Daily loss limit, 💰 Get my cost back at, 📈 Take profit at, 📉 Trailing stop, 🔻 Hard stop | A higher value |
| 🧊 Pause after a loss, 🚫 No re-buying a loser, 🔒 Untie delay, 🥧 Take profit sells | A lower value |

Tying an untied knot is never a loosening, whatever the value.

Source: trade/server/knots.ts (KNOTS tighter, loosens)

## Styles

**🧩 Start from a style** (bot) or the styles on the web Knots page tie a ready-made set of knots. You give a bankroll from 0.01 to 10,000 SOL, and the style sets its SOL knots as shares of it, rounded to 0.001 SOL. You see every change before anything is tied and can change or drop any value. Each change then follows the usual rule: tightening applies at once, loosening waits. Knots the style doesn't name stay tied unless you choose to untie them. A style never touches ⛔ Stop all buying or the untie delay, and nothing about the style is remembered afterwards.

| Style | Idea |
| --- | --- |
| 🔁 No Round Trips | Get your cost back at 2× and let a trailing stop guard the rest |
| 🧭 First Watch | For new traders: small sizes, firm stops |
| ⚡ Quick Flips | Most of it sold at 1.5×, with tight stops |
| 🎯 Launch Sniper | Many tiny bets on new launches |
| 🏇 Let It Ride | A few big-conviction positions, with wide stops |

The exact values per style are in the source.

Source: trade/server/styles.ts, trade/server/bot.ts (stylesScreen, styleReviewScreen), trade/server/web.ts (/web/knots/style)

## Holds and their messages

A hold names the knot and says why, with your real numbers. The bot starts with `🪢 Blocked by your limit:` and the knot. Examples with made-up values:

| Knot | Message |
| --- | --- |
| ⛔ Stop all buying | You stopped all buying. |
| 💵 Most per buy | This buy is 0.5 SOL; your most per buy is 0.25 SOL. |
| 🪙 Most in one token | You'd have 1.2 SOL in this token (0.7 SOL already); your most in one token is 1 SOL. |
| 🧺 Most open positions | You hold 3 tokens; your most open positions is 3. Adding to one you hold still works. |
| 🏦 Most in tokens at once | You'd have 2.5 SOL in tokens; your most at once is 2 SOL. |
| 🩸 Daily loss limit | You've lost 0.6 SOL today; your daily loss limit is 0.5 SOL. Buying resumes at 00:00 UTC. |
| 🧊 Pause after a loss | You sold at a loss 5m ago; you pause 30 min after a loss. |
| 🚫 No re-buying a loser | You sold this token at a loss 2h ago; you don't re-buy a loser for 6h. |

The daily loss, pause and no re-buying holds also say when they lift. Every hold in the bot ends by saying how long untying would take.

Koine checks knots in a fixed order: stop, size, then discipline. You see the first one the buy breaks.

### When a hold comes late

Knots are checked at the quote and again when you confirm. A hold at confirm adds "Something changed since the quote." (for example, you tied a knot, or another buy landed), and nothing is spent.

Source: trade/server/knots.ts (checkKnots), trade/server/bot.ts (knotBlockText), trade/server/web.ts (/web/send)
