How TUG works
TUG turns one USDC into a LONG token and a SHORT token on a stock's trading day. They move five times the stock's move from the open, in opposite directions, and together they are always worth exactly one USDC. Nothing is borrowed, so nothing is liquidated. One side can go to zero in a day.
USDC goes in and USDC comes out. TUG never gives or takes a stock or a stock token.
The rope
A rope is one stock's one trading day at one leverage. It opens at the regular session's open (09:30 New York, 14:30 UTC in November) and ends at its close (16:00 New York, 21:00 UTC in November). Each rope has two new tokens: that day's LONG and that day's SHORT.
- The anchor
Ais the stock's price when the rope opened: the middle of the rope. - The pull is how far the price
Pnow is from the anchor:P / A - 1. - Snap is the pull reaching the end of the rope, where one side is worth 1 and the other 0 and the rope ends on the spot.
- The pool is where one side is swapped for the other, inside the program.
Ropes exist only inside the regular session. At night, on weekends and on market holidays no rope is open and nobody is exposed to the stock.
Pair in, pair out
While a rope is open, anyone puts in 1 USDC and gets 1 LONG + 1 SHORT (a pair), and anyone puts a pair back and gets exactly 1 USDC. Neither costs a fee.
The two tokens are only ever created and destroyed as pairs, so the USDC in a rope's vault always covers the pairs outstanding: it equals them, unless someone sends USDC to the vault without making pairs, which only leaves a surplus there. Anyone can check this at any moment on the vault page.
The formula
With leverage L (5 on the open ropes):
- value of one LONG =
clamp(0.5 * (1 + L * (P / A - 1)), 0, 1)USDC - value of one SHORT =
1 - LONG
At L = 5 a 2% rise takes LONG from 0.50 to 0.55 (+10%) and SHORT from 0.50 to 0.45 (-10%).
| Stock from the anchor | LONG | SHORT |
|---|---|---|
| -20% | 0.00 | 1.00 |
| -10% | 0.25 | 0.75 |
| -2% | 0.45 | 0.55 |
| 0% | 0.50 | 0.50 |
| +2% | 0.55 | 0.45 |
| +10% | 0.75 | 0.25 |
| +20% | 1.00 | 0.00 |
Snap
When the pull reaches 1 / L (20% at 5x) one side is worth 1 and the other 0. Anyone may post that price record and end the rope there; it settles at 1 and 0. The market's next rope opens at the next session.
Close and settlement
At the session's close, the price record for that moment fixes both values. From then each token is exchanged for its fixed value in USDC, at once, by its holder. The two fixed values sum to exactly 1, so the vault pays out exactly. Redeeming burns the tokens and closes their token accounts in one transaction, returning the account rent.
Anyone can recompute a settled rope from the public price records and the formula on its verification page, or offline with the script in the public repository.
Where the price comes from
The program uses a price at three moments only: the open (the anchor), a snap, and the close. It reads a price record: "the price of market M at time T".
TUG tracks the price of the NVDA stock token (NVDAx) traded on Solana and the price of the ANT stock token traded on Solana. It does not track the stocks' prices on their exchanges.
Each price is read on chain from the deepest Solana pool of the stock token, a Raydium pool against USDC, as the pool's own time-weighted average. Five readings, each over 40 seconds and spaced about 20 seconds apart, all starting at or after the open (or the close); the price is their median. Anyone can take the readings; the first five complete the record and nothing can replace it.
One rule decides which price counts, for the anchor, a snap and the close alike: the record for that market and that moment is unique, and its first five readings at or after the fixed time make it. Nobody can pick among several candidate prices. A record completes about two minutes after the open or the close; the app shows "anchoring" and "settling" with the readings done until then. Every record, with its readings, is on the rope's verification page.
The stock token's price can differ from the stock's price on its exchange, and a large trade can move the pool. That is why each rope has a cap on pairs: small enough that the cheapest way measured to move the pool (move it once, hold it over three readings, move it back) costs at least twice the most a person could win from every rope of that market on the same record, for every move measured of 0.9% and more. Under 0.9% the margin is thinner: the lowest measured was about two times, on a 0.1% fall of ANT. Someone who owns part of that Raydium pool's liquidity gets part of the cost back; that was not measured.
| Market | Pair cap, 5x rope |
|---|---|
| NVDA | 190 |
| ANT | 1,350 |
The caps were measured on 22 November 2026 from that Sunday's depth; they are measured again on weekday depth and change when the depth does.
When the price source stops
If the token's issuer pauses it, or the pool stops trading, no reading can be taken.
- An anchor that cannot complete within 10 minutes of the open means no rope that session. No pair was made, so nothing needs refunding.
- A record that is not complete 30 minutes after its fixed time can never complete. If the close record misses that deadline, anyone may settle the rope on the market's latest complete record whose time lies inside the session, or at the anchor (0.50 and 0.50) if there is none. Before the deadline only the close record can settle the rope, so there is never a choice between two outcomes. During the session a record is completed every 15 minutes, so the fallback is never older than that.
- A record keeps the price source and reading rule it was created with; a later change of the market's source never reaches it.
- Putting pairs back stays open throughout, and redeeming never waits on the source.
The pool
One pool per rope, inside the program, swaps LONG for SHORT.
- Buy one side: the program takes USDC, makes pairs, swaps the unwanted side for the wanted one in the pool, and hands over one side. One transaction.
- Sell one side: part of it is swapped for the other side to make pairs, the pairs are put back, and USDC is handed over. One transaction.
- The pool's price moves away from the formula's value when more people want one side: the crowded side costs a premium and the other side a discount. That gap is what the other side earns. Screens show the formula value and the pool value side by side.
- Because settlement pays the formula value, the pool value closes in on it as the close nears.
- The pool quotes only while LONG's pool value is between 0.25 and 0.75 (the stock within 10% of the anchor at 5x). Outside that range one-side trades stop; pairs in and out continue.
- When any reading of a record is beyond a rope's snap line, that rope's pool takes no trade until that record's deadline has passed; a later reading back inside the line does not reopen it. If the record completes beyond the line, the pool stays stopped until the rope ends at the snap. Making pairs, putting pairs back, supplying and withdrawing stay open throughout.
- Selling a side stops at the session's close. Between the close and settlement (about two minutes) a holder of one side waits; putting pairs back stays open.
- A pool trade pays 0.5% of its value: 0.3% stays in the pool for its suppliers, 0.2% goes as USDC to the program's burn bin.
The multiple you get
5x is measured from the anchor. Entering mid-rope gives a different multiple: L * 0.5 * (P / A) / value. Buying LONG at 0.60, the next 1% move of the stock is about 4.3%; buying SHORT at 0.40, about 6.5%. The app shows the multiple at the current value before you sign.
Money supplied to a pool
The pool hands out the side people buy and keeps the side they do not, so at the close it holds more of the side that fell. Against simply holding pairs, a constant-product pool loses 1 - 2 * sqrt(v * (1 - v)), where v is LONG's settled value:
| LONG settles at | Loss against holding pairs |
|---|---|
| 0.55 | about 0.5% |
| 0.60 | about 2% |
| 0.75 (the range's edge, where the pool stops trading) | about 13.4% |
The range does not stop the loss there. The pool stops trading at 0.25 or 0.75, but the rope can still settle beyond it, up to 1 and 0, on a snap or a close past 10% at 5x. A pool stopped at the edge holds three times as much of the losing side as of the winning side, so on a rope that settles at 1 and 0 it is worth 1 / sqrt(3) of the pairs it started with: a loss of about 42.3%. That figure is for money supplied while the pool stood at 0.50, as the seed money is at the open. Money supplied while the pool is already away from 0.50 can lose more: supplied at one edge of the range, with the pool then traded to the other edge and the rope settling there, the loss is up to about 66.7% against holding the same tokens, fees earned not counted. The supply screen states the figure for the pool's value at that moment.
Trading fees offset it by an amount that depends on volume.
Supplying turns USDC into pairs and adds them in the pool's current proportion; what does not fit the proportion comes back as tokens. The first supply of an empty pool comes from the seed wallet. Withdrawing works at any time: while the rope is open the matched part comes back as USDC and the rest as tokens; after settlement everything comes back in USDC at the fixed values. A position set to roll moves after settlement into the next rope of the same market and leverage, at the settled value.
What TUG does not do
- It does not give or take a stock or a stock token.
- It does not lend, so there is no liquidation price and no funding payment. The vault and the program stand on neither side.
- It is not five times a stock's move over several days. A new rope and new tokens open every day; holding across days is not five times the stock's multi-day move.
- Nothing is open outside the regular session.
What can go wrong
- One side can go to zero in a day. A 20% move from the anchor at 5x ends the rope with one side worth nothing.
- A wrong or moved price. The price is read from the stock token's pool on Solana. It can sit away from the stock's own price, and someone can try to move it. The pair cap per rope is sized so that moving the pool costs more than the move could win, and the median of five time-weighted readings makes a short move count for little.
- The price source stops. If the token's issuer pauses it, the rope settles on the last complete record, as described above.
- Pool money. Money supplied to a pool loses against holding pairs when the stock moves: about 13.4% at the range's edge, about 42.3% on a rope that settles at 1 and 0, and up to about 66.7% for money supplied at the range's edge, fees not counted.
- The program's upgrade authority. The wallet that deployed the program can upgrade it. The program's settings can pause making new pairs, buying a side and supplying a pool; they cannot pause putting a pair back, selling a side, redeeming a settled token or withdrawing from a pool, and they cannot keep a rope from settling.
- Regions. The app does not offer signing in some regions. The program itself cannot block anyone.
What the program's admin can and cannot do
- Can: change the fee shares under their caps, the burner and seed wallets, whether anyone may supply a pool, pause making new pairs, add markets and change their price source and caps (an open rope keeps its cap; a record keeps the reading rule it was created with), write the coming sessions (each at most 12 hours, overlapping no other), mark a market inactive (no new rope opens; running ropes settle as usual), and hand the admin role to another key in two steps.
- Cannot: move USDC out of any vault or pool; stop putting pairs back, selling a side, redeeming or withdrawing; change a session that has started; change a started or complete price record or the source it reads; set the trade fee above 1% or the burn share above 0.5%; keep a rope from settling.
- The program's upgrade authority can replace the program's code. That is the one trust the program cannot remove.