Request to build - Web3 native identity specification

I wrote earlier that NFTs are an essential piece in the identity layer on web3.

Identities are contracts deployed on chain, thus has an address just like a user.

Contract

A user can deploy a contract for an identity. Each identity has multiple owners. Each owner has an equity in the identity.

  constructor(address[] owners, uint[] equities) public

NFTs

Owners can transfer NFTs to the contract

function transferNFT(address NFTCollection, uint tokenId) public {
  // requires approval before this call
}

Anyone can check if the identity has an NFT from a certain collection

function hasNft(address NFTCollection) external returns(uint tokenId, uint since) {
  // since = number of blocks since the NFT has been transferred to this identity
}

Once the NFT has been transferred to the identity it cannot be returned to the original owner. The only way to return it is to disintegrate the identity.

Transferring money

Anyone can transfer ERC20 tokens or native token to the contract. Any owner can add the addresses of tokens that they're willing to accept

function acceptErc20(address) public

All the money is stored in the contract. Any owner can initiate a withdraw. The money is sent to all the owners in proportion to their equities.

function withdraw() public {
  // loop on all acceptedErcs, loop on all owners
}

Exiting

To get all the money and NFTs back, any owner can call disintegrate

function disintegrateInit() {
  require(msg.sender == one of the owners)
  withdraw();
}

function disintegrateFinalize() {
  // return all NFTs to original owner
}

Requirements to build

The contract must be deployed to Optimism Mainnet and should have a simple UI. The UI must have the following

  1. a way to create the identities
  2. add supported erc20 tokens
  3. transfer NFT or ERC20 to identity
  4. withdraw
  5. disintegrate
  6. view all NFTs in the identity

Maximum bounty 5000USDC!

Subscribe to Madhavan Malolan
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.