According to John Welch, the words for our sacrament prayers were first found in this dispensation in the Book of Mormon in Moroni 4:3--5:2. The words in those texts can be traced back further to the words of Jesus Christ himself in 3 Nephi 18. What is also noteworthy is that the words and covenants are also tied to King Benjamin's speech. A detailed relationship exists between Mosiah 5, 3 Nephi 18, and Moroni 4-5.
For example, at the conclusion of Benjamin's speech, his people entered into a covenant, saying "we are willing . . . to be obedient to [God's] commandments in all things that he shall command us," after which they agreed to "take upon [themselves] the name of Christ" and obligated themselves to "remember to retain the name written always in [their] hearts" (Mosiah 5:5-12). These three specific promises not only reappear in Moroni 4, but are still the essential elements of the sacramental prayers as they are used today. [John W. Welch, "Our Nephite Sacrament Prayers," in Reexploring the Book of Mormon, pp. 286-287]