Contract reference
| DarkDesk | 0x0785646d7323F274E20E287A883E60679097082A |
| Deployed in | 0xf941221f1a7245df… |
| DarkHooks | 0xb9662EA9819b6068d62d771dB3A473E5012B2888 (Uniswap v4 hook, see DarkHooks) |
| Chain | Robinhood Chain, id 4663 |
| Source | Verified on Sourcify, exact match, Solidity 0.8.28 |
| USDG | 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 |
| NVDA | 0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC |
| SPY | 0x117cc2133c37B721F49dE2A7a74833232B3B4C0C |
| TSLA | 0x322F0929c4625eD5bAd873c95208D54E1c003b2d |
| WETH | 0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73 |
Write functions
fill(Quote q, bytes sig, uint8 side, uint256 amount) returns (uint256)
cancelNonces(uint256 word, uint256 mask)
setEndpoint(string url)
bond(uint256 amount)
requestUnbond(uint256 amount)
withdrawUnbonded()
// owner
setHouse(address maker, bool isHouse)
setFee(address feeTo, uint16 feeBps) // feeBps <= 10
setDeskToken(address token) // once
setBondParams(uint256 minBond, uint256 slashAmount, uint256 feeFreeBalance)
setPaused(bool)
transferOwnership(address) / acceptOwnership()Read functions
hashQuote(Quote q) view returns (bytes32)
isNonceUsed(address maker, uint256 nonce) view returns (bool)
canQuote(address maker) view returns (bool)
feeFor(address taker, uint256 quoteAmount) view returns (uint256)
house(address) / bonded(address) / unbonding(address) / unbondAt(address) / endpoint(address)
DOMAIN_SEPARATOR() / QUOTE_TYPEHASH / feeBps / feeTo / deskToken / minBond / slashAmount / feeFreeBalanceEvents
Filled(bytes32 indexed quoteHash, address indexed maker, address indexed taker, address base,
address quote, uint8 side, uint256 baseAmount, uint256 quoteAmount, uint256 price, uint256 fee)
Defaulted(bytes32 indexed quoteHash, address indexed maker, address indexed taker, uint256 slashed)
NoncesCancelled(address indexed maker, uint256 word, uint256 mask)
EndpointSet(address indexed maker, string url)
Bonded / UnbondRequested / Unbonded / HouseSet / FeeSet / DeskTokenSet / BondParamsSet / PausedSetTests
24 unit tests cover both sides, rounding, single use across sides, expiry, size, tampering, wrong signer, nonce cancellation, eligibility, house shortfall, pause, EIP-1271 makers, token binding, bonding, default slashing, unbonding and the fee waiver, plus a fuzz test on the buy rounding. A fork test settles both sides against the real NVDA and USDG contracts, on a fork of the live chain.
