An agreement standard I made, as a concept. How it works is that agreements are negotiated off-state, and then signed, and uploaded to the state which verifies the agreement (and would give an initial PoA reward at that point. )
There are only positive incentives with the proof-of-agreement (PoA) system, and so on forming the agreement, both parties would get a little bit of PoA, and after completion, the rest of the PoA. The idea in how it would be used by society is that the positive incentives, forming a "reputation web", are enough to produce flow (trust). The PoA rewards, as they are accumulated together with PoN and PoC rewards, trigger payouts of PAT that is a currency for trade (tradeable. )
So by forming and completing contracts (and doing the PoN and PoC things) each person gets rewards that both prove that they have a habit of completing agreements, and also gives them a carrot (in the form of PAT) to do so.
contract PangeaAgreementStandard {
mapping(address => uint) citizenNonces;
mapping(bytes32 => address) agreementRegistry;
// Attach a public key to the internetOfAgreements
function newCitizen() {
if(citizenNonces[msg.sender] != 0) throw; // Already attached to the IoA
citizenNonces[msg.sender]++;
}
modifier isTransactionFee {
// Use this modifier to add a transaction fee in PAT for transacting with the IoA
_;
}
function newAgreement(
bytes32 _data,
bytes32 _agreementID,
address[] _citizens,
bytes32[] _agreementSignatures)
isTransactionFee
{
// Verify the agreement signatures, agreement ID as well as citizenship
for(uint i = 0; i < _agreementSignatures.length, i++) {
if(!ecverify(
_agreementID,
_agreementSignatures[i],
_citizens[i]))
throw;
}
uint nonce;
for(uint i = 0; i < _citizens.length, i++) {
uint citizenNonce = citizenNonces[_citizens[i]];
if(citizenNonce == 0) throw; // Agreements are only between citizen
nonce += citizenNonce;
}
bytes32 agreementID = sha3(_citizens[], nonce, _data);
if(agreementID != _agreementID) throw;
// and increment citizen nonces
for(uint i = 0; i < _citizens.length; i++) {
address citizen = _citizens[i];
citizenNonces[citizen] += 1;
}
// Write the agreement contract to the state
address agreementContract;
uint s = _data.length;
assembly {
calldatacopy(mload(0x40), 68, s)
agreementContract:= create(callvalue, mload(0x40), s)
}
agreementRegistry[_agreementID] = agreementContract;
}
Fabulous one!!!
the post is great ............/////////////
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
that a bit technical
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This is a bit technical but its awesome. Keep up your good work.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
difficult but i think i understand some of it :) 2nd year programmer ;)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
That is indeed quite complicated !!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit