Zepay account & login

From the user’s point of view, there is just “my Zepay account”. Behind the scenes, this is a SmartAccount contract controlled by an email‑based EOA created via Privy.

What is a Zepay account (SmartAccount)?

A Zepay account is a SmartAccount – a smart‑contract wallet on Sonic that:

  • Holds your liquid USDC balance.

  • Owns your PersonalVault (Earn).

  • Authorises gasless transactions submitted by Zepay’s relayer.

  • Is linked to your @handle (for example, @alice).

The SmartAccount is eventually controlled by one thing: your EOA (the email wallet created by Privy). The SmartAccount has an owner field and modifiers such as:

SmartAccount modifier
modifier onlySelfOrOwner() { require(msg.sender == address(this) || msg.sender == owner); _; }

That means:

  • When Zepay uses meta‑transactions, the SmartAccount sees the relayer as address(this) (self‑call) and checks your signature off‑chain.

  • When you recover via MetaMask/Rabby, you call directly as owner and can withdraw or send funds without Zepay.

Email‑only login

Zepay supports email login only. Logging in with external wallets (MetaMask, Rabby, etc.) has been deprecated to keep the UX simple, predictable and free of confusing pop‑ups.

When you log in with email for the first time:

1

Privy creates an embedded EOA wallet

This is a standard Ethereum‑style account. Zepay never sees the raw private key.

2

Your SmartAccount is deployed

The SmartAccountFactory creates a SmartAccount on Sonic with your Privy EOA as the owner.

3

Your PersonalVault is deployed

The PersonalVaultFactory creates a vault owned by your SmartAccount for Earn.

4

Your @handle is registered

The UsernameRegistry maps your chosen handle to your SmartAccount address.

On later logins with the same email:

  • Privy restores your EOA.

  • Zepay looks up your existing SmartAccount and PersonalVault.

  • Zepay fetches balances, earnings and recent activity.

  • No new contracts are deployed.

From your side, you just see: sign in with email → account ready.

Last updated