We’ve had the privilege of collaborating with the Liquidium Foundation as blockchain technical partners to enhance their innovative staking ecosystem. Liquid staking was a natural fit for LiquidiumWTF, given their reputation (reflected in their name) for consistently providing liquidity for any on-chain assets in the Bitcoin Ecosystem. The Liquidium protocol plans to allocate 30% of its total revenue to daily buybacks of the $LIQ token from the open market, rewarding $LIQ stakers and providing the source of APY, further incentivizing participation. Through this system, users can stake their $LIQ tokens and receive a liquid representation called sLIQ, all while staying fully within the Runes/Bitcoin ecosystem.
In this article, we’ll explore the staking system we supported, highlighting the security measures that guided our collaboration with the Liquidium team. These decisions ensure a robust, trustworthy protocol aligned with Bitcoin’s security standards.
Understanding Liquid Staking on Bitcoin
Liquid staking transforms locked assets into tradable forms without losing staking benefits. For Liquidium, users deposit $LIQ and takes $sLIQ, which represents their staked position and can be used in DeFi applications, enhancing liquidity while $LIQ generates rewards. The APY, derived from daily buybacks of the $LIQ token from the open market, provides a compelling return for stakers.
The protocol leverages the Runes standard, tied to Bitcoin's UTXO model. Key features of Runes include:
- Defined supply with a closed cap: Ensures scarcity and prevents inflation, adding economic security.
- Native dependency on Bitcoin: All operations are auditable on-chain, reducing reliance on off-chain oracles and minimizing manipulation risks.
- Full on-chain auditability: Every transaction and state change is verifiable on Bitcoin's ledger, promoting transparency and deterring fraud.
Rewards come from an APY generated by injecting liquidity into the $LIQ pool, supplemented by the 30% revenue share. The exchange rate between $LIQ and sLIQ is calculated as:
Exchange Rate = LIQ Pool Balance / Circulating sLIQ
Here, the LIQ Pool Balance is the total amount of $LIQ available in the main liquidity pool, while circulating $sLIQ is calculated as the total minted $sLIQ (a fixed emission of 100 million tokens) minus the amount currently held in the $sLIQ pool. This formula ensures fair valuation, with security provided through real-time, on-chain computations that are resistant to tampering.
When Liquidium adds $LIQ to the pool using 30% of its total revenue, this increases the pool’s value and raises the exchange rate. As a result, stakers earn APY because their $sLIQ appreciates relative to $LIQ, allowing them to redeem more $LIQ at the end of the staking period.
This setup creates a dual benefit: a buyback mechanism that boosts the total value locked of $LIQ adding value for all holders, and an improved $LIQ/$sLIQ exchange rate that directly rewards stakers.
Architecture: A Secure Multi-Chain Foundation
Working alongside Liquidium, we integrated Internet Computer Protocol (ICP) and Chain Fusion technology. This hybrid approach enhances security:
- ICP Canister as the Logic Engine: Deployed on ICP, this validates conditions and signs key transactions per Liquidium's rules. ICP's deterministic execution and threshold signatures provide cryptographic security, isolating logic from Bitcoin's limitations and preventing direct attacks.
- Chain Fusion as the Interoperability Bridge: This enables communication between ICP smart contracts and Bitcoin's UTXO model without centralized custodians, reducing single points of failure. Security is bolstered by end-to-end encryption and verification, ensuring Bitcoin transactions are only triggered after multi-step validations.
- Bitcoin Network as the Backbone: We utilized Bitcoin's decentralized infrastructure, cryptographic security, and reputation to support asset operations and movements, leveraging its hash power for immutability.
UTXO Management: Scalability with Security in Mind
Bitcoin's UTXO model requires careful management to avoid fragmentation. Our backend support addressed this with security in focus:
- Efficient Splitting and Merging: During staking or unstaking, outputs are split into two if possible, preserving granularity for future transactions and preventing dust attacks that could clutter the system.
- Growth Controls: We limited the total number of UTXOs via an environment variable, complying with Bitcoin's limit of 25 chained transactions and avoiding denial-of-service vulnerabilities from bloated states.
- Optimal Input Selection: When multiple UTXOs are needed, the system combines them efficiently to minimize waste, reducing transaction sizes and preventing predictable patterns exploitable in replay or double-spend attacks.
These measures ensure scalability while preserving Bitcoin's security invariants.
Staking Flow: Secure $LIQ to sLIQ Conversion
The staking process, supported by our technical partnership, balances simplicity and security:
- User Initiation: Users create and sign a Partially Signed Bitcoin Transaction (PSBT) to transfer $LIQ.
- Backend Validation: The backend locks the UTXO, confirms the signature, and validates conditions.
- Releasing sLIQ: After lock extensions and broadcasting, sLIQ is released and sent to the user via Bitcoin's mempool and database updates.
Security highlights:
- Multi-signature validations prevent unauthorized transfers.
- All steps are on-chain, allowing real-time monitoring.
- Lock extensions add time-bound protections against race conditions.
Unstaking Flow: Safeguards Against Exploitation
Unstaking includes a 7-day cooldown to deter rapid withdrawals that could destabilize the pool:
- Initiation and Lock: sLIQ is transferred to the protocol and locked, reducing circulating supply. An equivalent $LIQ amount is reserved in an intermediate pool, fixing the exchange rate.
- Intermediate Pool Isolation: This separates committed liquidity, preventing it from affecting ongoing calculations and ensuring availability post-cooldown.
- Manual Claim: After cooldown, users sign a second transaction to claim $LIQ, enforcing compliance.
Security benefits:
- Cooldown Period: Mitigates flash loan attacks or sudden dumps with a temporal barrier.
- Pool Isolation: Protects the exchange rate from manipulation during unstaking.
- Two-Transaction Requirement: Adds friction for attackers, requiring sustained wallet control.
The dApp Interface and Beyond
Users interact via a dApp with staking/unstaking tabs, portfolio views, and real-time metrics like APY. Security is enhanced with wallet integrations supporting PSBT signing, keeping private keys under user control.
Conclusion: Prioritizing Security in Innovation
As technical partners, we’ve worked with Liquidium to create a staking infrastructure that embeds security at every layer. Leveraging Bitcoin's proven model, ICP's smart capabilities, and Chain Fusion's bridges, the system is resilient, auditable, and user-centric. The 30% profit allocation to $LIQ stakers, driving the APY, underscores Liquidium’s commitment to rewarding participants, while measures like UTXO controls, cooldowns, and isolated pools reflect our joint dedication to mitigating risks. As blockchain evolves, this collaboration paves the way for liquid assets on Bitcoin, and we look forward to further secure innovations.
