Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boogie contracts

test

Settlement for Boogie, a GPU marketplace on Robinhood Chain where an hour of compute is paid for with tokenized equity.

StockPay books a rental and takes payment in one transaction. You hand it a price we signed, it pulls your NVDA, SPY, QQQ or TSLA, sells exactly as much as the rental costs through Uniswap, keeps the dollars and returns the remainder to you before the transaction ends.

Live on Robinhood Chain at 0x96Ce146534837BC995a8e65F45A34fEFFaF9F107.

Why a signed quote

A stock price and a dollar price move at different speeds. If the contract fixed the number of shares, the rental would cost a different amount by the time the transaction landed. So the dollar amount is fixed and signed by us, and the share amount floats: you approve a ceiling, the swap spends what it needs, and the rest comes back in the same transaction.

The quote binds the machine, the hours, the amount, the payer, a nonce, a deadline and this contract's own address. It cannot be replayed, redirected to another wallet, or used on another chain.

What the contract does not do

It does not hold your equity. It does not know which datacenter runs the machine. It does not keep custody of anything between transactions: what it holds is the dollars for rentals it has booked, and nothing else.

Provisioning happens off chain. The contract records that an order was paid, an operator marks it provisioned or refunds it, and that record is the only thing the two sides agree on.

Order flow

payWithStock / payWithUsdg   the renter pays, the order is booked as Paid
markProvisioned              the machine came up, the order is Provisioned
refund                       the machine never came up, the money goes back

Refunds are denominated in dollars rather than in the stock that was paid, because the equity leg was already sold at payment time.

Build and test

git clone --recurse-submodules https://github.com/aurexcashgit/boogie-contracts
cd boogie-contracts
forge test

Eighteen tests cover the quote checks, replay, expiry, tampering, the refund path and the guard that stops the owner from draining money held for rentals.

The fork test is the one that matters most, and it runs against the live chain:

forge test --match-contract StockPayFork --fork-url https://rpc.mainnet.chain.robinhood.com

It proves the swap path end to end, turning a real stock balance into an exact number of dollars.

Two deliberate choices

block.timestamp decides whether a quote has expired. A validator can nudge it by seconds, which does not matter for something that lives five minutes, and the alternative costs more than it protects.

The owner can sweep settled dollars but cannot touch money held against orders that have not been provisioned or refunded yet. There is a test for exactly that, because the difference between the two is the only thing standing between a rental and a rug.

Renting from code

Everything the website does is a public HTTP call plus a signature from the wallet that pays. There is no API key and no account. See examples/ and the full documentation.

About

Settlement contract for Boogie: rent a GPU by the hour, pay with tokenized equity on Robinhood Chain

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages