Skip to content

Implement collateral asset whitelisting and RBAC hardening#285

Open
Dopezapha wants to merge 2 commits intoHahfyeex:Defaultfrom
Dopezapha:feature/asset-whitelisting
Open

Implement collateral asset whitelisting and RBAC hardening#285
Dopezapha wants to merge 2 commits intoHahfyeex:Defaultfrom
Dopezapha:feature/asset-whitelisting

Conversation

@Dopezapha
Copy link
Copy Markdown
Contributor

@Dopezapha Dopezapha commented Mar 26, 2026

Closes #16

"### Objective
Restrict betting transactions to only use authorized collateral assets (e.g., XLM, USDC), preventing market volume manipulation using worthless 'spam' tokens.

Key Changes:

  • Collateral Whitelisting: Implemented `WhitelistedToken` storage and enforced strict validation in [place_bet].
  • RBAC Hardening: Unified all administrative operations (whitelisting, fees, global status) under the `access` module's `Role::Admin` checks.
  • Governance Logic Synchronization: Properly implemented the 24-hour liveness window for market resolutions in both code and tests.
  • Test Suite Stabilization:
    • Fixed 10+ integration test failures caused by the move to real Stellar Asset Contracts (SAC).
    • Overhauled [setup()] and [setup_market_with_winners()] to automatically handle token provisioning and whitelisting.
    • Achieved a 100% pass rate (57/57 tests) for all platform logic.

Impact:

  • Protects the platform from spam-token manipulation.
  • Hardens the administrative security model for production deployment.
  • Ensures a stable, production-ready foundation for decentralized market governance."

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 26, 2026

@Dopezapha Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Dopezapha Dopezapha force-pushed the feature/asset-whitelisting branch 4 times, most recently from 593536c to 10576a7 Compare March 26, 2026 16:28
@Dopezapha Dopezapha force-pushed the feature/asset-whitelisting branch from e911749 to dfebefe Compare March 26, 2026 16:34
@Dopezapha Dopezapha closed this Mar 26, 2026
@Hahfyeex Hahfyeex reopened this Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vault: Collateral Asset Whitelisting

2 participants