Bruno:
Posted from June 24:
- Brokers must register with a new bury/DRS contract (independent of PRL contract) and maintain a PRL balance there.
- There is only one bury/DRS contract, it is the core of all protocol activity.
- PRLs are buried into a locked state from the bury contract, the bury/claim functions of the PRL contract are abandoned (yet preserved incase we need to use them later).
- To bury PRL, you simply increment the bury counter for that broker under an unlock key. Therefore bulk buries can be performed easily within a single txn.
- PRL are not unlocked by addresses but by an unlock key which is sha3(secret). For the claim() to go through, web nodes hunt for secret and send to a broker, the contract verifies if sha3(secret) matches the unlock key for that bury ‘address’ (not an actual ETH address anymore).
- This contract will track the reputation scores of brokers. If a broker does not use this contract, then it’s not a broker. This accomplishes the reference of ‘persistent broker identities’ made in the whitepaper. Web nodes and clients pull the broker leaderboard from the contract variables to choose who to do ‘business’ with (via brokers themselves, remember brokers are gateways to the tangle and blockchain, etherscan etc. should never be referenced for full production).
- If a claim() happens too early in the epoch cycle - the brokers rep is punished. If the claim() invocation happens in the ‘goldilocks middle’ (just right) then the broker gets a rep boost. If the claim() invocation happens too late, the broker rep gets punished. A lot of important game theory mechanics will stem from this setup.
- Every time claim() is invoked by a web node, via a broker, the web node includes the IDs of two brokers: best perceived broker and worst perceived broker. The broker is compelled via game theory to include the rep reward + punishment in the claim invocation. The DRS processes a rep boost and punishment per claim() invocation. This is a major way how web nodes will keep a check against brokers, which is the intended purpose of the DRS. Scarcity of reward/alterations are tied to the scarcity of claim() invocations, which are directly correlated with web node activity.
- You keep a burn vote mechanism for emergency invocations as mentioned with burn peg, but you use a bury-based peg increase system (the original idea, described below).
Benefits of new system:
- All hurdles of moving gas to an address beforehand for burying and claiming are removed, just spend gas to invoke the contract function and it’s over.
- You could even have website owners withdraw their PRL revenue from the contract like a bank (and not a fractional reserve bank this time), making them pay for the gas.
- Because gas efficiency has improved dramatically, we can now reduce sector size and therefore have better granularity for upload sizes. This also means we won’t be stuck at one sector per file/upload for so long, therefore granting merit to the candlestick game theory check.
- Another issue with the old way is the peg alterations would leave significant dust PRL in addresses, since the buried amount would no longer be evenly divisible by claimAmount. This could mean that a 3 year upload would turn into a 2.9 year upload which gets rounded down to a 2 year upload - .9 year of PRL remains sitting in that address lost forever. The same issue applies with alterations to epoch. With the new system, you can alter epoch and claimAmount all you want and be able to recover ‘leftover PRL’ since all the PRL are really in one Ethereum address (the DRS contract) until they are claimed away to website owners.
- The new contract is the entire DRS, way simpler, easier-to-build, robust and monitor-able than the original PGP meshnet version I was thinking. There is some logic that happens on the web node javascript side to elect who gets the best broker boost and worst broker punishment, otherwise everything else is complete with the smart contract.
- The storage peg is now controlled by the new contract, so the uint8 screwup of the PRL contract is no longer an issue.
- We can now keep track of statistics for buried PRL and PRL paid out to website owners. Loads of useful implications stem from this, market behavior and adoption pitches can now rely on real statistics of payouts and real word usage.