Skip to content

Instantly share code, notes, and snippets.

@numtel
Created November 4, 2021 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numtel/c2030ec401959a45825ee3efc6f3bb74 to your computer and use it in GitHub Desktop.
Save numtel/c2030ec401959a45825ee3efc6f3bb74 to your computer and use it in GitHub Desktop.

The US wants to impose KYC/AML identity verification on DeFi protocols.

This is not a feasible requirement for developers of these protocols.

Instead, the US should offer a service for linking cryptocurrency addresses with individual identities.

This could be a website or offered at post offices (since they issue passports).

  1. The individual is identified by their government issued documents.
  2. The individual may add/remove/change associated addresses.

While this service could be made private an only accessible for government use, providing a verification on-chain is very important for application developers.

Providing this attribute to accounts using Solidity on EVM chains is very simple. A goverment account lists accounts as verified

contract VerifiedAccounts is Owned {
  mapping(address => bool) public verifiedAccount;
  function isVerified(address account) public view returns (bool) {
    return verifiedAccount[account];
  }
  function setVerified(address account, bool verified) onlyOwner return (bool success) {
    verifiedAccount[account] = verified;
    return true;
  }
}

This would allow DeFi applications to tell users in the US (geo-ip) if they needed to verify their accounts with the government service.

In order to use this verification for One person, One vote (1P1V) applications, it needs to be modified slightly. The verified accounts must be given a unique identifier (generated randomly and privately) for each individual.

contract VerifiedIndividuals is Owned {
  mapping(address => uint) public verifiedAccount;
  function accountUser(address account) public view returns (uint) {
    return verifiedAccount[account];
  }
  function setVerified(address account, uint user) onlyOwner return (bool success) {
    verifiedAccount[account] = user;
    return true;
  }
}

Instead of employing untested technologies (like worldcoin's eyeball scanning) as sybil-resistance in order to implement democratic DAOs and UBI tokens, the governments can offer these identity verification oracles as a trusted source.

Then independent identity aggregation contracts can offer consolidated interfaces for checking an account's status accross multiple government (and other) provided services.

Known issues:

  • Dual citizens could maintain multiple identities? This could be handled privately by the government.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment