project screenshot 1
project screenshot 2
project screenshot 3

Permit3

PERMIT3 is a general-purpose smart contract permission management system built on Starknet.

Permit3

Created At

StarkHack

Project Description

Overall PERMIT3 is a project we're building on Starknet to make it safer and easier for you to interact with decentralized applications from hot or mobile wallets. By allowing you to delegate specific rights to external wallets, PERMIT3 ensures secure interactions without compromising the security of your primary wallet. Our system supports a wide range of uses, including airdrop claims, token-gated access, and gaming logins.

Imagine a user with a wallet holding a significant collection of valuable NFTs, making them eligible for a highly anticipated project airdrop. Typically, participating in the airdrop would require the user to interact directly with the airdrop contract, potentially exposing their assets to risk. However, with Permit3, the user can delegate this interaction to an external wallet, acting as a ghost or shadow wallet. This delegated wallet can safely interact with the airdrop contract on behalf of the original wallet. Since the airdrop contract only engages with the delegated wallet, it cannot access the primary wallet that holds the NFTs and funds, ensuring the user's valuable assets remain secure while still participating in the airdrop.

Key Features are:

  1. Secure Delegation: You can delegate rights to external wallets to interact with smart contracts while keeping your primary wallet secure.
  2. Customizable Permissions: You can grant access to entire contracts or specify exact functions that the delegated wallet can interact with.
  3. Wide Use Cases: We can be used for DeFi smart contracts, NFT transfers, and interactions with project-specific smart contracts.
  4. Enhanced Privacy: By specifying exact functions and number of granted function calls for delegation, users can protect their privacy and limit exposure to only necessary interactions.

User Journey To get started, the user logs in to our system using their primary wallet and navigates to the delegation section. There, they select the type of contract they want to grant access to, whether it's a fungible token, an NFT, or a project-specific smart contract. The user can choose to delegate access to the entire contract or specify particular functions for enhanced control. After entering the address of the external wallet and confirming the delegation with a signed transaction, the external wallet can interact with the specified smart contract(s) based on the permissions granted. The user always has the option to revoke or modify these permissions anytime through our intuitive dashboard, ensuring they maintain full control and flexibility.

How it's Made

For the smart contract, we incorporated several components from OpenZeppelin’s Cairo library and used snforge as the development environment. For the frontend, it’s a pretty standard React project hosted on Vercel, with the exception of using a subgraph to pull event data from the smart contract using GraphQL. For the subgraph, it’s a lot more involved. As there is no official support for subgraphs on Starknet, we’ve had to use a ported version by zkLend which was quite difficult (hardcode a fake ABI and manually calculate variable slots when reading from the raw event data), run our own indexing node on an EC2, and take care of all the operation side of things.

background image mobile

Join the mailing list

Get the latest news and updates