Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a wallet to a hat #10

Open
spengrah opened this issue May 11, 2022 · 3 comments
Open

Add a wallet to a hat #10

spengrah opened this issue May 11, 2022 · 3 comments
Labels
community feature idea New feature idea or request

Comments

@spengrah
Copy link
Member

Potentially deploy a proxy contract attached to each hat. This would...

  1. give each hat a wallet to receive and send funds
  2. potentially allow a hat interact with other smart contract protocols directly rather than requiring that those protocols support erc1155
@spengrah
Copy link
Member Author

This may be unsafe. Consider the following example:

  • Account A is an oracle contract
  • Account B is also an oracle contract
  • Hat 1 has a proxy wallet, called Wallet 1
  • Wallet 1 is the oracle for Account B
  • Account B is itself the oracle for Hat 2
  • Charlize wears Hat 2, and has staked N tokens for the right

If Account A wears Hat 1, then it can -- acting as the oracle for Hat 2 -- sever the tie between Hat 2 and its oracle (Account B). This creates a risk for Charlize's staked tokens: has Charlize lost them when her Hat's no longer has an oracle? It depends on the code governing her staking, so she may be ok, but perhaps not.

To fully protect herself, Charlize would need to understand who controls all the logic that impact her staked tokens. If we don't give hats wallets, Charlize just needs to understand her hat's oracle contract. But if we give hats wallets, the number of contracts Charlize needs to understand (or trust) increases from 1 to multiple. It's 2 in the above example, but there could feasibly be a long string of wallets controlled by hats wearing other hats.

This risk exists primarily for oracles, but it also creates some issues with conditions.

@spengrah
Copy link
Member Author

spengrah commented Jun 1, 2022

also related to #7

@spengrah spengrah added the community feature idea New feature idea or request label Jun 1, 2022
@spengrah
Copy link
Member Author

spengrah commented Jun 7, 2022

As discussed recently, attaching a wallet (i.e. a proxy contract) to an NFT may best be implemented as a protocol of its own, such as...

https://twitter.com/spengrah/status/1533847100068339712

alexkeating pushed a commit to alexkeating/hats-protocol that referenced this issue Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community feature idea New feature idea or request
Projects
None yet
Development

No branches or pull requests

1 participant