We propose a new approach to model the cost of liquidity based on the synthetic replication of the sale of a liquid asset. Assuming that markets are complete, the sale of a liquid asset can be replicated by a) taking the decision to sell an illiquid asset and effectively sell it at a later date at its fair value b) borrowing cash until the sale is completed and c) short-selling an equivalent liquid asset or portfolio of assets in order to cancel out the economic exposure over the same period. The synthetic replication implies that the cost of liquidity should equal the investor's credit spread plus the securities lending cost or cost of borrow, accounting for the time to liquidate and the holding period. The model produces annualized liquidity cost that can range from a few basis points for liquid stocks to 60bps for real estate and up to 3% for illiquid assets such as infrastructure or private equity. This approach links market and funding liquidity measures and can explain contagion of liquidity crisis among asset classes as well as the absence of liquidity premium in the presence of investors with little funding constraints such as pension funds and soverign wealth funds.