Showing posts with label Spam. Show all posts
Showing posts with label Spam. Show all posts

Wednesday, March 23, 2016

It's all about trust, context and timeliness - reinventing social media with blockchain

In the recent week after posting about my experience as /r/Bitcoin moderator, doing an AMA on the subreddit, and the subsequent discussion that followed in the related topics (1, 2, 3, 4, 5, 6), I've heard a lot of people voicing their opinion that the way Reddit works is rather broken. This further amplified by the recent research by BashCo into possible vote manipulation that might be going around in our subreddit, as well as a few people noticing that some of the most popular subreddits seem to be both heavily moderating the content about the Brussels terror attack, removing some highly-voted submissions and a lot of comments on the subject. Long story short - it looks like a lot of the discussion on Reddit is swayed and controlled by a handful of people controlling the subreddits (/r/Bitcoin notwithstanding). So would it be possible to reinvent Reddit and similar social media in a way that would make vote manipulation, trolling, spamming and centralization of power irrelevant?

Filter bubbles and Web of Trust


We consume a lot of the media and news. The more relevant something is to our interests, the more likely we are to consume it, so logically a lot of companies try to give us "filter bubbles":


In short, a filter bubble personalizes the news and stories we see in our social media feeds based on what we enjoy and have consumed in the past. If we're pro Bernie Sanders, we might hear more news from /r/SandersForPresident/ rather than from /r/The_Donald/. Companies like Facebook do this more covertly, while Reddit is more explicit about allowing you to subscribe to whichever subreddit sparks your interest the most.

We could use the concept of explicit and personalized filter bubble to figure out what news would be relevant to us. We would have to pick which things we're interested in (tech news, pictures of cute animals, videogames, etc.) to create the "context" for our interests (more on that later). However, this would only be as useful to us as the quality of the content to consume, which can be filled with spam and manipulated. Here is where the idea of Web of Trust comes in.

Web of Trust is a formal way of stating who do you trust, and creating a network of trust-based relationships between the users. This applies to both finding trustworthy websites as well as money. In our context, we would create our digital identity (or multiple identities), and then state which other identities we trust or distrust. Whether it would be family members, celebrities or just some random stranger on the internet posting funny pictures, we could cherry pick who is relevant to our interests. Those people, and the people they are connected with would allow us to access the relevant data feeds.

The Web of Trust can also be resilient against sybil attacks and vote manipulation - it wouldn't matter if I created a million identities and they would all "Like" some post if you wouldn't trust anyone trusting those puppet accounts. Trust could also be diluted in a PageRank fashion - if I trust a million people, I might be less reliable than someone that trusts only a handful.

Context is also important for trust. While I might trust someone to provide me with animated book reviews, I wouldn't be taking technical advise from them. Similarly, if someone was blatantly in opposition to my views, I might explicitly distrust them in that field. This would allow us to mix and match who do we trust and under what circumstances to make our filters and web of trust more explicit. For example, my trust might look like:






[Self]
Videogames
Wrestling
Bitcoin
Astronomy
0.1
0.9
0
0
0
LukeJr
0
0
0
0.2
-1.0

In this example, I would value TotalBiscuit's opinion on videogames to a strong degree - he's a competent critic with years of reputation. While he might also be a fan of wrestling, I don't share his passion for the topic so I'm indifferent to anything he would share in that content. He's not an expert on Bitcoin, so I'd also give him a 0.

LukeJr's opinion on Bitcoin I would trust a bit - he's a competent developer, although his abuse of trust in the Gentoo story leaves something to be desired. Similarly, his view that the Sun orbits the Earth makes me distrust whatever he has to say on the subject of astronomy.

The [self] variable would be a category about the person - in this example I would be interested in hearing a bit about TotalBitscuit's general life (similar to a Twitter feed).

Evaluating content


By establishing our web of trust with the proper context, we can create proper filter bubbles for the content we want to consume. If the web of trust data would be public, say, living on an Ethereum smart contract, we could pre-compute all the values we would assign to everyone relevant to us on a given topic. People we directly trust would get full score, whoever they trust would be counted as a product of the two trusts plus some discount on how far they are away from us. Doing the same for further connection levels we would eventually tend towards zero trust - irrelevance.

Every submitted piece of content would have a context - just like hashtags on Twitter or subreddits on Reddit. Generic content would have a context of the person posting it - just like a Tweet without a hashtag. The content itself could be a post or a link like on Reddit.

Now, when someone would consume a piece of content, they would give it a upvote or a downvote, affecting how the people that trust them would view the content. For every person, the aggregate score of a given piece of content would depend on everyone in their web of trust, and only that. So if I trust say, 10 movie reviewers and they all upvote Cloud Atlas, it would have a score of 10 for me. If they disagreed on The Revenant, it might get a score of 2-3. If someone posts a picture of a cat in the "movie" category, that would get a score of -10 - it might still be a cute picture, but it's not a movie.

Just like on Reddit, the concept of timeliness also needs to be taken into consideration. A lot of people would be interested in getting the latest news and the newest cat memes, so similarly to Reddit the overall position of a submission should fade away with time to leave room for fresh content.

All of these things can be weighted depending on how one wants to browse the data feed. We could see the most relevant submissions, the newest ones, the most controversial, or the top submissions of all times.

Lastly, one's votes on various submissions might also slowly tweak the Web of Trust of that individual. Every upvote might add 0.01 to a trust for a given person in a given context, and every downvote would subtract as much. This way we would organically adjust our filter bubble based on the content we consume discovering new content curators as we go along.

Technical aspects


From a technical perspective, things might be a bit complicated. The biggest challenge I would see for a system like that being deployed on a distributed network with proper cryptography to run everything on would be the overhead. While a simple system would just tally a score for every submission and update it every now and then when new votes come in, here every vote would have to be registered and parsed separately. Seeing how Reddit can have ~30 million votes per month (over 10 votes per second) and 230 million unique visitors, that can mean a lot of data to synchronize. A lot of it could be broken down based on the context - if you're not interested in Bitcoin, you don't have to synchronize the Bitcoin sub-branch, etc.

Probably implementing something like segregated witness could strip a lot of data that could be later pruned off, making the overhead a lot smaller.

One would also need to address the issue of bootstrapping new users onto the system - if only people that someone trusts would have their content viewed, it might mean a lot less content is posted in general. It could be solved for example by proof-of-burn - anyone joining the website could burn some small amount of money (or donate it to the network creators) to gain a bit of reputation from the generic account everyone would trust by default. This would allow users to start growing trust in themselves.

All in all, the concept might look a bit like Synereo, although a bit less focused on absolute reputation scores and tokenization:


Conclusions


The current social media can be heavily controlled and censored by a few individuals. Discourse on Reddit is further hampered by vote manipulation and spam. It might be possible to change how we discover content through the use of public Web of Trust and a decentralized network to submit the content through.

Monday, March 7, 2016

Big blocks, small blocks, side-blocks, off-blocks...

In the recent week Bitcoin has experienced another "stress test" in form of a lot of transaction spam (see below for a chart of the amount of transactions in mempool), although this time the spam was not scheduled and it's not clear who was responsible for it. Along with the continuous debate on whether or not to increase the Bitcoin block size, a lot of people have started looking at what are the potential outcomes of the situation. I have covered a similar topic over a year ago, but it might be a good opportunity to revisit the topic and bring everyone up to speed.

A mockup of "Bitcoin surge pricing", inspired by Uber.

The problem


As some of you know, the Bitcoin blockchain was initially designed to have a limit of 1MB per block. This was done due to prevent the bloat and abuse of the network. However, if this limit is strictly enforced, the Bitcoin network would only be able to support a small number of transactions, about 7 transactions per second (compared to Visa's 2000 tps). Clearly, this won't be enough for a payment network that is supposed to replace the banks and credit cards. Either we will increase this size in some way, or we will see Bitcoin become a much different network.

The outcomes


Depending on whether the block size is increased or not and by how much would dictate how the Bitcoin network is shaped. Lets look over some possibilities.

Block size remains rigid


In this approach, the 1MB block size is rigid and remains unchanged. When we start hitting this limit, the miners will be able to pick and choose which transactions to include in the block. Rational miners will pick the transactions that pay them the most in fees (proportionally to their size), thus there will be a bidding war to get into the next block.

Due to the increased cost, fewer people will opt to send transactions themselves, either leaving Bitcoin entirely, or by performing some off-chain settlement. Wallet services such as Coinbase could become more like banks - offering their customers settlement with other people on their platform and other platforms that accept off-chain settlement.

In this scenario, Bitcoin becomes a settlement method for large bank-like wallets and large corporations.


Block size limit is abolished


A polar opposite of the previous approach. The block size limit is completely abolished and miners can create arbitrarily big blocks. While anyone can create a transaction for cheap, the network would soon be attacked by malicious entities trying to push the limit. Someone could decide to generate a 1GB block for example and cause the network to grind to a halt while synchronizing.

Quite quickly running a full node becomes a luxury or a business. We see more reliance on Stratum-like supernodes. The functionality of the network is dictated by them.

In this scenario, the Bitcoin network turns into something like the modern Internet - only big players can access it directly and everyone else has to rely on something like Bitcoin-Internet Service Providers.

Middle of the road


The most likely scenario would be somewhere in the middle of the road - raising the block limit, but doing so gradually. Dedicated users could run their own nodes, but most of us would rely on third parties for helping our wallets function.

Alternative solutions


Bitcoin is both an independent currency and a settlement network for that currency. Whether the block size increases or not, there are a lot of ways one could try enhancing the settlement aspect of Bitcoin.

Soft forks


There are some proposals on how to improve the scalability without hard forking the network. Some of them include softforks such as Segregated Witness , or Sidechains (allowing value to be moved in and out of the Bitcoin network without a trusted third party).

Segregated Witness, or "SegWit" is a solution focused on slimming down the transactions by moving the signatures off-blockchain. This can slim them down to about a quarter of the size, essentially allowing the Bitcoin network to process 4MB of transactions in 1MB blocks. The idea appears to have a lot of support, but since it's mostly streamlining what Bitcoin can currently do rather than creating a whole new solution, there isn't much left to explain without going into technical details.All in all, SegWit can buy Bitcoin some breathing room with its current block limit.

Sidechains is an idea focused on on being able to move the value in and out of the Bitcoin network without depositing the coins with a third party. While this doesn't sound like much, sidechains can lead to a lot more than just scaling Bitcoin - they have a potential of recreating networks with the features of Ethereum or Ripple without having to bootstrap those networks with new coins. These sidechains could be used to settle BTC transactions outside of the network while still not having to worry about the counterparty risk.

Payment channels


Payment channels in general or Lightning Network specifically are an interesting approach to allowing a large amount of transactions to take place outside of the Bitcoin network while everything would still be settled on-chain. The idea was discussed as early as 2011, and today we have some companies that even start advertising it on their websites:


21.co advertising their payment channels right above telling everyone how many blocks it might take to confirm various transactions during the recent spam attack

A payment channel is a way for two nodes to pass payments back and forth between one another using unbroadcasted Bitcoin transactions. Each payment adjust the balances between the nodes - shifting the balance back and forth accordingly. Only the final transaction gets published to the whole world, thus potentially saving a lot of space in a block. While the use case for this solution might be limited (who sends another person multiple transactions over a short period of time?), it gets more interesting when you add the network effect to it.

A simulation of 6 networked payment channel nodes

Now, when you introduce a few "supernodes", possibly in form of Bitcoin exchanges and big companies, you start mimicking the Gateway model of Ripple:

An illustration of the Gateway model of Ripple

Instead of settling directly on the network, anyone can potentially save a bit of fees by connecting to one of the supernodes and establishing a payment channel with them. This would allow you to transact with anyone in the network fast and cheap, while still being able to settle your balance on the Bitcoin blockchain as needed. If the payment channels are open for a long period of time, a lot of people could begin to operate solely within the network. This might be especially important for cross-exchange settlement, or for shared ewallets like Coinbase or 21.co.

Alternative networks


Last but by no means least, we have the alternative networks. A lot of them stand to benefit when the Bitcoin network falters.

Simplest ones would be the altcoins - Litecoin and the like. They reason that if Bitcoin blocks are full, people will join other networks and use other coins instead. I'd take that with a grain of salt, after all, Bitcoin is a better currency in terms of price and market cap than its alternatives, but the other networks might have a higher throughput.


A much more compelling alternative would the the Crypto 2.0 networks and permissioned blockchains - Ripple, Open Transactions, Liquid. Those networks can use the above mentioned Gateway model and move the settlement completely off the Bitcoin network. The only transactions that would need to be included in the blockchain would be deposits and withdrawals. While certainly more rigid and centralized than the payment channels, there are ways of preventing the gateways from stealing one's coins (such as Voting Pools). Moreover, such networks could also be used to issue fiat-denominated IOUs, which might be very attractive for some applications.

Conclusions


The Bitcoin block size debate is still going on, while the blockchain limit is being hit more and more often. Either the Bitcoin network will scale to larger blocks, or higher fees. There are many solutions out there focused on providing alternative means of settling with BTC without having to further burden the Bitcoin network. Only time will tell how our current problems will be addressed and which solutions will be used.

Monday, July 13, 2015

Who stands to benefit from a spam attack on the Bitcoin network?

Who stands to benefit from a spam attack on the Bitcoin network?

As discussed earlier, the Bitcoin network has recently been flooded with a lot of spam transactions. While at least some of this was an honest stress test, it brought more attention to the fact that the Bitcoin network can be pushed to its limits with relatively low cost by anyone. While the network should be resilient against zero fee transaction spam attack, putting some money and effort into the attack can make it seem like a lot of honest transactions with relative ease.

Now, since we know how the Bitcoin network could be destabilized, let us ponder who might benefit from such actions.

DISCLAIMER: while I will be mentioning a lot of specific examples of peoples and projects that might benefit from such an attack, please treat them only as illustrative examples. I have no evidence of their involvement in the attacks, nor do I believe any of them would employ such a strategy.

The usuals


Since we're talking about an attack on Bitcoin, lets get the usuals out of the way - governments, big banks, PayPal, etc. wanting to bring Bitcoin down since it challenges "the old ways". There isn't much new to add to these speculations or motivations, so might as well skip this part of the debate for expediency's sake.

The direct competitors


Bitcoin has been copied so many times people lose count. There is never a shortage of copycoins out there. Since Bitcoin has a throughput issue of handling a lot of transactions, you can easily see someone creating an altcoin with higher block sizes and faster blocks to sell itself as the solution to Bitcoin. More ambitiously, you can look at coins that have added some improvements to the protocol to combat spam, like Litecoin for example. Sustain a spam attack on the Bitcoin network long enough to sell your story of being the savior of cryptocurrencies and you might just be able to push up the price of your coin high enough to turn a profit.

The speculators


Just like you can speculate on the price of altcoin alternatives going up, you can also try speculating on the price of Bitcoin being affected by the spam. Alternatively, you could try to cause something similar to "trade engine lag" on the Bitcoin network and try to game some exchanges while other traders would have trouble moving their coins onto the exchange to cash in.

The solution evangelists


Even if we don't look at the altcoin space, we can see a lot of people with an agenda of where the Bitcoin code should move towards. Whether they are doing it for profit or for personal satisfaction, there is a potential for those evangelist of their own solutions to attack the network and push their code onto others.

Below are some examples (again, only illustrative examples, read the disclaimer) of potential solution evangelists.

Sidechains is an interesting concept of how to move a lot of transactions off the Bitcoin blockchain while still having a currency tightly tied into the Bitcoin itself. As (to the best of my knowledge) sidechains are still impossible to fully implement into the Bitcoin network without a soft fork, using the spam attack as an opportunity to push for a fork would be beneficial to them and enable sidechains to come to the Bitcoin network.

The debate over Bitcoin block size increase has been a hot topic for a few months now. The topic has been pushed most notably by Gavin Andresen, with some people even speculating on "gavincoin" becoming a reality (read more here). More so than Sidechains, the concept is not possible without a hard fork to the Bitcoin protocol, thus pushing the block size increase amid the spam attack would make the core developers more urged to consider going through with the fork to solve the issue.

Finally, something that doesn't require a hard fork - transaction filtering. This approach relies on being able to identify which Bitcoin transactions are spam and which are legitimate use cases and prevent the spam from propagating through the network. If enough nodes in the network would stop spam transactions, the network as a whole could develop herd immunity against spam. However, the same mechanism could be used to deny some Bitcoin businesses' transactions from reaching the miners. Such transaction censorship has been tried to pass unnoticed in the past by Luke-Jr, and could possibly be tried again along with more honest spam filtering.

The off-chain alternatives


Since moving transaction on the chain can be a problem, some people might propose solutions based on transactions being processed off-chain instead. Examples of such alternatives would include the Lightning Network, Ripple, Open Transactions or shared wallet providers such as Coinbase. If the off-chain solution can deliver bitcoins to people faster than the real network and some people don't know or don't care how they receive the coins, they might appear as a legitimate replacement for sending real Bitcoin transactions to some people. This might be also the case when Bitcoin transactions are too pricey to be included in the blockchain.

Crypto 2.0s eliminating competition


There are a lot of Crypto 2.0s out there. A good deal of them rely on the Bitcoin network to function - Colored Coins, Omni or Counterparty for example. There are also some emergent platforms that offer services tied to the Bitcoin blockchain, such as Factom. If the transactions for those networks can't make it into the Bitcoin blockchain, the network itself performs worse and suffers as a result. Their alternatives on the other hand stand to benefit from people potentially switching over. Ripple could benefit if Omni is not performing well, Ethereum stands to benefit from Counterparty being slow, etc. While being on the Bitcoin blockchain has been a selling point for a lot of companies, it can turn into a detriment if the Bitcoin network is overloaded.

Extra: bribing the miners for their compliance


As a side-note, it might be interesting to consider how some parties might want to even further push their agenda onto the network by essentially bribing the miners for their compliance.

Say, if someone wanted to eliminate some "spammy" transactions from the Bitcoin network, whether it's SatoshiDice's dust transactions or perhaps Omni transactions. They could easily set up an anonymous website claiming they will pay every miner X amount of bits for every block they create that complies with their spam filter. As long as they offer more than the miners stand to earn from the transaction fees, there is a benefit to them complying. With the excuse of excess spam, the miners can't be entirely held accountable for some transactions not making it into the block. Since the miners can be paid directly to their coinbase address, everything is transparent and nobody needs to agree to collude.

Conclusions


A stress test of the Bitcoin network can be all about preparing for the higher transaction volumes that are to come in the future, but it can also be a way for some people and organizations to further their agenda. While it might be still really early for such high-level politics to surface around Bitcoin, who knows what the future might hold?

Thursday, July 9, 2015

Fighting Bitcoin spam with Bitcoin Days Destroyed

Fighting Bitcoin spam with Bitcoin Days Destroyed

As many of you might've noticed, the Bitcoin network has recently been flooded with a lot of spam transactions. While the problem is nothing new, essentially a plain old DOS attack, the Bitcoin network doesn't appear to have much in a ways of contingency attack if the attack is sustained. I would like to propose a possible solution to at least mitigate the attack somewhat using Bitcoin Days Destroyed.

For those of you who might not be familiar with the concept, Bitcoin Days Destroyed is an interesting metric for transactions. For every input, you multiply the coin age (when the transaction was included in a block) by the amount of coins being spent. You add up all of the results for the whole transaction Nd you get your BDDs. So, spending 1BTC a day after it was received gives you 1BDD. A week after it was received - 7BDD. 0.1BTC after a year has 36.5BDD and so on.

Now, if the order transactions are priorities for inclusion in a block was dependent on their BDDs as well as fees and size, it could limit the effectiveness of the spam attack - since the spammer relies on sending a lot of transactions often, unless they have a lot of coins, their transactions will have a very low BDD score. Standard users should have higher scores by default, provided they don't cycle their coins all the time.

Of course, this method only works if the mining pools would follow the rules. Seeing how many pools still mine blocks that aren't full gives one little hope the situation will be resolved quickly.

Side note - this solution isn't all that new either. I did write it down broad strokes in my master thesis (pages 42-43) back in 2011-2012 ;).