Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions. It is unlawful for the person to set it as a condition to someone with whom he is investing through Mudharaba or Musharaka that the latter guarantees the capital in case of loss. In fact, the partners in such transaction, deal through trust not warranty. So setting warranty of capital as a condition is a transgression and an invalid way of taking other's belongings. Allah knows best.