In the case mentioned above, whatever profit is received it shall be halal and lawful. It shall be lawful for the participant to take the profit. Also it shall be lawful to take monthly salary. However, 40% from the profit should be given in charity to the poor with the intention of giving sadaqah of haram money. And when the 40% of sadaqah is paid then all your capital shall turn purely halal and there shall be lots of barakah.
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband