We construct a model of capital inflow in a two and multi-country framework. A capital-scarce country, typically a developing country with a high return on capital borrows from a capital-rich country, typically a developed country to finance domestic investment. In the process both the countries gain, raising the world welfare. We formulate the problem in terms of utility maximization with respect to both develop and developing countries’ perspective over infinite time horizon and numerically solve for optimal interest rate, borrowing/lending amount, exchange rate using dynamic programming principle.