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
| Call | Who | What it does |
|---|---|---|
prepare / prepareAndList | the recipient | records the depositor (and opens an offer) before the hand-over |
activate | anyone | mints the first position once the market is the recipient; buy calls it |
list / cancel | a position's owner | offers basis points for good or for a term |
buy | anyone | pays the exact price; seller paid and position minted in one transaction |
harvest | anyone | pulls fees from Montra's hook and shares them by basis points |
collect | a position's owner | pays what positions earned |
endLease | anyone, once over | pays the lessee, gives the basis points back |
split / merge | a position's owner | cuts or joins positions of one stream |
withdraw | owner of 10 000 bps for good | hands Montra's role to an address |
lockFee | owner of 10 000 bps for good | locks the pool's fee on Montra for good |
withdrawOwed | anyone owed | takes 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 registry | 0xF1E2FA75422F889e565F3142bdbf60B28dce2aa7 |
| Montra launch hook | 0x6b1216A40B65c83e9c9e18a562C446697B8cf8EC |
| Montra lens | 0xb4c202910C40C3A83F6C55683460790AaEc487d4 |