IntegrationEnglish
Contracts
Addresses, roles, full function surface
Four contracts on Robinhood Chain (4663), MIT-licensed.
Addresses
| Role | Address |
|---|---|
| MarketFactoryV1: curve preset, market deployment, buy router | To be filled |
| ProfileMarketV1: clone implementation | To be filled |
| ReferralRegistryV1 | To be filled |
| USDC: quote asset | To be filled |
| Factory deployment block | To be filled |
Discovery starts at the factory. Enumerate MarketCreated from the deployment block and you hold every market, its profile, its creator, and the fee preset version it was born with. A market address arriving from anywhere else belongs to a factory you have not verified.
MarketFactoryV1
Deploys markets, holds the versioned fee preset, routes buys.
function createMarket(
bytes32 profileId,
bytes32 metadataHash,
uint256 firstPositionClaims,
uint256 maxFirstPositionCost,
uint256 deadline
) external returns (address market);
function buyOnMarket(address market, uint256 claims, uint256 maxTotalCost, uint256 deadline)
external returns (uint256 totalCost);
function predictMarketAddress(bytes32 profileId) external view returns (address);
function marketByProfile(bytes32 profileId) external view returns (address);
function isMarket(address market) external view returns (bool);
function curvePreset() external view returns (...);
function curvePresetVersion() external view returns (uint64);
function referralRegistry() external view returns (address);
function treasury() external view returns (address);Deterministic addresses. Markets are EIP-1167 clones deployed with CREATE2, salted keccak256(abi.encode(block.chainid, profileId)). predictMarketAddress returns a market's address before it exists.
The buy router. buyOnMarket lets a trader approve the factory once and trade every market it created. Economics are untouched: the market re-quotes in the same transaction, applies the minimum, the per-wallet cap and the referral lookup to the real buyer, and emits Bought with the real buyer. The factory zeroes its allowance on the market after the call and leaves no standing spending right on itself.
isMarket is the load-bearing guard. Without it, anyone points the router at a contract they wrote and spends the allowance every trader grants the factory. Check it in your own integration too.
Admin surface: setCurvePreset, setPauser, setTreasury, setReferralRegistry.
ProfileMarketV1
One clone per profile. Non-transferable claims backed by their own reserve.
// identity
function profileId() external view returns (bytes32);
function metadataHash() external view returns (bytes32);
function usdc() external view returns (address);
function factory() external view returns (address);
function creator() external view returns (address);
function talent() external view returns (address);
// state
function totalSupply() external view returns (uint256);
function balanceOf(address) external view returns (uint256);
function positionCost(address) external view returns (uint256);
function reserveBalance() external view returns (uint256);
function actualReserveBalance() external view returns (uint256);
// pricing
function marginalPrice() external view returns (uint256);
function reserveFor(uint256 supply) external pure returns (uint256);
function quoteBuy(uint256 claims) external view returns (uint256 reserveCost, uint256 fee, uint256 totalCost);
function quoteSell(uint256 claims) external view returns (uint256 grossProceeds, uint256 fee, uint256 netProceeds);
function quoteClaimsForDeposit(uint256 deposit) external view returns (uint256);
function exitValue(address account) external view returns (uint256);
// trade
function buy(uint256 claims, uint256 maxTotalCost, uint256 deadline) external returns (uint256);
function sell(uint256 claims, uint256 minNetProceeds, uint256 deadline) external returns (uint256);
function buyFor(address account, uint256 claims, uint256 maxTotalCost, uint256 deadline) external returns (uint256); // factory only
// fees
function feeBps() external view returns (uint256);
function currentCreatorFeeShareBps() external view returns (uint256);
function referrerFeeShareBps() external view returns (uint256);
function feesOwed(address) external view returns (uint256);
function totalFeesOwed() external view returns (uint256);
function claimFees() external returns (uint256 amount);
// guards
function minBuyCost() external view returns (uint256);
function maxBuyCost() external view returns (uint256);
function youngReserveThreshold() external view returns (uint256);
function youngWalletCap() external view returns (uint256);
function buysPaused() external view returns (bool);
function paused() external view returns (bool);There is no transfer function and no reserve withdrawal function. Both absences are the design.
Roles: DEFAULT_ADMIN_ROLE (held by the admin, never the creator) and PAUSER_ROLE. pauseBuys / pauseAll are pauser-callable. unpauseBuys, unpauseAll and setTalent are admin-only.
ReferralRegistryV1
function referrerOf(address account) external view returns (address); // zero if none or expired
function bindingOf(address account) external view returns (address referrer, uint64 expiresAt);
function bind(address account, address referrer) external; // OPERATOR_ROLE only
function attributionWindow() external view returns (uint256); // 90 days, immutableSee Referrals.
Verifying
Every number in this documentation is readable from the chain:
RPC=https://rpc.mainnet.chain.robinhood.com
cast call <factory> "curvePresetVersion()(uint64)" --rpc-url $RPC
cast call <market> "reserveBalance()(uint256)" --rpc-url $RPCWhen this page and the chain disagree, the chain is right. Tell us.