Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Gas Deposits

Pre-Alpha Disclaimer: This is a pre-alpha release for development and testing only. Signing uses a single mock signer, not real distributed MPC. All 11 protocol operations are implemented (DKG, Sign, Presign, FutureSign, ReEncryptShare, etc.) across all 4 curves and 7 signature schemes, but without real MPC security guarantees. The dWallet keys, trust model, and signing protocol are not final; do not rely on any key material until mainnet. All interfaces, APIs, and data formats are subject to change without notice. The Solana program and all on-chain data will be wiped periodically and everything will be deleted when we transition to Ika Alpha 1. This software is provided “as is” without warranty of any kind; use is entirely at your own risk and dWallet Labs assumes no liability for any damages arising from its use.

GasDeposit Account

Every user has a GasDeposit PDA that holds IKA balance (for dWallet operation fees) and SOL balance (for NOA write-back transaction costs).

GasDeposit PDA:
  Seeds: ["gas_deposit", user_pubkey]
  Program: DWALLET_PROGRAM_ID
  Total: 139 bytes (2 header + 137 data)
  Discriminator: 4
OffsetFieldSizeDescription
0discriminator14
1version11
2user_pubkey32Ed25519 public key for gRPC authentication
34ika_balance8Available IKA balance (LE u64)
42sol_balance8Available SOL balance in lamports (LE u64)
50total_ika_deposited8Lifetime IKA deposited (LE u64)
58total_ika_consumed8Lifetime IKA consumed (LE u64)
66total_sol_deposited8Lifetime SOL deposited (LE u64)
74total_sol_consumed8Lifetime SOL consumed (LE u64)
82pending_ika_withdrawal8Pending IKA withdrawal amount (LE u64)
90pending_sol_withdrawal8Pending SOL withdrawal amount (LE u64)
98withdrawal_epoch8Epoch when pending withdrawal becomes available (LE u64, 0=none)
106last_settlement_epoch8Epoch of last gas settlement (LE u64)
114created_at_epoch8Epoch when deposit was created (LE u64)
122bump1PDA bump seed
123_reserved16Reserved for future use

Gas Deposit Instructions

InstructionDiscriminatorDescription
CreateDeposit36Create a new GasDeposit PDA for a user
TopUp37Add IKA or SOL to an existing deposit
SettleGas38NOA settles consumed gas (periodic)
RequestWithdraw44Request withdrawal (sets pending amount + epoch)
Withdraw45Complete withdrawal after epoch delay

Rent Costs by Account Type

The dWallet program uses a simplified rent formula:

#![allow(unused)]
fn main() {
fn minimum_balance(data_len: usize) -> u64 {
    (data_len as u64 + 128) * 6960
}
}

This approximation of the Solana rent-exempt minimum is used for all PDA creation.

AccountSize (bytes)Approximate Rent (lamports)
DWallet153~1,955,280
DWalletAttestation67 + datavaries
MessageApproval312~3,062,400
PartialUserSignature570~4,858,080
EncryptedUserSecretKeyShare148~1,920,480
GasDeposit139~1,858,320
DWalletCoordinator116~1,698,240
Proposal (voting example)195~2,248,080
VoteRecord (voting example)69~1,371,480

Payer Account

Every instruction that creates a PDA requires a payer account:

  • Must be writable and signer
  • Must have sufficient lamports to cover rent
  • Is debited via CreateAccount system instruction

Future: Production Gas Model

In production, the Ika network will have a gas model for signing operations. This may include:

  • Presign allocation fees
  • Signing operation fees
  • Staking requirements for validators

The exact model is not finalized.