Pupil

Pupil whitepaper

A trading brain whose weights live in a contract on Robinhood Chain. It starts knowing nothing and learns in public.

Problem

Trading bots ask for trust. Their models run on someone's server, their records can be edited, and nobody can check what they knew when they made a call.

Idea

Put the model itself on chain. Every guess, every lesson and every weight update is a transaction anyone can read. You watch it grow from random to good, or not.

How it works

  1. Born dumb. The Brain contract starts with random weights. Right now it is Newborn, 1h 18m old, with 23 lessons behind it.
  2. Lessons on chain. Every few minutes teach() reads real stock token prices from Uniswap v3 pools, and Chainlink feeds where available. It scores its last guess for each stock and nudges its weights.
  3. Paper trades. While Newborn it only paper trades. Each one is an event with an entry price and a result.
  4. Real trades. A win streak promotes it to Probation with tiny real trades, then to Trader. Every trade is capped per stock and per trade. Losing streaks demote it.
  5. Holder vault. Anyone can deposit() ETH and get shares. Only the holder can withdraw() their shares. The owner has no function that transfers holder deposits. The owner does control trading settings and price routes, listed on the proof page.
  6. Owner pot. A separate book the owner funds and can withdraw. It never touches holder funds.
  7. Buyback and burn. A share of profit buys back $PUPIL through Pons and sends it to the dead address.

It feels 8 stocks

Rules

Defaults set in Brain.sol at deploy.

Lesson interval150 seconds minimum between lessons
Inputs per stockLast 16 prices: 1, 3 and 8 step returns, moving average gap, volatility
Learning rate0.05, integer math on chain
Accuracy windowLast 64 calls
ProbationAfter 5 correct calls in a row
TraderAfter 8 correct calls in a row
Probation trade sizeUp to 0.01 ETH per trade
Per trade cap$500 per stock by default
Max positionSet per stock, hard cap 50% of a book
Trade gapEvery 3 minutes for the first 7 hours, then every 8 hours
Slippage3% default, hard cap 10%
Holder profit burn10% of profit on withdraw, hard cap 50%
Pot profit burn10% of realized pot profit
Price stalenessChainlink older than 26 hours falls back to the pool price
Settings changesAnnounced 24 hours ahead (12 hour minimum) while holders are in
Minimum deposit0.000001 ETH

Contracts

ContractAddressLinks
Brain
The model, its weights, lessons, trades, the pot and the holder vault
0x3Fb2fEb060c1118387D170e45BE461BCfAC753b4Code Verified source
Price adapter
Reads stock token prices from Uniswap v3 pools
0xaDdFb99A6fEd04eF219f0C30993B23F4431235e2Code Verified source
Swap adapter
Executes real trades on Uniswap v3
0x16B3251c999D9b817113Ce073843A0951c2e8E0cCode Verified source
Buyback burner
Buys the project token on Pons with the profit share and sends it to the dead address
0x43bA289aA76ac24DA46f950D675F6908D927DAaeCode Verified source

$PUPIL

$PUPIL trades on Pons.

$PUPIL 0xae7440a1c91f2b6d784d4af2ebb47997137ceba6 Buy $PUPIL