Integration considerations
I. For DeFi Protocols
When integrating with wM, protocols should be aware of:
- Standard ERC-20 behavior (no rebasing)
- Distinction between balance and balance-with-yield
- Impact of earning status on user experience
- Potential for yield to accumulate while tokens are locked
II. For Developers
Developers working with wM should understand:
- The relationship between wM and the underlying M token
- The impact of earning status on token accounting
- The claiming process and its effect on balances
- The consistent rounding patterns used throughout the contract
III. Common Patterns
Several patterns are recommended when working with wM:
- Check both
balanceOf()
andbalanceWithYieldOf()
to understand a user's position - Consider calling
claimFor()
before critical operations to ensure balances reflect all value - Be aware of the impact of earning status transitions on token amounts
- Understand the priority order for claim recipients when handling claimed yield