-
Notifications
You must be signed in to change notification settings - Fork 303
Description
Background
ERC-4626 is a finalized Ethereum standard that defines a unified API for tokenized yield-bearing vaults. It extends ERC-20 to standardize how vaults accept deposits, issue shares, and handle withdrawals — enabling any vault-compatible application (aggregators, lending markets, routers) to integrate with any compliant vault through a single interface.
Before ERC-4626, every DeFi protocol on Ethereum implemented its own vault interface, forcing developers to build custom adapters for each integration. ERC-4626 eliminated this fragmentation and has since been adopted by major protocols including Yearn V3, Aave, Compound, and OpenZeppelin's contract library. It is now considered essential infrastructure for composable DeFi.
TRON's DeFi ecosystem — led by JustLend, SunSwap, and the broader stablecoin economy — currently lacks a standardized vault interface. Each protocol defines its own deposit/withdraw/share logic, creating the same integration friction that Ethereum faced before ERC-4626. Introducing a TRC-4626 standard would lower the barrier for DeFi composability on TRON and make it easier to build yield aggregators, structured products, and cross-protocol strategies.
This issue serves as the central place to discuss and track the progress of adapting ERC-4626 for the TRON network.
Key Adaptation Considerations for TRON
TRC-20 Compatibility: ERC-4626 is an extension of ERC-20 — all vault shares are themselves ERC-20 tokens. On TRON, this means TRC-4626 would extend TRC-20. Since TRC-20 mirrors ERC-20 at the function/event level, the interface mapping should be straightforward. However, differences in decimal precision conventions (TRX uses 6 decimals vs ETH's 18) need to be accounted for in the share-to-asset conversion logic and rounding behavior.
TRON's Resource Model: ERC-4626 is designed for atomic deposit-and-mint or redeem-and-withdraw in a single transaction. On Ethereum, this is constrained by gas limits. On TRON, the constraint is energy and bandwidth. The standard's preview functions (previewDeposit, previewMint, previewWithdraw, previewRedeem) are view calls with no energy cost, which is favorable. But the mutable operations need to fit within TRON's energy budget — particularly for vaults with complex strategies that involve cross-contract calls during deposit/withdraw.
TRX Staking and Native Resource Integration: TRON has a unique staking model where TRX can be frozen for energy/bandwidth and delegated for voting rewards. TIP-484 already proposes a standard for TRX liquidity staking and resource markets. A TRC-4626 standard should consider how it relates to TIP-484 — for example, whether a TRX staking vault that issues liquid staking tokens should conform to TRC-4626, and how voting rewards distribution maps to the vault's totalAssets accounting.
Rounding and Security: ERC-4626 specifies strict rounding directions (favor the vault over users) to prevent share inflation attacks. These rules apply identically on TVM, but implementations should be tested against TRON-specific edge cases — particularly around the 6-decimal precision of TRX and common TRC-20 stablecoins like USDT.
Topics for Discussion
- How should TRC-4626 handle the decimal precision differences between TRX (6 decimals) and the ERC-4626 convention typically designed around 18-decimal assets?
- What is the relationship between TRC-4626 and TIP-484 (TRX liquidity staking standard)? Should TIP-484 conforming contracts also implement TRC-4626, or are they complementary but separate?
- Are there TRON-specific vault patterns (e.g., energy/bandwidth delegation vaults, SR voting reward vaults) that require extensions beyond the base ERC-4626 interface?
- Should we also consider adopting ERC-7540 (Asynchronous ERC-4626) for vaults with delayed settlement — relevant for cross-chain strategies or real-world asset vaults on TRON?
- What existing TRON DeFi protocols (JustLend, SunSwap, etc.) could benefit most from a standardized vault interface, and what would migration look like?
References
- ERC-4626: Tokenized Vaults
- ERC-4626 Discussion on Ethereum Magicians
- 4626 Alliance — Resources and Ecosystem
- ERC-7540: Asynchronous ERC-4626 Tokenized Vaults
- TIP-484: TRX Liquidity Staking and Resource Market
- TRC-20 Token Standard
All feedback, ideas, and suggestions are welcome.