The contract

StreamMarket: one contract, no proxy. The owner can only change the commission (5 % at most, fixed per offer), where it goes and the metadata URI.

Functions

CallWhoWhat it does
prepare / prepareAndListthe recipientrecords the depositor (and opens an offer) before the hand-over
activateanyonemints the first position once the market is the recipient; buy calls it
list / cancela position's owneroffers basis points for good or for a term
buyanyonepays the exact price; seller paid and position minted in one transaction
harvestanyonepulls fees from Montra's hook and shares them by basis points
collecta position's ownerpays what positions earned
endLeaseanyone, once overpays the lessee, gives the basis points back
split / mergea position's ownercuts or joins positions of one stream
withdrawowner of 10 000 bps for goodhands Montra's role to an address
lockFeeowner of 10 000 bps for goodlocks the pool's fee on Montra for good
withdrawOwedanyone owedtakes out a payment that could not be pushed

What it guarantees

  • A stream in the market is always shared out in exactly 10 000 basis points.
  • The market always holds what it owes, and never pays out more fees than it received (tested on random runs).
  • A payee that refuses a payment is credited instead: nobody can block a sale or the end of a term.
  • No audit yet; the tests and the fork rehearsal below are public.

Rehearsed on mainnet state

On a fork of Elysium at block 12,341,000, with Montra's real hook, lens and router and the real creator of TOKOS: the whole stream listed at 100 HYPE and bought; the creator received 123.275041 HYPE in one transaction (100 less 3 %, plus 26.275041 HYPE not yet claimed); a 10 HYPE trade then paid the buyer 0.159488 HYPE. Shares, terms, withdraw and lockFee pass too. Replay it: FORK=true forge test --match-contract MontraFork in contracts/.

Addresses

Montra registry0xF1E2FA75422F889e565F3142bdbf60B28dce2aa7
Montra launch hook0x6b1216A40B65c83e9c9e18a562C446697B8cf8EC
Montra lens0xb4c202910C40C3A83F6C55683460790AaEc487d4