All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
According to most scholars, this is an invalid transaction, as it is not a valid authorization because the wage is unknown. Also, it is not a ji‘alah (conditional payment) because the payment is unknown.
Moreover, it is not a valid Mudharabah (co-partnership) because it is confined to a certain item. Such confinement makes the Mudharabah defective according to the opinion of the majority of scholars.
If the authorization or Mudharabah becomes invalid, the co-partner deserves the fair market wage.
Ibn Qudaamah said, “If Mudharabah becomes defective, the condition becomes defective and the person does not deserve anything from the stated, but he deserves the fair market wage of similar people.” [Al-Mughni]
Hence, this man only deserves the fair market wage gained by other similar people. This is estimated according to your custom.
Allaah Knows best.