waves_logo Docs
  • Why Waves
    Why Waves
  • Waves Basics
    Waves Basics
  • Account
    • Creating Account
      Creating Account
    • Address
      Address
    • Account Balance
      Account Balance
    • Account Data Storage
      Account Data Storage
    • Alias
      Alias
    • dApp and Smart Account
      dApp and Smart Account
    Account
  • Token (Asset)
    • Non-Fungible Token
      Non-Fungible Token
    • Smart Asset
      Smart Asset
    • Token ID
      Token ID
    • WAVES
      WAVES
    Token (Asset)
  • Transaction
    • Transaction Fee
      • Sponsored Fee
        Sponsored Fee
      Transaction Fee
    • Signature and Proofs
      Signature and Proofs
    • Transaction Types
      • Burn Transaction
        Burn Transaction
      • Create Alias Transaction
        Create Alias Transaction
      • Data Transaction
        Data Transaction
      • Exchange Transaction
        • Order
          Order
        Exchange Transaction
      • Genesis Transaction
        Genesis Transaction
      • Invoke Script Transaction
        Invoke Script Transaction
      • Issue Transaction
        Issue Transaction
      • Lease Cancel Transaction
        Lease Cancel Transaction
      • Lease Transaction
        Lease Transaction
      • Mass Transfer Transaction
        Mass Transfer Transaction
      • Reissue Transaction
        Reissue Transaction
      • Set Asset Script Transaction
        Set Asset Script Transaction
      • Set Script Transaction
        Set Script Transaction
      • Sponsor Fee Transaction
        Sponsor Fee Transaction
      • Transfer Transaction
        Transfer Transaction
      • Update Asset Info Transaction
        Update Asset Info Transaction
      • Ethereum-like Transaction
        Ethereum-like Transaction
      Transaction Types
    • Transaction Validation
      Transaction Validation
    Transaction
  • Mainnet, Testnet, Stagenet
    Mainnet, Testnet, Stagenet
  • Node
    • Leasing
      Leasing
    • Generator’s Income
      Generator’s Income
    • Monetary Policy
      Monetary Policy
    Node
  • Block
    • Block Generation
      • Base Target
        Base Target
      • Generation Signature
        Generation Signature
      Block Generation
    • Block Height
      Block Height
    • Block Signature
      Block Signature
    • Block Timestamp
      Block Timestamp
    • Transactions Root Hash
      Transactions Root Hash
    • Genesis Block
      Genesis Block
    Block
  • Oracle
    Oracle
  • Protocols & Data formats
    • Cryptographic Practical Details
      Cryptographic Practical Details
    • Waves-NG Solution
      Waves-NG Solution
    • Waves-NG Protocol
      Waves-NG Protocol
    • Fair Proof of Stake
      Fair Proof of Stake
    • Blockchain Data Types
      Blockchain Data Types
    • Binary Format
      • Address Binary Format
        Address Binary Format
      • Alias Binary Format
        Alias Binary Format
      • Block Binary Format
        Block Binary Format
      • Network Message Binary Format
        • Block Message Binary Format
          Block Message Binary Format
        • Checkpoint Message Binary Format
          Checkpoint Message Binary Format
        • Get Block Message Binary Format
          Get Block Message Binary Format
        • Get Peers Message Binary Format
          Get Peers Message Binary Format
        • Get Signatures Message Binary Format
          Get Signatures Message Binary Format
        • Handshake Message Binary Format
          Handshake Message Binary Format
        • Peers Message Binary Format
          Peers Message Binary Format
        • Score Message Binary Format
          Score Message Binary Format
        • Signatures Message Binary Format
          Signatures Message Binary Format
        • Transaction Message Message Binary Format
          Transaction Message Message Binary Format
        Network Message Binary Format
      • Order Binary Format
        Order Binary Format
      • Transaction Binary Format
        • Burn Transaction Binary Format
          Burn Transaction Binary Format
        • Create Alias Transaction Binary Format
          Create Alias Transaction Binary Format
        • Data Transaction Binary Format
          Data Transaction Binary Format
        • Exchange Transaction Binary Format
          Exchange Transaction Binary Format
        • Genesis Transaction Binary Format
          Genesis Transaction Binary Format
        • Invoke Script Transaction Binary Format
          Invoke Script Transaction Binary Format
        • Issue Transaction Binary Format
          Issue Transaction Binary Format
        • Lease Cancel Transaction Binary Format
          Lease Cancel Transaction Binary Format
        • Lease Transaction Binary Format
          Lease Transaction Binary Format
        • Mass Transfer Transaction Binary Format
          Mass Transfer Transaction Binary Format
        • Reissue Transaction Binary Format
          Reissue Transaction Binary Format
        • Set Asset Script Transaction Binary Format
          Set Asset Script Transaction Binary Format
        • Set Script Transaction Binary Format
          Set Script Transaction Binary Format
        • Sponsor Fee Transaction Binary Format
          Sponsor Fee Transaction Binary Format
        • Transfer Transaction Binary Format
          Transfer Transaction Binary Format
        • Update Asset Info Transaction Binary Format
          Update Asset Info Transaction Binary Format
        • Ethereum-like Transaction Binary Format
          Ethereum-like Transaction Binary Format
        Transaction Binary Format
      • Transaction Proof Binary Format
        Transaction Proof Binary Format
      Binary Format
    • Validation Rules
      Validation Rules
    Protocols & Data formats
  • Glossary
    Glossary
      • English
      • Русский
      On this page
        • Leasing Benefits for WAVES holder
        • Leasing Benefits for Node Owner
        • Create and Cancel Lease
        • Lease Parameters
      waves_logo Docs

          # Leasing

          The Waves blockchain uses Leased Proof of Stake (LPoS) consensus algorithm. Just like in all other Proof of Stake (PoS) consensus algorithms, each participant's chance to generate the next block is proportional to their economic stake in the network. Unlike Proof of Work, PoS doesn’t require significant computational capacities or energy, also making attacks on the network unprofitable for participants.

          LPoS differs from PoS in that ordinary users can take part in block generation by leasing out their WAVES tokens to generating nodes. In essence, the lessor gives the node the right to generate blocks using their WAVES. The tokens remain locked on the lessor's account until the lessor cancels the lease.

          Leased tokens increase the node's chance to generate a block and get rewards. Commonly node owners share the rewards with lessors. However, the Waves protocol does not regulate leasing payments, they are at the discretion of the node owner.

          # Leasing Benefits for WAVES holder

          • Each WAVES holder can participate in block generation and earn rewards without running their own node.
          • Leasing is safe by design: WAVES tokens are not transferred to the lessee, but remain under the full control of the holder.
          • Lease can be canceled instantly, unilaterally.

          Generating nodes can work with different efficiency and send back different percentages as rewards. You can choose a node and lease out your WAVES, for example, in the WX Network application developed by a third-party team from the community.

          # Leasing Benefits for Node Owner

          • Leased WAVES tokens increase the chance to generate the next block and get rewards.
          • The node owner can independently set the terms of payments to lessors.

          If you'd like to run a generating node and attract users to lease WAVES to your node, see instructions.

          # Create and Cancel Lease

          The Waves protocol provides two ways to lease WAVES:

          • Any account can send a Lease transaction.
          • dApp can create a lease by the Lease script action performed by a callable function within an Invoke Script transaction or Ethereum-like transaction.

          The lessor can cancel their lease:

          • Any account — by a Lease Cancel transaction.
          • dApp — by the LeaseCancel script action performed by a callable function.

          The lease amount cannot be changed: you can only cancel the lease and create a new one.

          Please keep in mind that the generating balance of account is calculated as the lowest effective balance (that is the balance considering leasing) for the last 1000 blocks (more about calculating the generating balance). Transactions that cancel the lease and create the new one may be fall into different blocks.

          Example. Suppose at height 3500000 the node's generating balance and effective balance are both 5000 WAVES.

          At height 3500001, the lease of 100 WAVES to the node is canceled. The node's generating balance becomes 4900 WAVES.

          At height 3500002, the new lease of 70 WAVES to the node is created. However, the node's generating balance is still 4900 WAVES. The generating balance can increase only at height 3501001, when block 3500001 drops out of the last 1000 blocks.

          The Lease and LeaseCancel script actions performed in the same script invocation are guaranteed to be in the same block. Therefore, the dApp can safely withdraw a part of the leased WAVES using these script actions with the same recipient. If a lease of 100 WAVES is canceled and a new lease of 70 WAVES is created, the recipient's generating balance will decrease by the difference of 30 WAVES.

          # Lease Parameters

          You can get lease parameters using the Node REST API:

          • GET /leasing/active/{address} returns a list of active leases involving a given address, both incoming and outcoming
          • GET /leasing/info/{id} returns lease parameters by lease ID
          • GET /leasing/info , POST /leasing/info return lease parameters by a list of lease IDs

          Example lease:

          {
            "id": "CcqcGx5iWd6xvxzJnoVQHD91R5jYZAZHvZq2DMVuWKx1",
            "originTransactionId": "CcqcGx5iWd6xvxzJnoVQHD91R5jYZAZHvZq2DMVuWKx1",
            "sender": "3PD9TqtXN9tC1tg5TFUC2BNukebfLaYUsdy",
            "recipient": "3PEjdMgnR7a48RnZoW8RF8TeEqidue28Wgm",
            "amount": 268100000000,
            "height": 3516046,
            "status": "canceled",
            "cancelHeight": 3519182,
            "cancelTransactionId": "4mHhTVKJoQ4jTF828eBRrXZzy1ni2N2yQLwVhunp4agb"
          }
          
          Field Description
          id Lease ID. If the lease is created by a Lease transaction, its ID is the same as the transaction ID
          originTransactionId ID of the Lease transaction, or Invoke Script transaction, or Ethereum-like transaction in which the lease was created
          sender Lessor's address
          recipient Lessee's address
          amount Amount of WAVELETs to lease (that is, amount of WAVES multiplied by 108)
          height Sequence number of the block in which the lease was created
          status Lease status: active or canceled
          cancelHeight Sequence number of the block in which the lease was cancelled. null if the lease is active
          cancelTransactionId ID of the Lease Cancel transaction, or Invoke Script transaction, or Ethereum-like transaction in which the lease was canceled. null if the lease is active
          Node
          Generator’s Income
          Node
          Generator’s Income