GUEST POST: Dave Belvedere, Head of Engineering, Pier Two
Adventures in Decentralization and Securing a Hyperliquid Validator
We've all heard the phrase, "with great power comes great responsibility." In the world of decentralized finance, that translates to: "with a great validator comes great security challenges, and opportunities."
Our Hyperliquid journey began with a bang when Kinetiq and Hyperion engaged us to provide validator infrastructure services. We were excited, not just for the chance to work with incredible partners, but to dive headfirst into the Hyperliquid ecosystem and see what made it tick.
The months that followed were a whirlwind of investigation and problem-solving. Our first big question was a classic: could we separate the validator wallet holding our partners' funds from the day-to-day operations of the validator? It's a fundamental security practice, and we were relieved to discover the answer was a resounding yes. Hyperliquid uses a validator wallet to hold the funds and a separate signing wallet for daily operations. This was a great start, but we quickly hit our first major hurdle.
The 10,000 HYPE Private Key Problem
To register the validator, a deposit of 10,000 HYPE was required. This minimum staking requirement is set by the protocol and is managed by our clients. Our challenge? How could we provide the necessary engineering support without our partners exposing their private keys?
Our solution was a simple Docker package, similar to the official guide. We pre-configured everything so that all our partners had to do was run a few self-registration commands. After a quick meeting and some crash-course "honorary engineer" training, we had a validator up and running.
The first thing we did after the validator registration was wrap the validator wallet in Hyperliquid's native multi-sig functionality. It was a purposeful step forward for security, but our inexperience with the chain led to an unexpected snag. We soon realized that crucial validator actions - like voting - require the validator key to sign actions. With our validator wallet now under multi-sig and the UI lacking multi-sig validator voting support, we needed a new approach.
From Multi-sig to Multi-signer
Our next step was to dive into the SDKs. We chose the Python SDK as our starting point; its simplicity made it perfect for both our technical and non-technical team members to review the process. Our long-term goal is to explore the Rust SDK for more advanced capabilities, but for now, Python was our trusted guide.
Using the SDK's examples, we designed a two-part script workflow we named "Vote Member" and "Vote Leader."
- Vote Member: This script creates the signed transaction, which locks in a unique timestamp called the ‘nonce’.
- Vote Leader: This script takes the transaction details from the Vote Member, signs the same action, includes the Vote Member's signature, and then submits the complete transaction to the chain.
These simple but powerful scripts enabled us to successfully perform validator actions using the multi-sig wallets without taking control, improving the security posture. These scripts allowed us to perform validator actions via multi-sig wallets in a way that, in our testing, improved operational security controls. We are now excited to share this tooling with the Hyperliquid ecosystem.
The scripts are available in our public GitHub repository hyperliquid-multi-sig-actions.
What's Next?
We're always looking for ways to improve our security and efficiency. Our journey with Hyperliquid is just beginning, and we're excited to explore new opportunities, including:
- Integrating with institutional custody and wallet providers;
- Expanding our capabilities to include a wider range of validator actions; and
- Developing a streamlined single flow for interacting with wallet providers, eliminating the need to manually copy signatures and nonces.
Our work with Kinetiq, Hyperion and Hyperliquid has been a fantastic experience, proving that even the most complex problems can be solved with a bit of creativity, collaboration, and a willingness to get your hands dirty. We're excited to see what the future holds for decentralized security.