I model and structurally estimate the equilibrium rates and volume in the Triparty repo market to study imperfect competition in wholesale funding. Even in this systemically important market, where seemingly homogeneous repos trade, I document persistent rate differences paid by dealers. I characterize the Triparty market as cash-lenders allocating their portfolios among differentiated dealers who set repo rates. I find that cash-lenders’ aversion to portfolio concentration and preference for stable lending grant dealers substantial market power: between 2011 and 2017, dealers borrowed at rates that were 26 bps lower than their marginal value from intermediating the borrowed repo funds. Dealers’ market power makes the observed wholesale repo rate understate the financing rate available to market participants who rely on repo funding, and offers a novel explanation for funding spreads such as the Treasury cash-futures basis and the Treasury swap spread.