-
Notifications
You must be signed in to change notification settings - Fork 335
Add Tokenized Vaults Standard TEP #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Tokenized Vaults Standard TEP #524
Conversation
This proposal represents a strong, forward-thinking contribution to TON's DeFi ecosystem, addressing key fragmentation issues while thoughtfully adapting established standards like ERC-4626 to our asynchronous, message-driven architecture. It has high potential to accelerate protocol composability and developer adoption. |
…ew directory structure
Hey @ipromise2324, thanks a lot for sharing - your proposal looks really solid! We’ve also been working on an implementation that already includes feedback from top-tier partners like Aave, Ethena, and Affluent. Given that it reflects inputs from several ecosystem players, it feels more practical to move forward with this version as a base. That said, your proposal brings in great ideas, and it would be super valuable if you could comment on the current draft so we can capture the best of both approaches. We’ll also make sure to provide more transparency on future standards in progress, so everyone can stay aligned. Looking forward to your feedback! |
@SlorrUndef Thank you for your response! I really appreciate the effort you've put into this proposal and the industry feedback you've gathered. However, I'd like to respectfully clarify a few points. As the Founder of Torch Finance and working closely with TON developers, we have deep insights into the practical challenges developers face in this ecosystem. Our proposal isn't just conceptually similar to yours, it actually provides comprehensive coverage of scenarios that your current version doesn't address. While industry feedback from major players is valuable, we shouldn't overlook the importance of technical completeness and developer experience. Our implementation includes:
Our proposal has similarly undergone extensive ecosystem validation, including feedback from leading protocols such as EVAA, DeDust, Storm Trade, Bidask, TONCO, Swap Coffee, as well as input from TON core team members. As a project backed by Curve Finance, we also have deep understanding and experience with ERC standards. Based on these considerations, I personally believe that if we continue development based on proposal #524, while also inviting Aave, Ethena, and Affluent to review it, this would significantly reduce duplicated efforts. This approach is more aligned with TVM characteristics, and the current implementation is nearly ready for audit. |
Hi, glad to see you're also working hard for the TON ecosystem. I've carefully studied TEP-525, and here's my technical analysis and comparison: 1. Internal Functions and Get-methods Design FlawsTEP-525's As a get-method: Completely unusable, as it cannot accept additional off-chain data (such as price payload). As an internal function: Equally problematic. Taking Tolk as an example, modern TON development doesn't store data in global variables but leverages lazy loading patterns. When additional data is needed, the current design forces developers to:
This violates the Single Responsibility Principle and is inefficient. TEP-524 elegantly solves this through the VaultOptions → VaultConfig pattern:
This design makes get-methods truly usable and internal functions more efficient. 2. Missing Rounding RulesTEP-525 implements deposit/mint/withdraw/redeem operations but doesn't define rounding rules. For example:
3. Ambiguous Callback MechanismTEP-525's TEP-524 provides a standardized Callbacks structure, clearly distinguishing 4. Insufficient Error HandlingTEP-525's refund lacks error codes, so interacting contracts cannot determine failure reasons (vault paused? limit reached?). TEP-524 includes 5. Mint/Withdraw UX IssuesTEP-525's mint operation might refund tiny amounts (e.g., 0.000000001 USDT), spending 0.05 TON gas to refund such small amounts—terrible user experience. TEP-524 focuses on operation modes familiar to current TON users, with potential expansion when wallet plugins become widespread. 6. Quote TimelinessTEP-525's TEP-524's 7. Missing Gas EstimationMany developers have this experience: even after following documentation and sending transactions with correct message formats, they still get errors. Only after asking in the protocol's community do they discover insufficient TON was attached. TEP-524 provides complete gas estimation methods, allowing developers to accurately estimate required gas and avoid this frustrating experience. 8. Event StandardizationTEP-525 lacks unified event log formats, hindering explorer and indexing service parsing. TEP-524 defines complete event formats (Deposited, Withdrawn, Quoted), facilitating ecosystem tool integration. 9. Security DiscussionTEP-525 doesn't discuss critical security issues. TEP-524 thoroughly analyzes:
ConclusionTEP-524 is not just an interface specification but a complete solution based on actual TON development experience. It truly understands and addresses the needs of three core groups:
Based on the technical analysis above, TEP-524 addresses many practical challenges that developers face in TON's ecosystem. While I respect all contributions to the ecosystem, I believe technical merit should guide our decision rather than timing or which protocols have provided feedback. TEP-524 provides a comprehensive foundation that would serve well as the base for the vault standard. I appreciate the effort everyone has put into advancing TON's DeFi infrastructure. I'm happy to collaborate and explore how we can incorporate valuable ideas from different proposals to make the standard even better. Looking forward to continuing this productive dialogue together. |
@ipromise2324 well done, nice comparison |
…drawals, and event logging in vault standard documentation
…onal guidelines for share minting, and detailed specifications for deposit and withdrawal events.
Hey @shuva10v, thanks a lot for your suggestions — they definitely help make the vault more usable. Based on your feedback, I’ve made the following changes:
Please take a look and let me know if I missed anything 🙏 |
…ing its fields and usage in deposit, withdrawal, and quote operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
God
This TEP establishes a standardized interface for tokenized vaults on TON, enabling consistent deposit/withdrawal operations, rate queries, and cross-protocol communication. Inspired by ERC-4626 but adapted to TON's asynchronous design, it improves DeFi ecosystem interoperability and reduces integration complexity.