Skip to content

Token metadata oracle: dynamic asset_code → contract address verification #108

Description

@ibrahimmosouf-png

Token metadata oracle: dynamic asset_code → contract address verification

Labels: feature, security, priority/medium
Difficulty: Medium · Effort: M
Backlog slot: 21

Problem Statement

Asset code + issuer rely on accepted_assets, but the contract has no on-chain oracle to validate that an Address matches the issuer's claimed asset_code. Two donations could be routed to the wrong asset entry if the maintainer passes the wrong issuer at registration time.

Why it Matters

  • This is a persistent class of "wrong asset" bugs in token-based DeFi.

Expected Outcome

Implement a built-in lookup that proves (contract_address, asset_code) corresponds — fn verify_asset_metadata(env, contract, code) -> bool.

Acceptance Criteria

  • Returns false for non-mismatch; helpers added to types.rs.

Files Likely Affected

campaign/src/asset_audit.rs, campaign/src/types.rs

Dependencies

Issue #19.


Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26featureImported from .github/ISSUES_TO_CREATE.mdpriority/mediumImported from .github/ISSUES_TO_CREATE.mdsecurityImported from .github/ISSUES_TO_CREATE.md

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions