We introduce a two-agent problem which is inspired by price asymmetry arising from funding difference. When two parties have different funding rates, the two parties deduce different fair prices for derivative contracts even under the same pricing methodology and parameters. Thus, the two parties should enter the derivative contracts with a negotiated price, and we call the negotiation a risk-sharing problem. This framework defines the negotiation as a problem that maximizes the sum of utilities of the two parties. By the derived optimal price, we provide a theoretical analysis on how the price is determined between the two parties. As well as the price, the risk-sharing framework produces an optimal amount of collateral. The derived optimal collateral can be used for contracts between financial firms and non-financial firms. However, inter-dealers markets are governed by regulations. As recommended in Basel III, it is a convention in inter-dealer contracts to pledge the full amount of a close-out price as collateral. In this case, using the optimal collateral, we interpret conditions for the full margin requirement to be indeed optimal.