I read the following in a poem published in 1769:
Два въ бабки мальчика играли:
За бабки заорали:
Къ войнѣ за бабки собрались,
These lines initially made no sense to me, but then I learned that the word "бабки," whose primary meaning is "grannies," is also a slang for money, so the poem started making sense to me: it became apparent to me that two boys were playing some game for money and ended up shouting and fighting.
But I got very much confused by the preposition choice in the first line: the preposition is в, not на, so the line reads as "two boys were playing money," as if money were the game name.
Being curious as to why Russians refer to money as бабки, I did research, but found only rather folk etymology articles like this one, in which three different hypotheses are put forward.
Interestingly, the third hypothesis, which is called unpopular by the author, is related to the extinct game that was called бабки and was played for money. The article says that in that game, hoof bones were used and called бабки. I instantly saw possible relevance to the above poem.
But I am still very much confused about all this and overwhelmed by my chaotic thoughts. I am very unsure about the meaning of "за бабки заорали" and "къ войнѣ за бабки собрались." I want to know everything: meaning of the above poem excerpt, etymology of бабки as money, etymology of бабки as hoof bones, and, after all, what all this has to do with grannies. I humbly hope that Russians can explain me everything in a proper systematic way in which Russians like to explain things.
I do not know how to formulate my question in a concise way, but let me try.
My question is this: From the etymological standpoint, why do Russians use the slang "бабки" (grannies) to refer to money and hoof bones, and what do "бабки" mean in the above poem excerpt?
I am especially interested to see serious evidence rather than folk etymology arguments.