fotoshi
the paper
1. the object
fotoshi is a token on solana. lowercase name, lowercase symbol, nine decimals, token-2022 standard. one anchor program is its only mint authority and its only redeemer. the instruction set holds exactly three things: enter, exit, and the transfer hook that moves cost basis. there is no pause switch, no owner, no fee collector, no parameter that any person can touch after deployment, and the upgrade authority was destroyed in the deployment transaction. fotoshi does not ask to be trusted. it asks to be checked.
2. the bound
supply is bounded by K = 2 718 281, the first seven digits of e. the marginal price of the next token is a hyperbola in supply space:
cheap while the curve is empty, unpayable as q approaches K. deposits buy along this price, redemptions sell along it, and the sol sits in a single reserve account owned by the program. no token exists without sol that entered through the curve, and no sol leaves except through the inverse of the same formula.
3. the slope is a state, not a setting
every bonding curve before this one had a slope chosen by a person and frozen. in fotoshi, S is computed from the program's own books at every state change:
the slope is the ratio between what the reserve actually holds and how scarce the remaining supply is. nobody sets it after genesis. nobody could. events move it, and as the paper will show, they move it in only one direction.
4. entering
a deposit of d sol at state (q, R) mints
and the cost of minting a chosen amount x is the integral of the price over the interval, in closed form:
one line of algebra shows that a mint leaves S unchanged: the deposit raises R by exactly S times the growth of ln(K / (K − q)), so the ratio that defines S is preserved. while people only enter, fotoshi behaves like a fixed curve, and every token in existence is matched by sol in the reserve.
5. exiting, and what stays behind
burning b tokens has a curve value, the exact inverse of minting:
but the payout is not V. the payout is
the forfeit stays in the reserve. permanently. no account can claim it, no instruction can spend it, and there is no address it could be sent to. and because S is computed from R, a forfeit does something no fee ever did: it raises the slope of the entire curve, for every future mint and every future exit, forever. leaving early does not just cost the leaver. it re prices the ladder for everyone who comes after, upward.
6. lemma one
the slope never falls.
proof. three kinds of state change exist. a mint preserves S, shown in section four. an exit whose basis covers its curve value pays V exactly, which removes from R precisely what the shrinking of ln(K / (K − q)) releases, preserving S. an exit that forfeits removes less than that, so the numerator of S falls by less than the denominator, and S rises. there is no fourth kind of state change. S is a staircase over the event sequence, flat or rising, with no step down anywhere in its future.
7. lemma two
a round trip cannot profit.
proof. a wallet deposits d, receives x, and later burns the same x. its payout is capped at its basis, which is d, so the curve can never return more than it took in. and if the wallet wants back in, the slope it meets is at least the slope it left, by lemma one, so the same d now buys at most the same x, and strictly less if anyone forfeited in between. the curve pays nothing for hesitation and charges for it exactly once, at re entry. the program can display, for any wallet that has ever exited, the precise cost of having flinched. computed, not estimated.
8. lemma three
the reserve is exactly sufficient.
proof. by the definition of the slope, R = S · ln(K / (K − q)) at every state. the right hand side is precisely the curve value of unwinding the entire outstanding supply at the current slope. solvency is therefore not a property the program checks, and not a promise the site makes. it is the definition of S, rearranged. the books balance because the books are the formula.
9. basis rides with the token
the payout rule needs each token's entry cost, and tokens move between wallets. so fotoshi makes cost basis a conserved on chain quantity. the token-2022 transfer hook moves weighted average basis alongside every transfer: send a third of your balance and a third of your basis account goes with it, automatically, in the same transaction. this has two consequences. first, every wallet's true average entry is arithmetic on chain, not a screenshot. second, tokens bought on a secondary market arrive carrying the basis their seller gave up, so redemption through the curve structurally favors the wallets that minted, without a single rule saying so.
10. constraints
three, and no more. a single mint is capped at 25 sol, so no one transaction can swallow a meaningful share of the curve. an exit in the same slot as that wallet's last mint fails, which prices flash loan loops out of existence. and the protocol fee is zero: the resistance that other curves buy with a tax on everyone, fotoshi funds with the forfeits of the people who leave. the ones who stay never pay for the walls.
11. the two venues
the curve always quotes both sides from the formulas above, and it never runs out of patience or inventory: its exit side is good for the entire supply, by lemma three. secondary pools on solana, reached through jupiter, quote whatever people currently feel. the two prices answer different questions. when the market bids above the curve's mint price, minting is the cheaper entry and each mint advances the curve state. when the market bids below a wallet's basis, the curve is the floor under that wallet, an exit that no thin order book can take away. compare the two numbers on the trade panel and take the better one. the program does not care which door you use.
12. dormancy, and the long state
the mint price grows without bound as q approaches K, so at some point the marginal cost of issuance passes what anyone will pay, and entry goes quiet on its own. no deadline did that. the shape did. after issuance sleeps, the object keeps changing through exits alone: every forfeit lifts the slope, and the staircase keeps a permanent public record of everyone who left and what it cost the curve to lose them. the program reads four things: q, R, basis, and human decisions. there is no clock in the instruction set, no epoch, no schedule, no date. fotoshi has no calendar. you are the clock.