It's not a reference to the commandments in Exodus 20, because it's a reference to the commandments in Exodus 31! It's not elusive at all if you follow the narrative:
- * Yahweh inscribes the tablets and gives them to Moses in Exodus 31, verse 18 -- with no mention of their contents.
* Moses brings the aforementioned tablets down from the mountain and breaks them in Exodus 32, verse 19. Again, the contents of the tablets are not mentioned.
* Yahweh tells Moses to replace the stone tablets, and he'll inscribe them with the same verses that were on the previous set -- AGAIN, up to this point, the contents are not specified.
* Yahweh then proceeds to identify the contents of the previous tablets to Moses, specifying them for the first time in the narrative.
We don't know the contents of either set of tablets until the SECOND set is crafted. But we know they're both the same, because Yahweh tells us when he orders Moses to make a second pair.
As for the "ten words," I think it's merely a scholarly reference that has no relevance to the chronological order or structure of the narrative.
As for Moses' trips up and down the mountain, I can only relate what Exodus tells us up to that point.
- * At the beginning of chapter 19, the Israelites reach Sinai.
* In verse 3, Moses goes up the mountain. After communicating between Yahweh and the Israelites, he comes back down in verse 14 (trip 1).
* In verse 20, after Yahweh comes back to the mountain in a cloud of smoke, Moses goes back up. After some discussion about who's allowed to talk to Yahweh, Moses goes back down in verse 25 (trip 2).
* NOW chapter 20 begins with Yahweh issuing the first commandments to Moses (I had mistakenly counted this as a third trip, but with another read, I realize Moses and the Israelites were on the ground when Yahweh did this).
* After Yahweh issues scores more commandments, Moses, Aaron and a number of elders go up the mountain and see Yahweh in chapter 24, verse 9. Incidentally, this is ANOTHER instance where Yahweh speaks of the commandments in the FUTURE tense (verse 12): "And the Lord said unto Moses, Come up to me into the mount, and be there: and I will give thee tables of stone, and a law, and commandments which I have written; that thou mayest teach them."
It was only then that Moses went into Yahweh's cloud and spent forty days and nights -- at least ten days, multiple chapters and another trip up the mountain after Yahweh had issued the first commandments in chapter 20.
It was at the end of this forty day period (the only one), in chapter 31, verse 18 that Yahweh actually gave Moses the first set of tablets (whose contents, as I've already related, aren't revealed until chapter 34).