Purpose – The purpose of this paper is to formulate both withdrawal risk and bankruptcy risk to mitigate the risks and to find the equilibrium area of revenue sharing to depositors. Taking the case of the Indonesian Islamic banking industry, this work might benefit the Islamic banks, banking regulators and all stakeholders to manage the risks and maintain the robust development of the industry. Design/methodology/approach – First, the application of revenue sharing ratio in Islamic banks is studied. Withdrawal risk might happen because of the displaced commercial risk and bankruptcy occurs when the banks fail to manage such withdrawal risk. Referring to that, by using a mathematical approach, the formulas of withdrawal risk and bankruptcy risk are created with some underlying scenarios. Finally, mathematical formula and three dimensions area of the equilibrium revenue sharing ratio are developed. Findings – The paper generates the financial mathematical formulas to assess the vulnerable and invulnerable conditions of the withdrawal risk and the bankruptcy and solvency conditions of the bankruptcy risk to be used by decision makers to mitigate the risks. The ultimate output of the paper is the equilibrium area of the revenue sharing ratio, which locates Islamic banks in a proper condition of no withdrawal risk and bankruptcy risk. Originality/value – To the best of the author's knowledge, this is the first paper trying to analyze the issues under the Indonesian case.