# How It Works (/docs/rise-wallet/how-it-works)

import { Steps, Step } from 'fumadocs-ui/components/steps';

RISE Wallet is built on top of [Porto](https://porto.sh/), a next-generation account stack for Ethereum that leverages [EIP-7702](https://eip7702.io/) for native account abstraction. With our backend & SDK customised to utilise RISE high performance in addition to providing chain wide gas sponsorship for real users. This page explains how RISE Wallet works under the hood.

## Architecture Overview

RISE Wallet consists of three main components:

### 1. Smart Account Infrastructure

* **Porto Smart Accounts**: Audited contracts that provide account abstraction features
* **EIP-7702 Integration**: Native account abstraction without smart contract wallets
* **Key Management**: Support for multiple key types (P256, `secp256k1`, WebAuthn)

### 2. Relay Infrastructure

* **Gas Sponsorship**: Automatic gas payment for eligible transactions
* **Transaction Batching**: Bundle multiple operations into single atomic transactions
* **Circuit Breakers**: Safety mechanisms to prevent abuse and overspending

### 3. Dialog Interface

* **Passkey Authentication**: WebAuthn-based login with biometrics
* **Cross-Platform Support**: Works on web, mobile, and desktop
* **Session Management**: Secure storage and handling of session keys

## Transaction Flow

When a user interacts with RISE Wallet, the following process occurs:

<Steps>
  <Step>
    ### User Action

    User initiates a transaction (transfer, swap, mint, etc.)
  </Step>

  <Step>
    ### Wallet Dialog\*

    RISE Wallet dialog opens to handle the request

    <Callout type="info" title="*Session Key Optimization">
      When a valid session key is available, this step is bypassed entirely. The transaction is signed automatically without requiring user interaction, enabling seamless high-frequency actions.
    </Callout>
  </Step>

  <Step>
    ### Authentication Check

    The system checks if a valid session key exists:

    * **Has Session Key** → Sign automatically with session key
    * **No Session Key** → Request user signature via passkey
  </Step>

  <Step>
    ### Relay Processing

    The signed transaction is sent to the RISE Relay for processing
  </Step>

  <Step>
    ### Sponsorship Validation

    Relay checks sponsorship rules:

    * User tier and daily limits
    * Whitelisted contracts
    * Allowed functions
  </Step>

  <Step>
    ### Network Submission

    Valid transaction submitted to RISE network
  </Step>

  <Step>
    ### Instant Confirmation

    Shred confirmation received in \~3ms via WebSocket
  </Step>
</Steps>

## Key Technologies

### EIP-7702: Set Code Transaction

EIP-7702 allows EOAs (Externally Owned Accounts) to temporarily delegate their functionality to smart contract code during a transaction. This enables account abstraction features without deploying a smart contract wallet, while maintaining compatibility with existing Ethereum infrastructure. Read more about EIP-7702 [here](https://eip7702.io/).

### WebAuthn & Passkeys

RISE Wallet uses WebAuthn for authentication, supporting biometric login methods like FaceID, TouchID, and Windows Hello. Keys are stored securely in the device's secure enclave and can sync across devices via cloud providers.

### Session Keys

Temporary keys with specific permissions enable apps to act on a user's behalf within defined limits. This allows high-frequency actions without user interruption, while maintaining safety through time and spend limits.

## Gas Sponsorship

RISE Wallet implements intelligent gas sponsorship:

### Default Sponsorship

* New users receive daily gas budget
* Core protocol interactions (swaps, mints) are sponsored
* RISEx trading is fully sponsored

## Security and Recovery

RISE Wallet employs multi-layer security with passkeys stored in secure hardware, audited Porto contracts, and RISE's fast finality to prevent reorg attacks. Session keys use time-bound permissions with explicit scoping for safe temporary access.

Account recovery is supported through guardian recovery with trusted addresses, time-locked recovery mechanisms for added security, and multi-signature options for high-value accounts.

## Integration with RISE

RISE Wallet is optimized for RISE's unique architecture:

### Shred Integration

* Instant confirmation notifications via WebSocket
* Realtime balance updates
* Immediate transaction feedback

## Technical Specifications

### Supported Chains

* RISE Mainnet (coming soon)
* RISE Testnet
* Future: Cross-chain support via RISE bridges

### Key Types

* **P256**: Native browser/device support
* **`secp256k1`**: Ethereum standard compatibility
* **WebAuthn P256**: Passkey integration

{/* ### Performance
  - Transaction preparation: &lt;100ms
  - Signature generation: &lt;50ms
  - Network submission: &lt;10ms
  - Total UX latency: &lt;200ms + network time */}

## Learn More

* [Porto Documentation](https://porto.sh/) - Original Porto implementation
* [EIP-7702 Specification](https://eips.ethereum.org/EIPS/eip-7702) - Set code transaction details
