Skip to content

[Full Stack] Implement Token Retirement with Impact Certificate #21

@Utilitycoder

Description

@Utilitycoder

Description

Allow users to "retire" (burn) their Carbon Credit Tokens to permanently claim the carbon offset. Upon retirement, generate a shareable impact certificate.

Acceptance Criteria

Smart Contract (Farm-credit/soroban-contracts)

  • `retire(amount)` function burns tokens
  • Emits `Retirement` event with: user, amount, timestamp
  • Updates `total_retired` counter
  • User cannot retire more than balance

Frontend

  • "Retire Tokens" button on dashboard
  • Retirement modal:
    • Input amount to retire
    • Shows: "You are permanently claiming X kg of CO₂ offset"
    • Confirm button
  • Execute retirement transaction
  • Success screen with:
    • Retirement confirmation
    • Downloadable/Shareable Impact Certificate (PDF or image)
    • Certificate includes: User address, Amount, CO₂ offset, Date, Tx hash
  • Social share buttons (Twitter, LinkedIn)

Certificate Design

  • Clean, professional design
  • FarmCredit branding
  • QR code linking to transaction on Stellar explorer
  • Consider using `html2canvas` or similar for generation

Definition of Done

  • Contract retirement function working
  • Frontend retirement flow complete
  • Certificate generation working
  • Social sharing functional
  • Mobile responsive

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programfeatureNew featurefrontendFrontend relatedpriority-mediumMedium priority issuesmart-contractSmart contract relatedstellarStellar/Soroban related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions