Quite right, it is the Sinai covenant. The people (as a whole, as one body) were subject to the justly imposed sanctions contained in the covenant to which they were sworn. Even after so long time, and many generations, the people having accepted and adopted the covenant as an inheritance, and eager to exploit the blessings of their patrimony, were bound to the judgments of it as well.
It is quite clear from the Book of the Covenant, Ex.20:23-23:20 (first at Ex.21:12) that individual transgressors of the covenant faced up to the extreme measure of removal from the body, see Ex.31:14 for two expressions, execution and expulsion; and notably in connection to the Sabbath.
The idea of covenant sanctions against the entire body is not immediately verbally attached to the making of the covenant. It is as if the thought never occurred to God to warn the full nation of such a threat. However, the golden-calf incident (Ex.32) proved the danger of this very thing. God's divine fury, his stated intent to destroy the nation and start over with Moses (vv7-10), is no idle declaration.
It is the Lord's ultimate intent to draw out of Moses the intercession necessary for sparing the people their justice; but absent that, his willingness to reject the body for their repudiation of the covenant terms sworn must be recognized. And this, in spite of the fact that no general sanctions were part of the text of the Book of the Covenant or noted in the formal oath, 24:3.
What we find is that Moses coming down from the Mt.Sinai a second time, Ex.34, when we hear his first words of exposition, 35:1-2, again referring to the Sabbath, they start by rehearsing the most explicit personal warning first delivered in the worship-addendum (Ex.25:2-31:17) to the Book of the Covenant. We then go to Lev.26 to discover the text proclaiming the public, body-wide sanctions for both obedience to and violation of the covenant. It can't be accidental that the first words (vv1-2) bring up reverence for the national Sabbaths. The corporate penalties are laid forth from v14-v39.
Lev.26:46 says that these articles belong to the "statutes and judgments and laws which the LORD made between Himself and the children of Israel on Mt. Sinai by the hand of Moses." So, I am sure that Moses included these articles in his regular expositions (Ex.34:34). Thus, as Israel the body was resumed to the covenant (Ex.34:27), they had delivered to them a full transcript of the woes which should be assigned in the day they were found guilty (convicted of) unfaithfulness.
Dt.27 contains the agenda for a covenant-witness that was to take place on entry to the land (see Jos.8:30-35). The people were that day to curse the individual violaters of the covenant, vv15-26. Dt.28 then contains Moses' final exposition of the Lev.26 sanctions, first the blessings then the destruction--the latter being by far the longer portion, vv15-68.
Dt.29 then connects individual judgments with a corporate warning. The implication was clear: if the people should fail to police the individual who put himself under the LORD's curse, vv20-21; iniquity would overtake the body. And this is what took place. Long afterward, Jer.7:25 describes the patience of the LORD in repeatedly calling the nation back to him by the mouths of the prophets (the LORD's spokesmen, cf. Jer.7:13), but to no avail.
A pattern emerges in the writing prophets, a "covenant lawsuit," for the purpose of convicting the people as a whole for their unfaithfulness. As with all "church discipline," the fundamental goal is repentance and restoration. However, men act only on the historic conditions presented to them. They act on the basis of what is visible, and what is current; they do not know "the secret things" (Dt.29:29) and the future things.
So, in terms of what Sinai represents, we must take two aspects into account. Which shall be first? I choose for the first: the individual. This is where the notion Covenant of Grace is what is proper to a true engagement with the covenant. For an individual to engage with Sinai as if it was by works he gained and kept his relationship with God, would be to secure his failure and loss. Even in terms of the penalties of the law, one might fall under its sanction but still find heaven's mercy. The severity of the body against him was not so personal but legal, according to what was visible.
In terms of the corporate aspect, the body acted for or against its members not in terms of grace, but of law. This does not mean the body (or the head) never showed mercy, but the standard engagement of the body to its membership had to be visible, present-oriented. It had to be consequential. So also, by comparison it was fitting for the divine King or Head also to treat His body in consequential terms. Ultimately, strict treatment of the body was for the preservation of a remnant of that body, sufficient individual members constituting a recognizable body to continue its existence.
This is what it means, then, that the nation as a body be judged as if by a Covenant of Works. The corporate whole has a sign to fulfill. The nation of men must fail (as did Adam), and be judged (as was Adam); leaving but One Man, an Israel of One, the Seed of Promise, to do ALL for the members (one by one and all together) who otherwise fail. All by himself, he bears up under the weight of the full demands of every minute legal requirement, and so fulfills the expectations of the original (Edenic) Covenant of Works; as well as the "unbearable yoke" (Act.15:10) of Sinai. For him it is works, and for them--those united to him--it is the fulfillment of grace.
The body is borne by the Head, not the Head by the body. If it is left to the body to uplift the Head, the body will never rise. It stumbles and falls, and remains where it lies, Ecc.11:3. The lesson was there for Israel to grasp in Exodus right at the beginning. Not only was Israel graciously redeemed out of Egypt, nothing deserving; when they had sworn to the Covenant (all that the LORD says we will do), and had turned aside in toto while still camped below the smoke and noise of Horeb's height, they were spared destruction because of divine grace, because of the mediation of their head (Moses).
The reason why the body needs a head is because a weak body succumbs invariably without it. Each member is weak, and the whole is finally no stronger all together. Israel over its OT generations could not get by without a head; and the imperfect heads they looked to only had them begging for one that was ideal. The prophets imposed the sentence for the body's guilt; even as they continued to point individual members to a future Head and Hope (Act.28:20).