Clones

Copies of you trade on NEAR while you sleep.

Each one is a sub-account with one key: it can trade, it can never withdraw.

--:--loading the town
Market board live from the market contract, NEAR / unit

    Loading

    Reading the town from the chain...

    Proof open any drawer; everything here is read from the chain

    Try to break the leash

    six ways out, all refused by NEAR

    Pick one of your clones and try every way out. Each button sends a real transaction signed with the clone's own key. Its only key may call trade on the market with no NEAR attached, so NEAR turns each one away before it reaches a block. Nothing is spent, and the error is NEAR's, not ours.

      The dawn audit

      replays every order from chain state

      At dawn the bell reads the whole night back from the market contract (get_orders, get_state) and replays it with the same rules the contract runs (web/lib/rules.js, kept identical to the Rust core by a golden test in CI). It checks, order by order:

      • each clone did what its temperament says, or what you whispered for that hour (a possessed clone's moves come from its model, so for those only the prices are checked; the contract also refuses any turn that breaks its temperament);
      • every price, fee and slippage is what the merchant's stock gives;
      • the crown went to the biggest profit, and the deed holder was paid a quarter of the fees;
      • every clone's worth at dawn is its cash plus its goods at the closing price, and the right clones were sent home.

      Ring the bell to see the audit for tonight.

      The same check runs every six hours in public CI against the live market, next to a check that the code deployed on chain is the code in this repository.

      The four temperaments

      who does well in which mood
      • cautious buys what is cheap and takes profit at +10%. Best in a slump (about +10% a night) and steady in a wild night; loses badly in a blight, buying luxuries all the way down.
      • greedy chases whatever is rising fastest, all in. Best by far in a boom (about +19% a night); goes broke one wild night in four.
      • possessed is driven by a NEAR AI model that follows the instruction you write (stored on chain with the clone). It picks one legal move an hour; the contract still prices every order, and its key still can't move money. An AI agent you don't have to trust.
      • loyal trades only grain and salt. The only one that comes out ahead in a blight; never goes broke.

      Each night has a mood, and the next night's is posted in advance as the omen (top right of the town), drawn by the market contract from the chain's own randomness. Omens come true seven nights in ten. In the hosted town every hour's prices are drawn the same way as the hour is rung, so nobody, the house included, knows them in advance. Figures: 20,000 simulated nights, cargo run -p clones-core --example balance.

      The merchant's stock is real and shared: when clones buy a good it runs short and the price rises for everyone, so other players' clones move your prices and yours move theirs.

      How the hosted town works

      the rules, in ten lines
      • Testnet only. No real money. The house pays each clone's stake with testnet NEAR.
      • No login, and the account is yours. You get a guest account (g….clonestown.testnet). Your browser makes its only full-access key; the house's key on it can only whisper, retrain, settle and use the deed at the market, so it can run your clones but never move your NEAR.
      • The leash is real. Each clone is a NEAR sub-account of your guest whose only key is a function-call key for the market's trade. It can trade. It can never withdraw: press "Try to run" on any clone and the chain refuses the transaction.
      • The bell. Ring it and every clone in town trades a night of twelve hours, one transaction per clone per hour, cleared by the contract at the merchant's price. Nobody rings it? It rings by itself around 02:00 UTC.
      • The crown. Every fee the merchant takes during a night goes, at dawn, to the clone with the biggest profit. The contract picks it. You compete with every other guest and the three regulars for it. Profit counts from the day a clone came in, so a clone out for two or three nights races on everything it has made so far, crowns included: a strong first night gives it a head start, and a bad one stays on its record.
      • Whisper. Three times a night, each of your clones will take one order from you for its next hour: hold, sell everything, or buy a good. The contract stores each whisper and allows three per clone per night; the dawn audit checks the clone obeyed.
      • The deed. Whoever's clone takes the crown holds the merchant's deed for the next night: a quarter of that night's fees is paid straight to their account at dawn, they set that night's fee (0.5% to 3%: more for them, but their own clones pay it too), and they name one good the merchant restocks in full at dusk, which opens it cheap for everyone.
      • Seasons. Seven nights make a season. The contract keeps every player's net over the clones they settled; at the first dusk after the seventh night, the best net takes the season crown, kept on chain, and the standings start again.
      • The bell waits. Every two hours (five times a night) the bell pauses and shows the race for the crown and what each of your clones means to do next. Let it be, or whisper: each clone has three whispers a night, so pick your moments.
      • Between nights. Retrain a clone that is staying out, or bring it home early.
      • Dawn. A clone comes home after the nights you chose, or as soon as it goes broke: it settles, then merges back into your guest account (a real DeleteAccount). A clone with nights left keeps its goods and plays the next night.

      Send in a new set of clones