zkLogin

What is zkLogin?

zkLogin is a major step forward in the Web3 user experience. It simplifies user interactions with dApps by allowing users to sign in via social login (eg. Google). This means that users can now interact with Bluefin v2 without needing to worry about managing another set of private keys/mnemonics.

Why zkLogin?

Streamlined onboarding: zkLogin enables you to transact on Sui using the familiar social login flow, eliminating the friction of handling cryptographic keys or remembering long mnemonics.

Self-custody: A zkLogin transaction requires user approval via a social login account, but maintains the integrity of self-custody Web3 users are familiar with.

Security: zkLogin is a two-factor authentication scheme - sending a transaction requires verification credentials from a social login provider and some randomness (salt) not accessible to the social login provider. An attacker who compromises a social login account cannot transact from the user's corresponding Sui address unless they separately compromise the salt value.

Privacy: Zero-knowledge proofs prevent third parties from linking a Sui address with its corresponding social login credentials.

How To Connect Your Google Account via The Sui Wallet extension?

The user can connect to their Google account via the Sui Wallet extension, redirecting them to the Google authentication page. After successful authentication, the user's address is returned. Then they can continue using Bluefin v2 as before.

  1. Create a zkLogin account using your Google account:

  2. Use the zkLogin account for onboarding to the exchange - below is how you can connect to your wallet:

  3. Sign the onboarding Url:

  4. Once onboarded, you can seamlessly use your zkLogin account to trade on Bluefin v2.

How Does zkLogin Work?

zkLogin generates user accounts from OAuth credentials. The user is prompted to log in with their web credentials. This information is used to generate a JSON web token (JWT) that is then combined with random data (i.e. salt) and passed to a service that generates a zero-knowledge proof (ZKP). The ZKP verifies the user is the rightful account owner without sharing the credentials themselves on-chain. After an account is generated, future transactions can be signed with the user’s OAuth credential.

COMING SOON: Embedded Social Login

The ultimate goal is to eliminate the requirement for the wallet extension all together. Users will have the option to onboard with their Google account directly within our exchange, after which they will be assigned a public address that can be used to interact with the exchange without the need for a wallet extension. Below is a sneak peek of the onboarding section with embedded zkLogin.