Skip to content

AbdelStark/poh-starknet-bridge-l1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poh-starknet-bridge-l1

Proof Of Humanity StarkNet bridge L1 smart contracts.

⚠️ WARNING! ⚠️

This repo contains highly experimental code. Expect rapid iteration. Use at your own risk.

Description

Proof Of Humanity is an Ethereum protocol aiming to create a sybil-resistant list of humans. This enable a lot of use cases around decentralized IDs, antispam tools, DAOs, ...

This StarkNet bridge enable users registerd on Proof Of Humanity to register their identity on StarkNet L2.

Dapps on StarkNet could then use those informations to unlock some of the features enabled by the protocol.

To register to StarkNet L2, a human on registered on Proof Of Humanity must invoke a function on the bridge smart contract. The smart contract then checks if the address is registered using Proof Of Humanity proxy contract.

An L2 message is then sent to the counterpart StarkNet contract and the user will be registered on L2.

⚠️ Important note ⚠️

There is no way to automatically revoke the registration when it is expired on L1. The timestamp of the registration call on the bridge is sent to the L2 and stored in the counterpart contract. A dapp could use this information to check the last time the L1 contract has verified that the human was registered. There is a notion of expiration of the registration. The problem is that there is no way to get this information using the PoH proxy contract. A solution would be to call directly the last version of Proof Of Humanity contract but the problem is that there is no guarantee that the interface wont change for future versions. Another option would be to add a function in the brige contract to change the targeted address, however it would introduce a "backdoor" for the owner to arbitrarily switch to a fake malicious contract.

🏄‍♂️ Usage

Flow

Flow

Set up the project

📦 Install the requirements

⛏️ Compile

forge build

🌡️ Test

forge test

📄 License

poh-starknet-bridge-l1 is released under the MIT.

Releases

No releases published

Packages

No packages published