Skip to content

Improve Token Contract + Tokenize Escrow UI #24

@techrebelgit

Description

@techrebelgit

Repo: tokenization-hack (monorepo)
Area: Soroban · Token Standards · Backoffice dApp
Difficulty: Medium → Hard
Track: Tokenization · Protocol + Product
Requires: Backoffice dApp, Escrow ID


Overview

This repository is a monorepo that contains:

  • Multiple decentralized applications (dApps)
  • Shared escrow Blocks as packages
  • A Backoffice dApp that includes the Tokenize Escrow flow

In this task, contributors will:

  1. Analyze and improve the token contract used when tokenizing an escrow
  2. Improve the Backoffice UI so users can define token properties at creation time
  3. Ensure the existing architecture—where the token sale contract holds minting rights—remains intact

This task focuses on making tokenized escrows first-class, standards-compliant assets.


Context: Tokenize Escrow Flow

When a user tokenizes an escrow in the Backoffice dApp:

  • They must provide an Escrow ID

  • The app deploys two contracts:

    1. A Token Contract
    2. A Token Sale Contract
  • The Token Sale Contract is assigned minting rights on the token

This two-contract architecture is intentional and must not be broken.


Problem Statement

Today:

  • Token metadata (name, ticker) is limited or hardcoded
  • Users have little control over token identity
  • Token contract compliance with current Soroban fungible token standards is unclear
  • UI does not expose token properties clearly during creation

Desired:

  • User-defined token properties
  • On-chain, readable metadata
  • Standards-aligned token contract
  • Improved Backoffice UX during token creation

Goals

Product Goals

  • Allow users to define at token creation:

    • Token name
    • Token symbol / ticker
  • Associate the token clearly with the Escrow ID

  • Make token identity explicit and understandable


Protocol Goals

  • Ensure the token contract:

    • Implements the latest Soroban fungible token interface
    • Aligns with Stellar best practices
    • Is compatible with wallets and explorers
  • Preserve the token sale → mint authority relationship


Non-Negotiable Constraints

🚨 Minting rights must remain with the Token Sale Contract

  • The token contract:

    • Must not allow arbitrary minting
    • Must not give mint authority to the deployer
  • Mint/admin rights must be:

    • Assigned at initialization
    • Delegated to the token sale contract

This is required for the tokenize escrow flow to work.


Scope of Work

1️⃣ Analyze the Existing Token Contract

  • Review the current token contract implementation

  • Identify:

    • How metadata is defined (or missing)
    • How admin / mint authority is assigned
    • Any deviations from Soroban standards

2️⃣ Standards Review (Required)

Compare the token contract against:

  • Stellar Soroban Fungible Token interface
  • Relevant SEP guidance (where applicable)
  • OpenZeppelin-style Soroban patterns (if relevant)

Document:

  • What is compliant
  • What should be improved
  • What should remain unchanged

3️⃣ Improve Token Contract Metadata

Update the token contract so:

  • name and symbol:

    • Are provided at initialization
    • Are stored on-chain
    • Are accessible via standard methods
  • Token metadata is:

    • Explicit
    • Explorer-friendly
    • Wallet-friendly

Optional (nice-to-have, if supported cleanly):

  • Decimals
  • Total supply visibility

4️⃣ Improve Backoffice Tokenize Escrow UI

In the Backoffice dApp:

  • Enhance the Tokenize Escrow flow so users can:

    • Input token name
    • Input token ticker
  • Ensure:

    • Escrow ID is required and clearly displayed
    • Token metadata reflects the escrow context
  • Pass these values correctly to the token contract deployment


Escrow ID Requirement (Important)

To tokenize an escrow:

  • An Escrow ID is required

  • This ID should:

    • Be provided by the user
    • Be embedded into the token description or metadata (where appropriate)
    • Clearly link the token to the escrow it represents

API Requirements

  • A Trustless Work API key may or may not be required

  • Contributors should:

    • Use the Backoffice dApp as the primary surface
    • Document any API requirements encountered

Out of Scope

  • ❌ Token sale contract changes
  • ❌ Changes to escrow logic
  • ❌ Indexers or analytics
  • ❌ UI redesign beyond token creation inputs

Deliverables

  • Improved token contract

  • Improved Tokenize Escrow UI in Backoffice dApp

  • Documentation or comments explaining:

    • Token metadata choices
    • Mint authority design
  • Proof that:

    • Token sale contract still mints correctly
    • Tokenize escrow flow works end-to-end

Developer Workflow

  • Create a new branch:
feature/improve-token-contract-and-ui
  • Open a PR into main

  • Include:

    • Explanation of contract changes
    • Screenshots of improved UI
    • Notes on standards compliance

Acceptance Criteria

  • Users can define token name and ticker
  • Token metadata is stored on-chain
  • Token follows Soroban fungible token standards
  • Token sale contract retains mint authority
  • Tokenize escrow flow works without regression

Learning Outcomes

Contributors will learn:

  • How tokenized escrows work in practice
  • How Soroban fungible tokens are designed
  • How multi-contract systems coordinate securely
  • How UI and protocol design interact in Web3 products

Notes for Contributors

This task is cross-disciplinary:

  • Part protocol
  • Part product
  • Part UX

Respect existing architecture.
Improve clarity, not complexity.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions