On the face of it, it's hard to think of two more unrelated subjects than St. Thomas Aquinas (1225-1274), the greatest philosopher of the Middle Ages, and bitcoins, the original blockchain-enabled digital currency that has spawned a flock of imitations and variations. But Aquinas set out some guidelines that can let us at least speculate (so to speak) about what he would say about bitcoins.
It's hard to imagine how different the economy of 1250 A. D. was from today's economy, but some things were the same. There were merchants, traders, banks, and markets then as well as now. But in Europe, everything was done under the direct or at least indirect supervision of the Church, and so anyone who tried something too innovative had to justify it on the basis of Christian doctrine. 
Aquinas viewed money much as his philosophical ancestor Aristotle did: as a medium of exchange, a legitimate accounting method that allowed trade to take place without the inconvenience of bartering this good for that unrelated service. 
To use a time-honored analogy, if a shoemaker needs bread and a baker needs his shoes repaired, a swap could conceivably be arranged without money. But if the baker needs his shoe fixed at a time when the shoemaker doesn't happen to want any bread, the barter system breaks down.  
Money solves this problem by keeping track of the values of goods and services and allowing trade to take place without the need for barter. The baker takes money he's earned and pays the shoemaker for his services, even if the shoemaker doesn't like the kind of bread the baker makes. And so on.
Even in the case where a person gains a speculative advantage, Aquinas said that there is nothing necessarily wrong or sinful in taking that advantage. According to an article by Murray Rothbard, Aquinas gave the example of a trader who is the first to bring a wagonload of food to a famine-stricken area where food is very scarce, and consequently the price he can get is very high.  
In essence, Aquinas asks the question, “Would it be wrong for the trader to charge the prevailing high price, even though other traders will probably follow him and lower the price? Or should he charge the lower price that he knows will prevail after the other traders arrive?” Aquinas says charging the higher initial price would not be a sin, though it would be more charitable to sell the food below the market price.  
So in saying this, he implied that taking advantage of a favorable market position, as we might put it today, is not necessarily wrong.
The bitcoin variety of digital currency is a particularly pure form of speculation in which the thing of value is so abstract as to be nearly nonexistent. A bitcoin itself is just a record of transactions that play out under certain rules that are publicly known, and can be created only with the expenditure of a certain amount of energy, time, and other resources.  
Its value in terms of more familiar monetary measures such as the dollar depends entirely on what people perceive its value to be. While that perception is not completely random, as the throw of a die is, it is so far beyond the control of most individuals that it might as well be random.  
So in this aspect, speculating in bitcoins amounts to a kind of gambling, as many other forms of financial speculation do as well. And Aquinas had something to say about gambling.
In one section of his magnum opus, the Summa Theologiae, Aquinas says that giving gambling winnings to charity would be wrong if the winnings were garnered from those who have “no power to alienate their property,” such as children and the mentally disabled. And if gambling is illegal according to civil law, it would also be wrong.  
But he implies that gambling winnings from a game in which everyone knows and understands the rules, and gambles anyway, would at least not be sinful, although as with any other indulgence, excessive gambling can become harmful to oneself and others and becomes a sin against charity. So to the extent that buying bitcoins amounts to gambling, Aquinas would also give them a conditional pass.
I will close with a personal bitcoin story that I hope the subject of it won't mind my sharing, if I don't give any names.  Some time ago I had a student in one of my classes come up to me and ask for advice. It turns out she had learned about the bitcoin business in the very early days of its existence when you could get some for a few dollars each, and she'd gone ahead and bought some.  
At the time she approached me about the matter, they were worth some very serious money—many thousands each, was my impression—and she wanted some advice as to what to do with them. This was when their value was reaching a historic high.
I warned her about adverse tax implications, and told her I was no financial expert, but selling a few of them with awareness of her tax situation wouldn't be a bad thing. I'm not sure what she did, but it's likely she was able to pay for her whole college education that way and then some. I also encouraged her to give some of her profit away as a way of developing a habit of charity.
To be frank, I began this post hoping that I could find a blanket condemnation by Aquinas of bitcoins.  But I don't see that in what I was able to find, at least in this brief and superficial inquiry. After all, we're used to our bank accounts being recorded in digital form, and bitcoins are just an elaboration of digital banking, in a sense, although with different rules.  
So I'm pretty sure that if we had Aquinas with us today, and we could manage to translate the idea of digital currency into Latin, he would catch on and probably say that there's nothing intrinsically wrong with bitcoins. But like any medium of exchange, bitcoins or dollars or bars of gold can either be used wrongly—e. g. stolen—or used to benefit people.  
The problems with them, if any, will not be found in the software or the hardware, but will arise from the human heart.
Karl D. Stephan is a professor of electrical engineering at Texas State University in San Marcos, Texas. This article has been republished, with permission, from his blog Engineering Ethics, which is a MercatorNet partner site. His ebook Ethical and Otherwise: Engineering In the Headlines is available in Kindle format and also in the iTunes store.
Sources:  I referred to the website https://mises.org/library/philosopher-theologian-st-thomas-aquinas which carries an article dated 12/25/2009 “The Philosopher-Theologian: St. Thomas Aquinas” by Murray Rothbard, and a Google-enabled excerpt from the Cambridge University Press edition of Aquinas' Summa Theologiae edited by R. J. Batten, O. P., vol. 34 (section 2a2a3, 23-33, art. 7.2), p. 263.

Karl D. Stephan received the B. S. in Engineering from the California Institute of Technology in 1976. Following a year of graduate study at Cornell, he received the Master of Engineering degree in 1977...