LSD Token Integration Patterns

Document integration patterns and security considerations for LSD tokens like stETH and wstETH.

60|18|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/PurpleAILAB/Vigilo --skill lsd-token-integration-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: LSD Token Integration Patterns
Source: https://github.com/PurpleAILAB/Vigilo/tree/main/packages/claude/skills/integration-patterns/lsd-tokens
Command: npx skills add https://github.com/PurpleAILAB/Vigilo --skill lsd-token-integration-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexities and potential vulnerabilities in integrating Liquid Staking Derivative (LSD) tokens within smart contract protocols, ensuring secure and accurate handling of rebasing, wrapping, and exchange rate variations.

Core Features & Use Cases

  • LSD Token Patterns: Provides specific integration patterns for popular LSD tokens like stETH, wstETH, rETH, cbETH, and sfrxETH.
  • Vulnerability Identification: Highlights common pitfalls such as incorrect balance caching, 1:1 ratio assumptions, and rounding errors.
  • Secure Implementation Guidance: Offers secure coding patterns and best practices for handling rebasing tokens and exchange rate fluctuations.
  • Use Case: An auditor can use this Skill to quickly understand and verify the correct implementation of stETH deposits and withdrawals in a DeFi lending protocol, preventing loss of user rewards due to rebasing.

Quick Start

Consult the LSD Token Integration Patterns skill for guidance on auditing stETH rebasing mechanisms.

Frequently Asked Questions about LSD Token Integration Patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit smart contracts for stETH rebasing behavior?

Auditing stETH rebasing behavior requires checking for incorrect balance caching and 1:1 ratio assumptions. This skill provides specific integration patterns to verify secure handling of rebasing tokens and prevent loss of user rewards in DeFi protocols.

What are common vulnerabilities when integrating Liquid Staking Derivative tokens?

Common Liquid Staking Derivative vulnerabilities include hardcoded 1:1 exchange rate ratios, stale exchange rates, and rounding errors. Identifying these pitfalls ensures accurate handling of rebasing and wrapping mechanisms across LSD assets.

How does wstETH differ from stETH in smart contract integration?

wstETH wraps stETH to provide a non-rebasing balance, requiring distinct integration patterns. This skill outlines wrapping mechanisms and ERC4626 compliance details to ensure secure implementation and exchange rate calculations.

Can I use hardcoded 1:1 ratios for rETH and cbETH exchange rates?

Hardcoded 1:1 ratios for rETH and cbETH are unsafe due to exchange rate fluctuations. This skill highlights secure implementation guidance to handle exchange rate variations and avoid stale rate vulnerabilities.

What is the best way to handle ERC4626 compliance for sfrxETH?

Handling ERC4626 compliance for sfrxETH requires validating wrapping mechanisms and exchange rate accuracy. This skill provides secure coding patterns and best practices for DeFi developers to ensure accurate LSD asset processing.

When do I need to consider rebasing behavior during a DeFi audit?

Rebasing behavior must be considered during a DeFi audit whenever protocols deposit or withdraw LSD tokens like stETH. This skill helps auditors verify correct implementation and prevent vulnerabilities from incorrect balance caching.