Custom rules

Build your own SLEEP rules: when to act, what to do, how often, and how much price movement to accept. Ask SLEEP, for writing rules in plain English, is coming soon.

Anatomy of a rule

Every rule reads as a sentence: when something happens, do something.

When…Example
You’re upWhen I’m up 50%
You’re downIf I’m down 20%
The price crosses a levelIf the price falls below $0.80
Your profit reaches an amountWhen I’ve made $500
It falls from its highIf it drops 15% from the top

…then buy more, sell part, exit everything into USDG, or recover your original stake. “Up” and “down” rules can repeat, for example “every time I’m up another 30%, sell 10%, up to five times”.

Price protection

Each rule says how far below the market price a sell may fill (or above, for a buy): anywhere from 0.25% to 15%. Selling plans that protect you from a drop default to 3% (5% for pool-priced tokens) so they still fill in a fast fall. Other rules default to 1% (2% for pool-priced tokens). A retry never loosens this limit.

Keep trying

If a trade can’t fill inside your limits, SLEEP keeps re-quoting for up to an hour. With keep trying on, it tries again five minutes after each missed hour while the condition still holds. After 48 misses in a row it pauses the position and asks you to take a look. Failed attempts can cost gas, up to the cap you signed.

Ask SLEEP

Prefer to just say it? With Ask SLEEP you’ll type something like “if I’m up 50%, take my money out” and SLEEP will turn it into rules for you to review. It will only propose: nothing is added until you check the rules and sign them yourself, and anything it can’t turn into a valid rule is shown as not added.