Author Topic: new attack vector against truthcoin  (Read 3107 times)

zack

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 384
    • View Profile
new attack vector against truthcoin
« on: October 23, 2014, 12:36:26 am »
Lets say the market is between outcomes A or B, and 1000 shares of each type have been sold.
You want to purchase 500 shares of A, so you write a transaction to do that.

The miner gets your transaction purchasing shares of A, and he writes 2 of his own.
The first tx purchases 10,000 of A, and the second sells 10,000 of A.

He sandwiches your tx between his 2 txs.

The attacker needs to own many times more money than the amount he can steal.
« Last Edit: October 23, 2014, 12:39:56 am by zack »

psztorc

  • Administrator
  • Sr. Member
  • *****
  • Posts: 464
    • View Profile
Re: new attack vector against truthcoin
« Reply #1 on: October 23, 2014, 12:43:20 am »
Trades can have validation rules, as I described in the whitepaper.

The default setup I outlined would make it so that, after the miner puts his first tx ("purchase 10,000 A") in front of yours, your trade ("purchase 500 A") would be invalid. Meanwhile, other nodes would likely have picked up your transaction and the miner's first transaction. Because these two tx's would likely have similar transaction fees, who knows which would "win" (be in the next block). The miner's would almost certainly cost more overall and therefore have a larger trading fee, and might win out (even though it likely propagated slightly later), but the miner is only wasting his money (to tx and trading fees) with such large and pointless transactions.
Nullius In Verba

koeppelmann

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: new attack vector against truthcoin
« Reply #2 on: November 06, 2014, 05:45:09 pm »
the attacking miner does not have to publish his transactions - he only does it if he finds the next block and includes the tx. directly in the block.

psztorc

  • Administrator
  • Sr. Member
  • *****
  • Posts: 464
    • View Profile
Re: new attack vector against truthcoin
« Reply #3 on: November 06, 2014, 06:03:16 pm »
the attacking miner does not have to publish his transactions - he only does it if he finds the next block and includes the tx. directly in the block.
What difference does that make? Each market has only one sequence of valid trades.
Nullius In Verba

zack

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 384
    • View Profile
Re: new attack vector against truthcoin
« Reply #4 on: November 07, 2014, 04:22:24 am »
Each market has only one sequence of valid trades.

So if a miner has a bunch of tx in the mempool which are to be include into the next block, there is only one correct order for him to write them into the block?
or am I misunderstanding?

psztorc

  • Administrator
  • Sr. Member
  • *****
  • Posts: 464
    • View Profile
Re: new attack vector against truthcoin
« Reply #5 on: November 07, 2014, 02:42:42 pm »
It depends a little on the orders. I personally would place an order saying "fill it exactly like this or don't fill it at all". If everyone did that, then there would be only one correct-ordering. It would be logically equivalent to each trade referencing the previous trade.

Then, the 10-minute block-time-stamp falls on all of them (or none, or half).

Or, one could say 'fill within these time/queue/price ranges', and the miner would have more freedom. (I wouldn't expect this freedom to be necessarily used in my favor, it is a classic "probability of bid going through" vs "attractiveness of bid" tradeoff).
Nullius In Verba