I analyze a problem of partnership formation between heterogeneous principals and agents, where each partnership is subject to a moral-hazard problem. In a Wal-rasian equilibrium of the economy, wealthier agents work in more productive lands following a positively assortative matching pattern, since higher wealth has greater marginal effect in high-productivity lands. Consequently, the matches that consist of less wealthy agents are not able to implement the efficient effort and contracts. Agents' share of the match output is in general nonmonotone with respect to initial wealth. If wealth is more unequally distributed than land quality, then the equilibrium share (of the agents) is a monotonically increasing function of wealth.