In this paper, we tackle the network coding-based opportunistic routing problem for multicast. We present the factors that affect the performance of the multicast protocols. Then, we formulate the problem as an optimization problem. Using the duality approach, we show that a distributed solution can be used to achieve the optimal solution. The distributed solution consists of two phases. In the first phase, the most reliable broadcasting tree is formed based on the ETX metric. In the second phase, a credit assignment algorithm is run at each node to determine the number of coded packets that the node has to send. The distributed algorithm adapts to the changes in the channel conditions and does not require explicit knowledge of the properties of the network. To reduce the number of feedback messages, and to resolve the problem of delayed feedback, we also perform network coding on the feedback messages. We evaluate our algorithm using simulations which show that in some realistic cases the throughput achieved by our algorithm can be double or triple that of the state-of-the-art.