Skip to content

Instantly share code, notes, and snippets.

View ukstv's full-sized avatar

Sergey Ukustov ukstv

View GitHub Profile

Resilience — RES with built-in dividend pathways and swarm redistribution, for decentralized basic income

The idea to use the global financial network of daily transactions, and to link these transactions together into a web, is a bit similar to Tim Berners-Lee's idea to link all documents on the internet together with the Hypertext Transfer Protocol (HTTP), which gave us the world wide web.

When Tim Berners-Lee had the idea for the world wide web in the 80s, there were already documents on the internet. He did not have to invent the internet, and his contribution was instead that he saw a way to harness the information on the internet in a new way.

The same goes for the Resilience protocol. The world is electrified with millions, or billions, of financial transactions happening every single day. The global financial network is part of our infrastructure already. What Resilience aims to do is to re-purpose these transaction networks, into a we

@ukstv
ukstv / 3id.json
Last active August 18, 2020 14:17
{
"doctype": "3id",
"header": {
"owners": ["z2YyemKYJjf7S345GF2vXbAvbm6hYS5Zg6aaCGpeFuYLLhNczDCJRYh7sKSPZjpWavnCXzg7WYth9bh6fJ5YtWMGu8PA"],
},
"content": {
"publicKeys": {
"signing": "z2YycSARTubBAs31KJEaA7k6adZNMfJ67ztG7MUV2KDPLKs6jNNFcmcikAwuZ2eGDR6AEnQWbxtvFwU2YzuzRHKTkwgN",
"encryption": "z6LSePBPmha7e3jkNtt41BvH4p3p6hXFa2aAWgdKFSJyg8mC"
}

Keybase proof

I hereby claim:

  • I am ukstv on github.
  • I am ukstv (https://keybase.io/ukstv) on keybase.
  • I have a public key ASA-pf5CKSCMkv4nAI7j_30xPDodXXb9dI3u3YsfWTAUfgo

To claim this, I am signing this object:

import * as _ from "lodash";
const daohaus = {
data: {
members: [
{
id: "0x0e5a503842c947762e66c42f8a773757edeb2315-0x439116ccdcb4c7ddc68dbc1cc16332e955f1824f"
},
{
id: "0x148daa26808201add646d16c5c0a4d0e60d8847c-0xf3d9281fa183b74f32b96e1c5244596045f4ede8"
import Web3 from 'web3'
import util from 'ethereumjs-util'
export function toSolSig(sig: string): string {
const {r, s, v} = util.fromRpcSig(sig)
// NOTE: with potential introduction of chainId this might need to be updated
if (v !== 27 && v !== 28) {
throw new Error('Invalid recovery id');
}
### Keybase proof
I hereby claim:
* I am ukstv on github.
* I am ukustov (https://keybase.io/ukustov) on keybase.
* I have a public key ASBvXosZDytPI0Je1D_VbipZ3y98Bl6vpx-6P5a2VUAgPwo
To claim this, I am signing this object:
pragma solidity ^0.4.19;
import "./Lineup.sol";
import "./PublicRegistry.sol";
contract Conditional {
function doCall(
address _registry,
pragma solidity ^0.4.19;
import "./LibLineup.sol";
import "./Multisig.sol";
// Optimisation Idea: Use shared Lineup.
contract Lineup {
LibLineup.State public state;
// 3: Prepare counterfactual deployment of Bidirectional, and update Lineup
let bidirectionalB = bytecodeManager.constructBytecode(Bidirectional, multisig.address, bidirectionalSettlementPeriod)
let bidirectionalA = await registry.counterfactualAddress(bidirectionalB, REGISTRY_NONCE)
let bidirectionalDeployment = registry.deploy.request(bidirectionalB, REGISTRY_NONCE).params[0].data
let bidirectionalCodehash = await conditional.callHash(registry.address, new BigNumber.BigNumber(0), bidirectionalDeployment)
// 4. Prepare counterfactual transfer, and update Lineup
let transferB = proxy.doCall.request(registry.address, bidirectionalA, depositA, '0x').params[0].data
let transferCodehash = await conditional.callHash(proxy.address, depositA, transferB)
pragma solidity ^0.4.19;
import "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol";
contract DistributeToken {
function execute(address _token, address a, address b, uint256 amountA, uint256 amountB) public {
StandardToken token = StandardToken(_token);
require(token.transfer(a, amountA));
require(token.transfer(b, amountB));