Can i send money to someone in germany for investment?

i want to send money to someone in germany for investment. when the person sells, the person will keep 10% of the profit and sends the rest back.

is this legal? what are the tax implications for me and the german resident?