Alephium Documentation

website·Indexed 35 days ago

https://docs.alephium.org

Technical documentation for the Alephium blockchain, featuring guides for the Ralph smart contract language, TypeScript SDK, and full node operation. Includes detailed instructions for dApp development, wallet integration (Desktop, Extension, and Ledger), and API references for exchanges and mining pools.

Tokens
62.7K
Snippets
319
Records
501
Agent score
66%

What's inside Alephium

  1. Overview of the Alephium Desktop Wallet

    The Alephium desktop wallet is a user-friendly application for storing and managing assets on the Alephium blockchain. By default, it connects to a public node. For users requiring higher security or privacy, the wallet can be built from the official GitHub repository to connect to a local node, or it can be created completely offline.
  2. Overview of SignerProvider

    The SignerProvider is an abstraction of an Alephium account. It is used to sign messages and transactions, and to submit signed transactions to the Alephium blockchain.
  3. Overview of Alephium DApp development tools

    Building on Alephium involves two primary technical components:

    1. Ralph: The dedicated smart contract programming language for the Alephium blockchain.
    2. Web3 SDK: A developer framework used to interact with the blockchain, as well as to compile, test, and deploy smart contracts.
  4. Overview of Alephium Asset Permission System (APS)

    The Asset Permission System (APS) is a security layer for managing assets on Alephium that eliminates the 'token approval' risk common in EVM chains. Key benefits include:

    • On-demand Approval: Users and contracts can approve tokens in the same transaction as the transfer.
    • Attack Prevention: Renders Reentrancy attacks, Bitflip attacks, Smart Contract Draining, and Malicious NFTs impossible.
    • Efficiency: Allows predefined approvals and asset transfers in a single TxScript-based transaction.
    • No Manual Revocation: Because of APS, users do not need to manually revoke smart contract permissions.
  5. Overview of the Alephium Extension Wallet

    The Alephium extension wallet is a browser-based tool used to store and manage assets on the Alephium blockchain, including the native ALPH token, other fungible tokens, and NFTs. It provides a secure interface for dApps to interact with user wallets, enabling users to sign transactions and interact with smart contracts directly from their browser.
  6. Overview of Powfi DeFi foundations

    Powfi is a DeFi platform on Alephium that provides two primary foundations: Concentrated Liquidity Market Maker (CLMM) and xALPH liquid staking. It supports both concentrated liquidity (CLMM) and traditional constant-product liquidity (CPMM) pools. The primary initial market for CLMM is ALPH × USDTeth (Ethereum-bridged USDT).
  7. Overview of the Ralph programming language

    Ralph is the domain-specific language (DSL) used for writing smart contracts on the Alephium blockchain. Its design is centered around three primary goals: security, simplicity, and efficiency. The language is built on the principles of maintaining a simple DSL, providing a single obvious way to accomplish tasks, and integrating security best practices as built-in features.
  8. Overview of available Alephium wallets

    Alephium provides several wallet options depending on the user's needs, ranging from full-featured desktop applications to browser extensions and mobile apps. Official options include:

    • Desktop Wallet: The flagship wallet used for daily management, smart contract deployment, privacy, and DeFi.
    • Extension Wallet: A browser-based wallet focused on DeFi and rapid access to new features.
    • Mobile Wallet: Available for Android and iOS for on-the-go access.
    • Node Wallet: A built-in wallet included with the Alephium full node, primarily intended for developers.
    • Ledger Support: Hardware wallet integration (currently being finalized).

    Additionally, community-maintained wallets such as Sesame wallet and Linx wallet are available.

  9. Overview of Alephium technical architecture

    Alephium is a scalable Proof-of-Work (PoW) blockchain that utilizes a 'Proof-of-Less-Work' consensus mechanism to reduce energy consumption by over 87% compared to traditional PoW. It features a stateful UTXO model, combining the security of Bitcoin's UTXO with the flexibility of Ethereum's smart contracts. The network uses 'BlockFlow' sharding to achieve over 20,000 transactions per second (tps) with an average block time of 8 seconds per chain.
  10. Transfer ALPH and fungible tokens

    Transferring ALPH or other fungible tokens follows the same process: initiate the transfer from the account overview, specify the destination and amount, and sign the transaction. Transaction status can be monitored in the Activity tab until confirmation.
  11. Understand the Rhône network upgrade features

    The Rhône upgrade (activated June 12, 2024) introduced several technical improvements to the Alephium network:

    • Blocktime reduced from 64 seconds to 16 seconds.
    • Introduction of gasless transactions for users.
    • Minimum storage fee reduced from 1 ALPH to 0.1 ALPH.
    • Reentrancy protection tweaks for developers.
    • Introduction of PoLW address type.
    • Enhancements to Mapping and APS.
  12. Implement the Alephium Fungible Token Standard interface

    To ensure that dApps and wallets can correctly identify and fetch information about a token, token-issuing contracts in Alephium should implement the standard fungible token interface. The token ID is identical to the contract ID that issues it. The interface is annotated with @std(id = #0001) and requires the implementation of four specific methods to provide the token's symbol, name, decimals, and total supply.
    // Standard interface for fungible tokens
    @std(id = #0001)
    @using(methodSelector = false)
    Interface IFungibleToken {
      pub fn getSymbol() -> ByteVec
      pub fn getName() -> ByteVec
      pub fn getDecimals() -> U256
      pub fn getTotalSupply() -> U256
    }