Withdrawal Hot wallet

  • Introduction

Hot wallets are special cryptocurrency wallets that provide automated transaction signing capabilities at scale, from within a secure environment. In any crypto exchange infrastructure, withdrawal hot wallets are tasked with the responsibility to process all user-requested withdrawals. Since all transaction requests need to be processed immediately for an optimal user experience, the private keys of hot wallets are always maintained online, making them readily accessible for signing transactions.

Few important characteristics of Withdrawal wallets

  • Withdrawal hot wallets must have efficient fees estimation capabilities to optimize transaction costs and prevent unnecessary exorbitant fee payments on transactions.
  • They should have an efficient transaction queue management system to prevent transaction backlogs, which would otherwise result in a long queue of pending transactions to negatively impact the customer experience.

Key Configuration

On most protocols wherever it is possible, Hot wallets come with the fixed multi-signature scheme of 2 of 4 where 3 keys are controlled by the client and one key is provided by Liminal.

Key Providers

Hot wallets can be accessed only via SDK or APIs.

Gas Saver: Save thousands of dollars on Ethereum Gas fees.

ETH High fee problem

The ever-prevalent issue of expensive Ethereum gas fee always comes up whenever a highly anticipated activity like NFT sales kicks off. The lack of scalability of the Ethereum protocol in its current form combined with the influx of millions of users onto the chain causes network congestion. With a large number of transaction requests awaiting confirmation causing huge backlogs, miners tend to increase the gas fee to maximize profits amid high demand.
Even otherwise, the gas fees on Ethereum even during normal network conditions tend to hover around 30-40 USD, making transactions on the protocol a perpetually costly affair.

Our Findings trying to save fees

Transaction fees on blockchain protocols have the tendency to exhibit sharp swings in a short period of time.

In the above blockchain snapshot, one can see the “Base Fee” starting from 14.59 Gwei, which goes down to 11.88 Gwei before heading to the maximum of 21.4 Gwei, all within a 5 minute window.
The difference in fees from the time we started tracking to the last entry on the table is 50%, an increase from 11.88 to 21.4 Gwei. These drastic fluctuations in the transaction fees can be minimized by implementing some of the best practices like using EIP-1559 standard for Ethereum and batching for Bitcoin.
By following just the best practices, fees saving of up to ~9% can be achieved

Solution: Gas Fees Saver Algorithm

Based on the findings, Liminal adopted a programmatic approach to optimize transaction costs. The resulting gas fees saver algorithm includes multiple components to achieve considerable gas fee savings.

Algorithm components

Predictive Fees trend estimation
Constant monitoring of the Ethereum network enables the algorithm to generate predictive fees trend estimation signals based on the last few blocks generated. These signals help decide whether to apply gas savings on upcoming transactions or not.
The algorithm is trained using tens of thousands of transactions on the mainnet, enabling it to generate predictive models for transaction fees estimation. These derived gas fee estimations play a crucial role in anticipating and identifying the window with the lowest fees to execute transactions within the favorable time frame. Delays exceeding five minutes to achieve confirmations with the lowest fees would result in a missed opportunity, forcing the user to pay a much higher market rate prevailing at that time.

Low ball offer algorithm
The “low ball offer” algorithm identifies the optimal fee savings percentage and retry time for transactions based on the blockchain network conditions. Based on the findings, the Liminal wallets can initiate transactions at fees lower than the prevailing rates.
If the network fees match or fall below Liminal’s estimate, the transaction will be confirmed immediately, enabling users to save on the transaction fee as against an immediate transfer at current fees. In an event the fee market keeps moving upwards and gas fees don’t come down, the transaction will be reattempted once the higher fee window passes, returning back to normalcy.

As transactions initiated using this method may not get executed immediately, those looking for immediate transaction execution and settlement can opt to override the low ball offer settings to suit their requirements. For example, consolidation transactions from deposit wallets can afford longer retry time and aggressive fees savings percentages compared to withdrawal wallets where transactions need to be settled as soon as possible.

Confirmation Guarantees

High transaction volumes on a blockchain protocol could lead to delays in confirmation. In an exchange infrastructure, the withdrawal wallets are used to process a large number of transactions in response to the corresponding withdrawal requests from the users. These transactions are carried out in a sequential manner, and any delay in confirmation of one transaction results in a long queue of unconfirmed transactions requiring manual intervention by dedicated blockchain-savvy teams deployed round the clock specifically for this purpose.

Liminal provides transaction confirmation guarantees on withdrawal wallets. The “Transaction Watchtower” tracks the status of all transactions submitted via Liminal and their current blockchain confirmation status.

In an event any transaction is not confirmed within a predefined time window, an automated system will reattempt and resend the delayed or failed transaction with a higher gas fee to ensure confirmation without manual intervention.

Implementation details

Technical Architecture

Transaction Flow

Developer Experience: Plug and play deployment with minimal efforts

Gas Saver Settings

Developers can set below setting at wallet level
Optimal Retry Time: If the transaction is pending for this much time, watcher will pick it up again and retry sending it to signer at market fees
Fees Saving Percentage: If low ball offer algorithm attempted to save fees, Fees Estimator will give fees estimation with this much savings.

For example if market fees are 100 gwei and Fees Savings Percentage is set at 10%, Fees Estimator will return 90 gwei as offered fees.

Automated implementation
Once developer has setup gas saver settings, nothing needs to be done. Liminal SDK automatically follow watcher and Fees Estimator instructions to send transactions at optimal fees for savings.

The implementation should follow recommended implementation to retry transactions.

Integration details

The full sample of withdrawal transaction with status checks, gas saver, confirmation guarantees is available here


Result: Fees savings worth thousands of dollars

We have estimated an average 6-10% savings on transaction fees for withdrawal transactions. These savings on transaction costs is in addition to another 8-9% savings that can be achieved by following best practices like EIP-1550 and batching. With proper implementation of Liminal Gas Fee Saver, savings of up to 15% in gas fees can be achieved on ETH withdrawals.

One of the customers has implemented Gas Fees Saver with the help of the Liminal Team. During our first production trial, we were able to save approximately 2 ETH on gas fees from 13,000 transactions, resulting in effective savings of around 7.8% to the client.

You can track current fee saver statistics here which shows the gas savings excluding the EIP-1559 gas savings.

Some key points (as of 15-Aug-2022)

  • Total fees savings: 2.17 ETH
  • % savings: 7.86%
  • Hit Ratio: 70%

Use cases

  • Hot withdrawal wallets for Exchanges
  • Gas saver algorithm integration via API and SDK to save gas fees using Bring your own keys.

Did this page help you?