crypto-tumbler-simulator
所属分类:自然语言处理
开发工具:Scala
文件大小:2304KB
下载次数:0
上传日期:2019-05-09 20:09:37
上 传 者:
sh-1993
说明: 双子座编程挑战的加密货币不倒翁模拟器
(A cryptocurrency tumbler simulator for a programming challange from Gemini)
文件列表:
pics (0, 2019-05-10)
pics\.DS_Store (6148, 2019-05-10)
pics\pics (0, 2019-05-10)
pics\pics\.DS_Store (6148, 2019-05-10)
pics\pics\1-tumble-3safe.png (526847, 2019-05-10)
pics\pics\2-transfer-to-deposit.png (49465, 2019-05-10)
pics\pics\3-transfer-deposit-to-house.png (72880, 2019-05-10)
pics\pics\4-generate-random.png (633863, 2019-05-10)
pics\pics\5-first-safe-address-tumbled.png (432098, 2019-05-10)
pics\pics\6-generate-random-again.png (137713, 2019-05-10)
pics\pics\7-second-safe-address-tumbled.png (336585, 2019-05-10)
pics\pics\8-generate-random.png (42181, 2019-05-10)
pics\pics\9-last-safe-address-tumbled.png (244425, 2019-05-10)
scala (0, 2019-05-10)
scala\.DS_Store (6148, 2019-05-10)
scala\.scalafmt.conf (215, 2019-05-10)
scala\build.sbt (1138, 2019-05-10)
scala\project (0, 2019-05-10)
scala\project\build.properties (20, 2019-05-10)
scala\src (0, 2019-05-10)
scala\src\main (0, 2019-05-10)
scala\src\main\resources (0, 2019-05-10)
scala\src\main\resources\application.conf (178, 2019-05-10)
scala\src\main\scala (0, 2019-05-10)
scala\src\main\scala\Convenience.scala (2090, 2019-05-10)
scala\src\main\scala\JobcoinMixer.scala (3625, 2019-05-10)
scala\src\main\scala\JobcoinWebService.scala (4483, 2019-05-10)
scala\src\main\scala\MixingActor.scala (5169, 2019-05-10)
scala\src\main\scala\StatisticsService.scala (349, 2019-05-10)
scala\src\main\scala\TransactionActor.scala (4750, 2019-05-10)
scala\src\test (0, 2019-05-10)
scala\src\test\scala (0, 2019-05-10)
scala\src\test\scala\ActorTest.scala (4091, 2019-05-10)
# Jobcoin Tumbler
A simple tumbler that runs on Jobcoin.
Charges a randomized fee of up to 3%.
## Developer Notes
I've attempted to explain any non-common patterns, or usages of libraries outside of the provided libraries.
Such as my comment on extension methods or on Cats.
I also had to cut myself off at some point.
There are explanations of things I would do documented in the readme here
and in the codebase.
### Run
`sbt run`
Displays a console with more information.
### Test
`sbt test`
### Console
`sbt console`
## Important info on usage
I built this assuming this tumbler would be continuously receiving
requests.
Requests to tumble funds are batched in groups of 5 (see the Mixing Actor documentation for more info).
Your initial request to tumble funds won't be processed until there are 4 more on added on the queue.
Also if there are multiple safe addresses those will be paid out in different batches each.
To make it a bit easier to deal with I've created the script to generate random requests.
## Example
```
tumble silk-1,salk-2,balk-3
//deposit to return address
// The following is to handle batches
generate-random 5 1 //pays out to silk-1 after some time
//wait 10 seconds
generate-random 5 1 //pays out to salk-2 after some time
//wait 10 seconds
generate-random 5 1 //pays out to balk-3 after some time
```
[Screenshots](https://github.com/psilospore/crypto-tumbler-simulator/blob/master/./pics)
## Mixing
There's several different angles for vulnerabilities on mixing.
I will attempt to document some attacks, safety mechanisms I've added, and unaddressed
vulnerabilities.
Feel free to skip this section since it is a bit long.
However it does explain the following section and why I made some
of those decisions.
### Examining the ledger
One vulnerability is to just check all transactions made for near that amount.
If the fee is static I can calculate the exact amount to search for.
The description says at least 1 address so I can't just require multiple addresses.
For that reason I give a warning if there's less than 4 addresses.
I also randomize the fee. Although if there's 1 address it's still easy to track.
If I also just process one transaction at a time. You could group transactions in a time
period to associate it to the originator.
If jobcoin is unpopular and there's very few transactions it becomes really easy to figure
out where money is being sent. In the worst case only 1 real person uses jobcoin all of that person's
transactions are visible.
You can also examine transactions by time. If my tumbler takes in funds
### Vulnerabilities in jobcoin itself
Seems like there's no security.
### Use the jobcoin mixer
If I'm a malicious user I could make many fake requests to the jobcoin
mixer, and filter those outs from the house address.
My jobcoin mixer would be vulnerable to this kind of attack.
There's more
## Implementation
Much of the logic is between the MixingActor and TransactionActor.
Besides that there is JobcoinMixer and JobcoinWebService.
JobcoinMixer initializes the MixingActor and acts on the console.
JobcoinWebService provides a service to interact with the Jobcoin API.
TransactionActors just move a request to tumble funds through it's stages and
is managed by the single MixingActor.
The MixingActor manages each Transaction and attempts some level of obscurity.
### TransactionActor
Move funds though it's various stages, and interacts with the Jobcoin API.
Waiting for deposit
Transferring to house
Waiting for mixing actor to transfer to each safe address
See transaction actor for more info.
### MixingActor
Manages transactions and has most of the mixing logic.
See mixing actor for more info
### Tests
近期下载者:
相关文件:
收藏者: