DEV Community

Fifo
Fifo

Posted on

A Standard Proposal for Extending Classic Asset's Behavior - Tutorial

This is a submission for the Build Better on Stellar: Smart Contract Challenge : Create a Tutorial

The Team

Your Tutorial

This submission is complementary to another demo submission in a separate category.

For this submission we decided to record a series of four videos covering a proposed standard for extending asset capabilities with classic wrappers. The proposal defines a structured approach to wrap classic assets with unique custom rules that can be either enforced by asset issuers or made option by any ecosystem builder.

What I Created

We believe the community can benefit in different ways from our submission and the proposed standard discussion:

  • Reference contract implementations to serve as reference and base for other use cases in the ecosystem.
  • Node project with common automation, typescript clients and a structured way for writting and testing complex contract use cases in Testnet with the Stellar Plus library.
  • Interactive live demos to experiment hand-on the use cases and instigate creative ways of innovating with use cases and user experience.

Journey

We had a blast! It's been a long time since we've been maturing the idea of a classic wrapper, but we didn't have the opportunity(and perhaps the initial "pushing" motivator) to try and validate the de approach. We took the opportunity to work on a standard proposal as we moved through the use cases implementation and a lot(for real, A LOT!) of testing! We kept going back, rethinking, prototyping, testing again, rinse and repeat.

In the past, we have experimented with Soroban in many ways, but we believe that a big key differentiator for Stellar is the ability to combine the best of both worlds(Soroban and classic) into hybrid assets. With that in mind, we wanted to explore structured approaches for extending classic assets' behavior in unique ways and also build something for the community's benefit.

The process was highly focused on prototyping and testing first-handed in testnet to get a feel for how well different designs would support different use cases as well as integration with the front end and wallets. Our approach was mainly around:

  • Implement quick rounds of the soroban contracts
  • Compile
  • Implementing/updating the typescript clients
  • Running integration tests for Testnet
  • Fail/find gaps
  • Repeat

We wanted to write more tests in Rust, but there was a limiting factor. Currently, there is no ready-to-use or simple way of simulating different control flags like auth_revocable in Rust tests(I think I opened an issue about it months ago). With this in mind, we decided to overcome this by quickly building and testing with the typescript clients and Stellar Plus (Shameless plug). This allowed us to get rapid feedback from the behavior in the testnet, which kept our feedback coming and allowed speedy prototyping and refinement.

We're looking forward to getting feedback from the devs and builders in the community!

Top comments (2)

Collapse
 
jess profile image
Jess Lee

Hey @fazzatti, can you confirm the DEV usernames of Victor so we can award them the completion badge for their profile?

Collapse
 
monteiro-alan profile image
Álan Monteiro

That's AWESOME! Great work!