solve mchain