How Mistline works

Mistline places stop-loss, take-profit and bracket 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.

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, 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.

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 08:00 to Saturday 08:00 WIB 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 trigger or well above a take-profit trigger.
  • 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, and change or disable a market's price feed and pool. It has no function that moves your tokens, and cancelling works 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.