How Mistline works

Mistline places stop-loss, take-profit, trailing stop, bracket and buy orders on Robinhood Chain Stock Tokens without publishing the trigger price. This site runs on Robinhood Chain testnet with test tokens.

01How an order works

  1. Your browser fetches the order public key from the NEAR agent contract. Its private half is derived by the NEAR MPC network and handed only to an agent registered with a valid TEE attestation.
  2. Your browser encrypts each trigger to that key, together with a random salt, and uploads the ciphertext. It also keeps the trigger and salt in this browser so you can see your own orders.
  3. Your wallet moves the tokens into the escrow contract with a commitment, a hash of the trigger, the salt and the order's public fields.
  4. The agent decrypts the triggers inside its enclave and watches the Chainlink price. When a trigger is met, it asks NEAR Chain Signatures to sign the fill.
  5. The escrow checks everything again before it sells: the commitment, a fresh price, the trigger against that price, the slippage floor and the pool's distance from the feed. If any check fails, nothing moves.

A trailing stop follows the price up. You pick a distance, for example 5%. The agent tracks the highest Chainlink price since you placed the order and sells once the price is 5% or more below it. When it sells, it names the Chainlink round it measured from. The escrow reads that round from the feed itself, checks that it was published after your order was placed or was still the latest price when you placed it, and checks that the fresh price is at least your distance below it. So the agent cannot invent a higher peak to sell early. The distance stays hidden until the fill, like any other trigger. You can pair a trailing stop with a stop-loss floor in a bracket, and whichever fires first closes the order.

A buy order works the same way in the other direction. You escrow USDG and pick a level: buy the dip buys once the Chainlink price is at or below it, breakout buys once it is at or above it. When the agent fills it, the escrow spends the whole USDG amount in the pool, checks that you receive at least the token amount your level and slippage allow, and sends the tokens straight to your wallet. A buy order has one level. Cancelling returns the USDG.

The private copilot on the order page drafts sell orders (stop-loss, take-profit, trailing stop and bracket) and buy orders (dip and breakout, sized in USDG) from plain language, for example "protect all my TSLA with a 6% trailing stop" or "buy 50 USDG of TSLA if it dips to 360". It runs on NEAR AI Cloud private inference (GLM 5.3 Flash inside an attested Intel TDX and NVIDIA confidential computing enclave). Your browser checks the Gateway's and the model's attestation, encrypts the conversation to the model's attested key, and accepts an answer only with a receipt signed inside the model enclave. The chat passes through a small proxy on this site, a Cloudflare Pages Function that adds our NEAR AI API key and forwards only chat encrypted with NEAR AI's E2EE protocol v3 for this one model, so it sees ciphertext, never your words. Version 3 encrypts every message field and binds each one to your browser's reply key, so the proxy cannot swap that key to read the answer. Browsers cannot check the TLS certificate of the NEAR AI Gateway itself, which the attestation and the signed receipt cover instead. The copilot only fills the order ticket. It does not give investment advice, the ticket runs the same checks as a hand-made order, and nothing is placed until you sign it in your wallet. Holdings on chain are public anyway; what stays private is what you ask and plan.

The shakeout check under the stop and trail fields replays your distance from every hour of the last 90 days and shows how often it was hit, and how often the price came back above the level within a day. The copilot can quote the same numbers, but it never picks a distance for you. The prices are the hourly candles of the stock's perp on Hyperliquid, which your browser fetches directly from api.hyperliquid.xyz. That request names only the ticker and the time range, and the replay runs in your browser, so your level never leaves it. The perp trades around the clock and can dip lower than the Chainlink feed the escrow checks, so read the numbers as an upper bound. Past swings do not predict future ones.

The earnings note appears under the ticket when your order would still be open on the stock's next earnings day. It names the date (listed by Nasdaq, or estimated from the same quarter a year earlier when no date is announced yet), how far the session after each of the last four reports closed from the close before it, the widest opening gap, and what the largest of those moves would be in dollars on your order. A price that gaps past your level skips it: a stop then fills at the first fresh price below the stop, and a dip buy below its level. The note can shorten the expiry to the longest option that ends before the report, and the choice stays yours. The dates and regular-session prices come from Nasdaq through a small Function on this site (/api/earnings/<ticker>), because Nasdaq does not allow calls from a browser. Your browser sends it only the ticker, and the answer is the same for every visitor. Nasdaq does not say whether a past report came before the open or after the close, so each report counts the session with the larger opening gap, which can overstate a quiet report. Past reports do not predict the next one.

02What stays private

While an order is open, the chain shows the owner, the token, the amount, the expiry and the commitment. The trigger price or trailing distance, the order type and the slippage stay hidden. When an order fills, the escrow publishes the trigger, the salt and the prices it checked, so anyone can confirm the fill matched the commitment. A cancelled order never reveals its trigger.

A buy order escrows USDG instead of the stock, so the chain shows that it is a buy and how much USDG it can spend. Its level, whether it waits for a dip or a breakout, and its slippage stay hidden the same way until it fills.

03Order timing

Mistline executes an order only when the Chainlink price of the Stock Token is fresh. Robinhood Chain and its pools run around the clock, but the price feed updates only while the US market is open, from Sunday 20:00 to Friday 20:00 US Eastern time (Monday 01:00 to Saturday 01:00 UTC in the US winter, an hour earlier in summer), without US market holidays.

  • On weekends and holidays your order stays in escrow and is checked again when the feed resumes. You can cancel it at any time.
  • If the price moves past your trigger while the market is closed, the order fills at the first fresh price after the reopen. That price can be well below a stop-loss or trailing stop trigger, or well above a take-profit trigger or a breakout buy level.
  • Pre-market, after-hours and overnight sessions have thinner liquidity than regular hours, so prices can move sharply for a short time and reach your trigger.
  • Your slippage setting limits how far the swap may fall short of the fresh price. If the pool cannot fill within it, the order waits instead of filling at a worse price.

04Eligibility

Stock Tokens are not offered to US persons by their issuer. You are responsible for checking that you may hold and trade Stock Tokens where you live. Mistline is non-custodial software, not a broker, and nothing on this site is investment advice.

05Fees

Mistline charges no fee for now. The operator pays the gas for executions. Pool swap fees still apply.

06Who you trust

  • The escrow owner is a single key, not yet a multisig or a timelock. It can pause new orders and fills, switch the agent address, change or disable a market's price feed and pool, and set the market's order limits, all at once with no delay. It has no function that moves your tokens, but a feed or pool it swaps in decides the price your open orders fill at. Every change emits a MarketUpdated or CapsUpdated event on the escrow, and cancelling works at any time, even while the escrow is paused.
  • The agent contract owner approves which TEE code may register. An approved image is the code that can read triggers, so a bad approval could leak them. Every approval is public on the verification page.
  • On testnet only, the agent contract's NEAR account still holds the full access key created with it, which could request the order key. It is deleted before mainnet.
  • The TEE and the MPC network: the agent runs in Intel TDX on Phala Cloud, the order key comes from NEAR's MPC network, and fills are signed by NEAR Chain Signatures.

07Audit status

The contracts have unit, fuzz and fork tests and a Slither pass. A third-party audit is still pending, so bugs may remain. Until it is done Mistline stays on testnet. The escrow also caps every market: a minimum and a limit per order and a limit on everything held for open orders, per side, read live by the order ticket. An expired order counts against that limit until it is closed, and once it has expired anyone can close it, which returns the tokens to its owner. The owner can change the limits, and they never block a cancel or a fill.