LiquidApps Documentation
  • Introduction
  • 🧙‍♂️The DAPP Network
    • The DAPP Token
      • DAPP Token Overview
      • DAPP Tokens Tracks
      • Claiming DAPP Tokens
      • DAPP Tokens Distribution
      • Air-HODL
    • Cross Chain Bridges
    • Examples
      • Token bridge
      • Price Feed
      • Elemental Battles
      • LiquidChess
      • LiquidPortfolio
    • DAPP Network Resources
      • @liquidapps/dapp-client
        • vRAM
        • LiquidAccounts
        • DAPP Services
        • Air-Hodl
      • eosio-push-guarantee
      • Link Library
        • EOSIO Link
          • Tables
          • Crons
          • Macros
          • Variables
        • EVM Link - Solidity (Coming Soon)
  • ⚡Working with Zeus
    • Introduction
      • Requirements
      • Install Zeus and Unboxing
        • More on zeus-box.json
      • Get Started fast! (Zeus-IDE)
      • Docker CI/CD
      • Example Github Using Zeus
      • Getting started with AntelopeIO Contracts (formerly EOSIO)
    • Zeus Basics
      • Compiling Contracts
        • Clean CMake Files
      • Unit Testing
        • Printing Console
        • Fetching Table
        • Helper Functions
        • Example
      • Create ...
        • Contract/Unit Test
          • All DAPP Network Services
        • DSP Service
        • Contract Deployment
      • Import/Export Keys
      • Migrate Contract
      • Start local environment
        • Kill Services
      • Upgrade
      • Zeus RC File
      • Zeus Config File
    • Zeus Box Basics
      • Zeus Boxes Directory
        • Services
          • Oracles
        • Sample Boxes
        • Other Boxes
          • DAPP Network
          • SDKs
            • ETH-SDK
            • EOS SDK
          • Frontends
          • Extensions
          • Tests
          • Seeds
          • Microservices
          • Meta Boxes
          • Libraries
          • Game
          • EOS Framework
          • Economics
          • Templates
      • Add/Remove
      • Deploy
      • List Boxes
  • ⚙️DAPP Network Services
    • DAPP Network Services
      • vRAM
        • Getting Started Guide
          • Compile and Deploy
          • Staking for services
          • Test
          • Basic implementation
        • Smart Contract Macros
          • dapp::multi_index
        • Tools
          • DAPP Client Integration
            • get_vram_row
          • Zeus Commands
          • Scripts
            • Get table
            • Get ordered keys
        • Additional Features
          • Save load and reset dapp::multi_index data
          • Advanced Features
      • LiquidAccounts
        • Getting Started Guide
          • Compile and Deploy
          • Staking for services
          • Test
            • DAPP Client
          • Basic Implementation
          • DAPP Account
        • Smart Contract Macros
          • payload
          • VACCOUNTS_APPLY
          • require_vaccount
          • VACCOUNTS_DELAYED_CLEANUP
        • Tools
          • DAPP Client Integration
            • push_liquid_account_transaction
          • Zeus Commands
            • Zeus vaccounts push-action
          • Scripts
            • Deserialize Payload
        • Use between contracts
        • Use Between Chains
      • LiquidHarmony
        • Getting Started Guide
          • Compile and Deploy
          • Staking for services
          • Test
          • Basic Implementation
          • API DSP Key Storage
        • Smart Contract Macros
          • geturi
          • ORACLE_HOOK_FILTER
        • Creating an Oracle Request
          • HTTP/HTTPS GET/POST JSON
            • HTTP/HTTPS GET
            • HTTP/HTTPS GET JSON
            • HTTP/HTTPS POST
            • HTTP/HTTPS POST JSON
          • ECHO GET/POST JSON
            • ECHO GET
            • ECHO GET JSON
            • ECHO POST
            • ECHO POST JSON
          • Nodeos History Get
          • Sister Chain Fetch
            • sister_chain_block
            • sister_chain_history
            • sister_chain_info
            • sister_chain_last_irreversible
            • sister_chain_table_row
          • Foreign Chain Fetch
            • ethereum
              • endpoints
              • block_number
              • history
              • balance
              • storage
            • tron
              • endpoints
              • balance
              • block_number
              • block
              • transactions
              • transaction
            • cardano
              • endpoints
              • blocks
              • history
              • state
            • ripple
              • endpoints
              • balance
              • ledger
              • transactions
            • bitcoin
              • endpoints
              • balance
              • block
              • history
              • transaction
            • litecoin
              • endpoints
              • balance
              • block
              • history
              • transaction
            • bitcoin cash
              • endpoints
              • balance
              • block
              • history
              • transaction
          • Wolfram Alpha
          • Random Number
          • Stockfish
          • SQL
        • Additional Features
          • Pre geturi hook
          • Don't spend CPU condition
      • LiquidScheduler
        • Getting Started Guide
          • Compile and Deploy
          • Staking for Services
          • Basic Implementation
        • Smart Contract Macros
          • schedule_timer
          • remove_timer
          • timer_callback
          • start_interval
          • remove_interval
        • Additional Features
          • Don't spend CPU condition
      • LiquidStorage
        • Getting Started Guide
          • Compile and Deploy
          • Staking for Services
          • Test
          • Basic Implementation
        • Tools
          • Zeus Commands
            • zeus storage upload
            • zeus storage unpin
          • DAPP Client Integration
            • get_uri
            • unpin_public_file
            • upload_archive_to_liquidstorage
            • upload_file_to_liquidstorage
            • upload_public_file_from_vaccount
        • Example GET Static Web Page
      • LiquidLink
        • Getting Started Guide
          • Compile and Deploy
          • Staking for services
          • Test
          • Basic Implementation
        • Smart Contract Macros
          • svc_sign_signtrx
      • LiquidAuth
        • Getting Started Guide
          • Compile and Deploy
          • Staking for services
          • Test
          • Basic Implementation
        • Tools
          • DAPP Client Integration
            • invokeAuthedCall
      • DAPP Service Macros
        • CONTRACT_START
        • CONTRACT_END
        • DAPPSERVICES_ACTIONS
        • DAPPSERVICE_ACTIONS_COMMANDS
      • Additional Services
      • Smart Contract Console Log Syntax
      • Using on_notify with services
    • Packages and Staking
  • 👨‍🚀DAPP Service Providers
    • Introduction to DAPP Service Providers
    • DSPs
      • Architecture Overview
      • Setup DSP
        • Blockchain Account
        • EOSIO Node
          • Firehose Setup
        • IPFS
          • Adding peers
            • Reconnecting Peers Periodically
          • Bootsrapping from an existing IPFS Cluster
          • Running a private network
        • PostgreSQL Database Backend
          • How to wipe local database
        • Ethereum Virtual Machine Node Setup
        • DSP Node
          • Logs
            • Monitor all logs script
        • Register Package
          • Modify Package metadata
          • Enable/Disable Package
          • Update cost per action in QUOTA
          • More on Packages
          • Whitelist Stakers
        • Test Setup
        • Known attack vectors
      • DSP Maintenance
        • Upgrade DSP Node
        • Claim Rewards
        • Replay Contract
        • Cleanup IPFS and Oracle Entries
        • Consumer Pays CPU Permissions
      • DSP API Endpoints
        • Event
        • Version
        • vRAM
        • LiquidLink
        • LiquidStorage
        • LiquidAccounts
  • 👨‍💻DAPP NETWORK LABS
    • Introduction
    • DAPP Workers
    • EdgeDSPs
    • EdgeOS
  • 🌉CROSS CHAIN BRIDGES
    • Getting Started with LiquidBridge
      • EOSIO.token <> EOSIO.token Fungible Tokens
      • EOSIO.token <> ERC20 Fungible Tokens
        • EOSIO Side Setup
        • EVM Side Setup
          • Setup EVM Contracts
            • Setup EVM Token Contract
              • Initialize Token and Transfer Ownership
            • Setup EVM Tokenpeg Contract
            • Verify and Publish Source Code
              • token contract and overview
              • tokenpeg contract
        • Initialize EOSIO Side
        • Test bridge
      • EOSIO <> EOSIO Atomic Assets Non-Fungible Tokens
      • EOSIO Atomic Assets <> ERC721 Non-Fungible Tokens
        • EOSIO Side Setup
        • EVM Side Setup
          • Setup EVM ERC721 Contract
          • Setup EVM Atomictokenpeg Contract
          • Transfer Ownership
          • Verify Source Code
        • Initialize EOSIO Side
        • Test bridge
      • EOSIO Atomic Assets <> ERC1155 Non-Fungible Tokens
        • EOSIO Side Setup
        • EVM Side Setup
          • Setup Proxy Contract
          • Setup EVM ERC1155 Contract
          • Setup EVM ERC1155 Tradeable Contract
          • Transfer Ownership of ERC1155 contract to atomictokenpeg1155 contract
        • Initialize EOSIO Side
        • Test bridge
  • ⛓️LiquidX Stake Across Chains
    • Getting Started with LiquidX
      • Use DAPP Network Services
        • Smart Contract Steps
        • Add DSP on New Chain
        • Map Mainnet to New Chain
        • Map New Chain to Mainnet
      • Become a DSP on another chain
        • Editing config.toml file
        • Push DSP account mapping action
      • Example Chains to Add
        • CoVax
        • WAX
        • WAX Test
        • Telos
        • Telos Test
        • BOS
      • Add a Chain to LiquidX
        • Create accounts and set dappservicex contract
        • Register chain
  • 😷COVAX
    • Getting Started with CoVax Chain
      • Become a DAPP Service Provider
      • Become a Block Producer
  • 🗂️Blockchain Guides
    • Testnet Creation Guides
      • Create Binance Smart Chain Testnet Account
        • Add Binance Smart Chain Testnet Network to Metamask
        • Create EVM keypair
        • Get faucet funds
      • Create WAX Testnet Account
      • Creating Jungle 3 account
      • Create Mumbai Testnet Account (Matic-Polygon)
        • Get faucet funds
      • Creating CryptoKylin Account
      • Create Rinkeby Testnet Account
        • Change Metamask network to Rinkeby
        • Get faucet funds
    • Governance Guides
      • How to submit a proposal
      • How the Proposal System Works
      • Governance Rewards
      • How to Propose an MSIG
      • Update dappservices contract by msig
      • Setup MSIG Telegram Bot
      • Governance Contracts
      • Governance Frontend
      • Propose Payment by Msig
  • 🗒️Release Notes
    • Latest
    • History
      • 2.0.8191
      • 2.0.7966
      • 2.0.7931
      • 2.1.7848
      • 2.0.7735
      • 2.0.7661
      • 2.0.7644
      • 2.0.7622
      • 2.1.7420
      • 2.1.7301
      • 2.1.7111
      • 2.0.6808
      • 2.0.5328
      • 2.0.4719
      • 2.0.4002
      • 2.0.3107
      • 2.0.2812
      • 2.0.2527
  • 🙋‍♀️FAQs
    • Frequently Asked Questions The DAPP Token
    • Frequently Asked Questions DAPP Service Providers (DSPs)
    • Frequently Asked Questions vRAM
Powered by GitBook
On this page
  • List of available Packages
  • DSP Package Explanation
  • Select a DSP Package
  • Stake DAPP Tokens for DSP Package
  • Stake DAPPHDL (AirHODL) Tokens for DSP Package
  • Unstake DAPP Tokens
  • Unstake DAPPHDL (AirHODL) Tokens
  • Withdraw DAPPHDL (AirHODL) Tokens
  • Check DAPPHDL (AirHODL) Token Balance & Refresh Data
  • Third Party Staking

Was this helpful?

  1. DAPP Network Services

Packages and Staking

PreviousUsing on_notify with servicesNextIntroduction to DAPP Service Providers

Last updated 2 years ago

Was this helpful?

List of available Packages

DSPs who have registered their service packages may be found in the under the dappservices account on every supported chain.

DSP Portals for viewing/interacting with packages:

DSP Package Explanation

DSP packages have several fields which are important to understand:

  • api_endpoint - endpoint to direct DSP related trxs/api requests to

  • package_id - ID of the package that can be selected with the selectpkg action

  • service - the DSP service to be used. Currently LiquidApps supports 6 DSP services; however DSPs are encouraged to create services of their own as well as create bundled DSP services. The use of these resources is measured in QUOTA.

  1. ipfsservice1 - providing IPFS services to the dapp::multi_index container of a smart contract

  2. cronservices - enable CRON related tasks such as continuous staking

  3. oracleservic - provide oracle related services

  4. readfndspsvc - return a result from a smart contract function based on current conditions without sending an EOSIO trx

  5. accountless1 - virtual accounts that do not require RAM storage for account related data, instead data and accounts are stored in vRAM

  • provider - DSP account name

  • quota - QUOTA represents the amount of actions that a DSP supports based on the package_period. You can think of QUOTA like cell phone minutes in a plan. For a cell phone plan you could pay $10 per month and get 1000 minutes. 1 QUOTA always equals 10,000 actions. Said differently .0001 QUOTA equals 1 action. Instead of $10 per month perhaps you would be required to stake 10 DAPP and/or 10 DAPPHDL (Air-HODL) tokens for a day to receive .001 QUOTA or 10 actions.

  • package_period - period of the package before restaking is required. Upon restaking the QUOTA and package period are reset.

  • min_stake_quantity - the minimum quantity of DAPP and/or DAPPHDL (Air-HODL) tokens to stake to receive the designated amount of QUOTA for the specified package_period

  • min_unstake_period - period of time required to pass before refund action can be called after unstake command is executed

  • enabled - bool if the package is available or not

Select a DSP Package

Select a service package from the DSP of your choice.

export PROVIDER=someprovider
export PACKAGE_ID=providerpackage
export MY_ACCOUNT=myaccount

# select your package: 
export SERVICE=ipfsservice1
cleos -u $DSP_ENDPOINT push action dappservices selectpkg "[\"$MY_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"$PACKAGE_ID\"]" -p $MY_ACCOUNT@active

Stake DAPP Tokens for DSP Package

# Stake your DAPP to the DSP that you selected the service package for:
cleos -u $DSP_ENDPOINT push action dappservices stake "[\"$MY_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"50.0000 DAPP\"]" -p $MY_ACCOUNT@active

Stake DAPPHDL (AirHODL) Tokens for DSP Package

If you were a holder of the EOS token on February 26th, 2019 then you should have a balance of DAPPHDL tokens. These tokens possess the ability to 3rd party stake and unstake tokens throughout the duration of the AirHODL, until February 26th 2021.

# Stake your DAPPHDL to the DSP that you selected the service package for:
cleos -u $DSP_ENDPOINT push action dappairhodl1 stake "[\"$MY_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"50.0000 DAPPHDL\"]" -p $MY_ACCOUNT@active

Unstake DAPP Tokens

The amount of time that must pass before an unstake executes a refund action and returns DAPP or DAPPHDL tokens is either the current time + the minimum unstake time as stated in the package table, or the end of the current package period, whichever is greater.

cleos -u $DSP_ENDPOINT push action dappservices unstake "[\"$MY_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"50.0000 DAPP\"]" -p $MY_ACCOUNT@active

Unstake DAPPHDL (AirHODL) Tokens

cleos -u $DSP_ENDPOINT push action dappairhodl1 unstake "[\"$MY_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\",\"50.0000 DAPPHDL\"]" -p $MY_ACCOUNT@active
# In case unstake deferred trx fails, you can manually refund the unstaked tokens:
cleos -u $DSP_ENDPOINT push action dappairhodl1 refund "[\"$MY_ACCOUNT\",\"$PROVIDER\",\"$SERVICE\"]" -p $MY_ACCOUNT@active

Withdraw DAPPHDL (AirHODL) Tokens

Please note: withdrawing your DAPPHDL tokens immediately makes you ineligible for further vesting and forfeits all your unvested tokens. This action is irrevocable. Vesting ends February 26th 2021. Also, you must hold DAPP token before executing this action. If you do not, use the open action below to open a 0 balance.

# Withdraw
cleos -u $DSP_ENDPOINT push action dappairhodl1 withdraw "[\"$MY_ACCOUNT\"]" -p $MY_ACCOUNT@active
# Open DAPP balance to withdraw if needed
cleos -u $DSP_ENDPOINT push action dappservices open "[\"$MY_ACCOUNT\",\"4,DAPP\",\"$MY_ACCOUNT\"]" -p $MY_ACCOUNT@active

Check DAPPHDL (AirHODL) Token Balance & Refresh Data

# Refresh accounts table data
cleos -u $DSP_ENDPOINT push action dappservices refresh "[\"$MY_ACCOUNT\"]" -p $MY_ACCOUNT@active

Third Party Staking

Third parties may stake to a DSP package on behalf of a DAPP by calling the staketo and unstaketo actions. In order for a DAPP to select a new package after third parties have staked to them, all third party stakes must be removed.

The following two actions remove third party stakes, preselectpkg allows users to be removed in batches by supplying a depth parameter to indicate how many accounts to remove at a time. The second action is retirestakes which allows for the removal of specific third party stakes from a list of delegators account names.

Examples:

cleos -u $DSP_ENDPOINT push action dappservices retirestake "{\"owner\":\"$MY_ACCOUNT\",\"provider\":\"uuddlrlrbass\",\"service\":\"cronservices\",\"package\":\"cronservices\",\"delegators\":["dappservice2","natdeveloper","oracletest22"]}" -p $MY_ACCOUNT

cleos -u $DSP_ENDPOINT push action dappservices preselectpkg "{\"owner\":\"$MY_ACCOUNT\",\"provider\":\"uuddlrlrbass\",\"service\":\"cronservices\",\"package\":\"cronservices\",\"depth\":\"10\"}" -p $MY_ACCOUNT

cleos -u $DSP_ENDPOINT push action dappservices staketo "{\"from\":\"$MY_ACCOUNT\",\"to\":\"asdfasdfasdy\",\"provider\":\"uuddlrlrbass\",\"service\":\"cronservices\",\"quantity\":\"10.0000 DAPP\"}" -p $MY_ACCOUNT

cleos -u $DSP_ENDPOINT push action dappservices unstaketo "{\"from\":\"$MY_ACCOUNT\",\"to\":\"asdfasdfasdy\",\"provider\":\"uuddlrlrbass\",\"service\":\"cronservices\",\"quantity\":\"10.0000 DAPP\"}" -p $MY_ACCOUNT

// if deferred trx for refund fails after unstaketo
cleos -u $DSP_ENDPOINT push action dappservices refundto "{\"from\":\"$MY_ACCOUNT\",\"to\":\"asdfasdfasdy\",\"provider\":\"uuddlrlrbass\",\"service\":\"cronservices\",\"symcode\":\"DAPP\"}" -p $MY_ACCOUNT

More on preselectpkg and retirestakes

preselectpkg allows the DAPP to simply supply a depth (number of third party stakes) to remove per tx ordered by the ID of “payer”. The DAPP may simply execute this as many times as required until no more third party stakes remain. If a depth that is too deep is selected (for example, 100) the trx will simply fail, and a smaller depth can be selected. This method requires no external knowledge of who has staked to the account.

retirestakes is a more explicit and selective method for a DAPP. A list of third party stake payers (name[] delegators) can be provided. If the list is too large, the tx may time out. In order to discover who has staked to the DAPP’s package the following steps can be utilized:

  1. Each entry under this scope will have payers equal to the account names of the third parties. These payers can be used to populate the delegators for the retirestakes action.

For both actions, if the depth is deeper than the number of stakes, or the delegators list includes payers that haven’t actually staked, it will succeed gracefully, ignoring the erroneous entries and executing for the correct ones.

The dappairhodl1 contract is the exception to all of this. It does not get added to the stakingext table since while it is a third party stake mechanically, it is essentially the same as a first party stake. We do not support third party staking using AirHODL’d DAPP.

In the under the accounts table, enter your account as the scope to retrieve its information.

Third party stakers can be identified by supplying the ID of the entry that matches the account, provider, service, and package (or pending package) selected by the account being staked to as the scope of the , for example: 150.

Determine the id of their package’s accountext table entry. accountext entries all use the scope DAPP. The correct entry is the entry that has that same account, service, provider, and package (or pending_package) as the selected package.

Find the stakingext entries, using the id from the accountext table as the scope.

⚙️
package table
DSPHQ
Bloks.io
EOS Nation
Malta Block
Mission Control
Aloha EOS
MinerGate
dappairhodl1 contract
accountext table
stakingext table
bloks.io accountext table
bloks.io stakingext table