Logo
Learn
  • Explore Course
Build
  • Explore Buildathon
  • Project Archive

Equity Financing for Prime Brokers : using Repo

On-chain equity repo on Robinhood Chain. Basket collateral, title transfer, rehypothecation with SEC 140% cap enforced on-chain. Wall Street's $4T/day financing primitive, built for DeFi.

Videos

Description

https://github.com/0-knight/equity-financing-on-Robinhood

Why Repo, Not Pools

Pool (Aave/Compound)

Equity Repo (Ours)

Tax

Deposit = sale = capital gains

Financing = no disposal = no tax

Collateral

Single token, locked in vault

Basket, title transfer to lender

Diversification

None

Weighted haircut + bonus

Capital Efficiency

~0.5x (locked)

~1.5x (rehypothecation)

Dividends

Ambiguous ownership

Manufactured payment, clean tax

Rehypothecation

Not possible

Title transfer enables re-pledge

Regulation

N/A

SEC 15c3-3 140% cap on-chain

Leverage Visibility

N/A

Full chain transparency

Maturity

Open-term

Fixed term, yield curve possible

Rate

Floating (utilization)

Fixed repo rate


Robinhood Chain puts tokenized equities on-chain. But having securities on-chain is only the first step. The real question is: how do you finance them?

In traditional finance, a prime broker holding $100M in equities uses those securities as collateral to borrow cash and fund new positions. On-chain today, the only option is pool-based lending — Aave, Compound, Morpho. These work for crypto tokens. They do not work for equity securities.

The Problem with Pools

Tax: depositing TSLA into a vault can be classified as a disposal — a sale — triggering capital gains tax on unrealized appreciation. For institutional portfolios, this creates an immediate tax liability before a dollar is borrowed. This is the primary reason institutions have not adopted DeFi lending for securities.

Fragmentation: pools price one token at a time. One pool for TSLA, another for AMZN. But institutions finance portfolios, not individual stocks. A diversified basket has lower risk than any single stock, but pools have no mechanism to recognize this. Institutions get worse terms than they should.

Dead capital: collateral is locked in a contract. The lender never takes possession. In traditional finance, the lender receives actual title and can re-use those securities — lending them out or pledging them as their own collateral. This is called rehypothecation, and it's how capital markets achieve liquidity. Pools make it impossible.

The Solution: Equity Repo

Repo is how Wall Street finances equities — $4 trillion daily. We built an on-chain implementation deployed on Robinhood Chain testnet.

Tax-neutral: repo is classified as financing, not a sale. Title transfers to the lender, but the borrower has a repurchase obligation. No disposal, no capital gains. The legal structure maps directly to on-chain mechanics — ERC-20 tokens move wallets while the smart contract encodes the repurchase terms.

Basket collateral: a prime broker selects multiple securities into one basket. The contract calculates a weighted-average haircut with a diversification bonus — each additional asset reduces the overall haircut. A three-asset basket might get 13.5% instead of 20% for a single stock. This is on-chain portfolio margining.

Rehypothecation with on-chain compliance: the lender receives actual title and can re-pledge in a new repo. A $1,200 basket can generate $1,800 in total funding — 1.5x capital efficiency. But uncontrolled rehypo caused the 2008 crisis, so SEC Rule 15c3-3 caps it at 140%. On our protocol, this cap is enforced in the smart contract — impossible to breach, not because of auditors, but because of code. Blockchain makes rehypothecation regulatable for the first time.

Manufactured payment: when a dividend occurs mid-repo, the lender holds title but the borrower is economically entitled. Our contract automatically credits the dividend against settlement. In a pool, the vault holds tokens during a dividend — who receives it? Who owes tax? Ambiguous. With repo, title transfer is complete, so tax treatment is clear for both sides.

Cascade detection: when a base repo settles and burns its RepoToken, any downstream rehypo position is automatically margin-called. The entire leverage chain is visible to all parties — unlike traditional finance where this risk is opaque.

Implementation

Six smart contracts on Robinhood Chain testnet using all five stock tokens. Full lifecycle: basket creation, title transfer, margin calls, rehypothecation, settlement. Eight test cases passing. Frontend with live MetaMask integration. Cross-chain DvP with LayerZero — securities on Robinhood Chain, cash on Arbitrum — as next milestone.

Progress During Hackathon

<h2>Implemented (Live on Robinhood Chain Testnet)</h2><p><strong>Basket Collateral System</strong> Prime brokers can select multiple Robinhood stock tokens into a single basket. The BasketManager contract calculates a weighted-average haircut based on each token's volatility, with a diversification bonus that reduces the overall haircut as more assets are added. This is portfolio margining — the standard in traditional prime brokerage — implemented on-chain for the first time.</p><p><strong>Full Repo Lifecycle</strong> The RepoServicer contract handles the complete lifecycle: propose, accept, margin check, top up, settle, and liquidate. When a lender accepts a repo, actual ERC-20 stock tokens transfer from the borrower's wallet to the lender's wallet (title transfer), while USDC moves in the opposite direction. The smart contract encodes the repurchase obligation, rate, and maturity. This mirrors the legal structure of a repo — financing, not a sale — preserving the tax-neutral treatment that institutions require.</p><p><strong>RepoToken (ERC-721)</strong> Each accepted repo mints a RepoToken to the lender. This NFT represents the lender's position — principal, rate, maturity, underlying basket — and is the key to enabling rehypothecation. The token is transferable, inspectable, and burned on settlement.</p><p><strong>Rehypothecation with SEC Compliance</strong> A lender holding a RepoToken can use it as collateral in a new repo, borrowing additional cash from a third party. The protocol enforces SEC Rule 15c3-3's 140% cap directly in the smart contract — the transaction reverts if the rehypothecation amount exceeds 140% of the original borrower's indebtedness. This is not enforced by auditors or compliance officers. It is enforced by code.</p><p><strong>Manufactured Payment</strong> When a dividend occurs during the repo term, the contract records a credit against the borrower's settlement obligation. At maturity, the net payment is: principal + interest − dividend credit. Title transfer ensures clean tax treatment — the lender is the legal dividend recipient, the borrower receives an economic credit. No ambiguity.</p><p><strong>Margin Call and Liquidation</strong> When collateral value drops below the margin threshold (40%), the protocol triggers a margin call with a grace period. The borrower can top up with additional shares of existing basket tokens. If the grace period expires without restoration, the lender can liquidate. Margin health is calculated on-chain and queryable in real time.</p><p><strong>Cascade Detection</strong> When a base repo settles and its RepoToken is burned, the contract checks for downstream rehypothecated positions. If found, it automatically triggers a margin call on the downstream repo. The entire leverage chain is transparent and enforceable.</p><p><strong>Price Oracle (MockPriceFeed)</strong> Owner-settable price feed for all five Robinhood stock tokens. Designed to be replaced by Chainlink on mainnet. Supports per-token volatility settings used in haircut calculation.</p><p><strong>Frontend with Live Contract Integration</strong> Single HTML file with ethers.js v6 and MetaMask. Three wallet roles (Prime Broker, Citadel Capital, Jupiter MMF) with automatic role detection. All UI actions — basket creation, proposal, acceptance, rehypothecation, settlement — execute real transactions on Robinhood Chain testnet. Includes control panel for demo simulation (price changes, dividend triggers, time warp).</p><p><strong>Full Test Suite</strong> Eight Foundry test cases covering: basket creation, haircut calculation, full lifecycle (propose → accept → dividend → settle), margin call + top up, rehypothecation flow, rehypo cap enforcement, liquidation, and settlement math verification. All passing.</p><hr><h2>Future Work</h2><p><strong>Cross-Chain DvP with LayerZero</strong> Stock tokens live on Robinhood Chain. The deepest USDC liquidity lives on Arbitrum. Today, both legs of the repo run on a single chain. But in reality, a lender on Arbitrum shouldn't need to bridge their entire cash position to Robinhood Chain just to finance securities.</p><p>The next milestone is cross-chain Delivery versus Payment. The borrower locks their basket into an escrow contract on Robinhood Chain. The lender locks USDC into a mirror escrow on Arbitrum. LayerZero verifies both locks and triggers simultaneous release — securities to the lender on Robinhood Chain, cash to the borrower on Arbitrum. Atomic. If either side fails, both revert.</p><p>This matters because it connects Robinhood Chain's tokenized securities to Arbitrum's DeFi liquidity without requiring assets to move between chains. Robinhood Chain becomes the settlement layer for securities. Arbitrum becomes the cash leg. LayerZero provides the cross-chain guarantee. Our contracts are already architected with this separation in mind.</p><p><strong>Chainlink Price Feed Integration</strong> Replace MockPriceFeed with Chainlink's live oracle on Robinhood Chain mainnet. Chainlink is already announced as Robinhood Chain's oracle partner. This enables real-time, trustless price data for haircut calculation, margin monitoring, and liquidation — removing the need for any centralized price setter.</p><p><strong>Yield Curve and Term Structure</strong> Currently repos have a single fixed rate. A natural extension is supporting multiple maturities — overnight, 7-day, 30-day, 90-day — with different rates for each term. This creates an on-chain repo yield curve for tokenized securities, which would be a first in DeFi and a powerful signal for institutional adoption.</p><p><strong>RepoToken Marketplace</strong> RepoTokens are ERC-721s representing lender positions. A secondary market for these tokens would allow lenders to exit positions before maturity by selling their RepoToken to another party. This adds liquidity to the repo market itself — not just the underlying securities — and mirrors the active secondary market for repo positions in traditional finance.</p><p><strong>Multi-Party Collateral Substitution</strong> The protocol currently supports top-up with existing basket tokens. Full collateral substitution — swapping one security for another mid-repo — requires lender approval and basket revaluation. This is standard in prime brokerage and would enable more flexible collateral management for institutional borrowers.</p>

Tech Stack

SolidityReactEthersNodeWeb3

Fundraising Status

<p>Self funded. Looking for Grants.</p>

Team Leader
AAJ Park
GitHub Link
github

GitHub

https://github.com/0-knight/equity-financing-on-Robinhood
Product Category
RWADeFiInfra