i dont think maadara knows the secret of pain six paths. I dont think he knows pain is nagato. I think nagato is using maadara and will try and kill him afterwards. I also think maadara knows pain will betray him. i think later on were gonna see a showdown bt nagato vs maadara
You are still underestimating Madara, one thing he has done very well in the past chapters is knowing is men. For example, Itachi, when Madara was speaking with Sasuke, he said himself that Itachi didn't knew that he knew (but Itachi took precaution any way by putting amaterasu in sasuke). Plus, we've often seen Madara telling zetsu spying on his men, meaning that Madara always try to keep an eye on each of them.
Seriously, you think that Madara doesn't know Pein is Nagato and that the village of Konoha knows??
Also, I've already said that in a tread, we've all seen Madara give order to Pein in secret, meaning without a doubt that Madara his is superior. If Pein is plotting something it means that he isn't strong enough and that he is waiting the right moment to strike. So if Pein attack Madara, it will be a cheap shot.