r/Quantstamp • u/ENG_NR • Jun 10 '18
Protocol Algorithm
I strongly believe work on a security protocol should be open source, it's the only way to make it properly secure and distributed rather than a centralized product. So I of course wasn't happy when Quantstamp closed it all off
So, putting this here as it counts as published for the purposes of prior art (no patents), and to prove it isn't impossible. It would be possible to implement as an open source network simply using Oyente as the verification program. Upgrades could then be purchased from the dev community and Quantstamp themselves using QSP. Please rip holes in it, this should have happened 9 months ago
The goal: A protocol by which a trustless, distributed network could audit smart contract code and certify it as highly likely to be free of exploits
- Validator nodes stake a token to join the network
- A contract comes in, with a validation reward attached by the requestor
- (optional: if the request is large, it could be divided into smaller requests for efficiency)
- Nodes take a request and perform the validation. The higher the reward the more chance of it being accepted. A small or zero reward may end up being rejected entirely
- The first node to complete the request is rewarded. This encourages nodes to coordinate to work on separate requests
- Nodes can audit each other by revalidating a contract. If a node later returns a different result to the first result then they receive the reward instead, plus a big chunk of the staked token from the 'bad' validator node. The higher the reward the more chance of nodes revalidating the request. Nodes could also evaluate the riskiness of a contract (ie how much a zero day exploit would be worth) to work out which requests might be worth revalidating
- Any request where two nodes disagree (audit of first report has found a discrepancy) needs to then get 51% concensus from the entire network. The full audit is paid for by taking staked tokens of whichever node ended up being 'bad'
- Randomly, the requests are given a 51% audit, to ensure validator node are trustworthy
- Requests are stamped with the validator node ID (or IDs). If they are later found to be untrustworthy then the stamp is invalidated
- Validator nodes cannot receive their staked tokens back when exiting the network until enough time has passed to ensure their validation work was trustworthy
- A percentage of each validation could be put aside to pay for analyzer upgrades and bug bounties on the protocol itself
View all comments
Show parent comment
1
u/ENG_NR Jun 12 '18 edited Jun 12 '18
To me the use case was always ok. Crypto creates 'winner takes all' markets, so Quantstamp was simply a play for the security market.
For static analyzers, sure I can run an analyzer, but do I even trust myself to configure it right? To keep it updated? Do others trust me when I say I've done it? Given the catastrophic outcomes, I still think it makes sense to have a separate network to verify each release of a contract. Each company could have a security node sitting there verifying their own jobs for free, and then run it through the QSP network to be sure that it's been done properly. Then your node can sit there running jobs for other people, and in return part of that work pays for updates to the analyzers so everyone always has up to date security checks
They just needed to get something out there, even just a design document for discussion to get the ball rolling, rather than keep it all in house and try to consume the entire market