Before revision: We propose a risk-sharing framework for bilateral contracts to find the optimal pair, initial price and amount of collateral, with presence of default risks, collateral, and funding spreads. The derived optimal collateral can be used for contracts between financial firms and non-financial firms. For inter-dealers contracts, which are governed by regulations, the optimal collateral can interpret circumstances where the margin requirement is indeed optimal. We will see later that absence of market frictions is an inherent assumption for the margin requirement in Basel III.
After revision: We introduce a two-agent problem which is inspired by price asymmetry arising from funding difference. When two parties have different funding rates, the margin requirement in Basel III.