Skip to content

fix: enforce net minimum stake, reentrancy guard, fee accounting, and referral hardening - #126

Open
Victorakinwunmi wants to merge 1 commit into
SPulse-Org:mainfrom
Victorakinwunmi:fix/net-minimum-stake
Open

fix: enforce net minimum stake, reentrancy guard, fee accounting, and referral hardening#126
Victorakinwunmi wants to merge 1 commit into
SPulse-Org:mainfrom
Victorakinwunmi:fix/net-minimum-stake

Conversation

@Victorakinwunmi

Copy link
Copy Markdown

Summary

Multi-contract hardening fix addressing issues #60, #63, #75-78, #80, #81, and #89.

Changes

leaderboard

prediction_market

pulse_token

referral_registry

Issues closed

Closes #60, #63, #75, #76, #77, #78, #80, #81, #89

… referral hardening

- leaderboard: deprecate add_pts in favor of reward; add net-minimum-stake
  enforcement and stale-min self-healing (issues SPulse-Org#60, SPulse-Org#63)
- prediction_market: add reentrancy guard on place_bet (issue SPulse-Org#89);
  restructure to checks-effects-interaction pattern; track only
  platform_fee in AccumulatedFees — referral fee stays with referral
  contract as surplus (issue SPulse-Org#78)
- pulse_token: add idempotent set_minter/remove_minter with audit list
  and MAX_MINTERS cap (issue SPulse-Org#80); extend TTL on mint/burn/transfer
- referral_registry: cap referral earnings at 50k XLM (issue SPulse-Org#77);
  retain surplus fees locally instead of round-tripping to caller
  (issue SPulse-Org#78); validate display_name length (issue SPulse-Org#76); add
  admin-callable migrate_user for legacy key migration (issue SPulse-Org#75);
  fix ReferrerNotRegistered error code collision (SPulse-Org#7SPulse-Org#8); add TTL
  extensions on profile writes (issue SPulse-Org#81)

Closes SPulse-Org#60, SPulse-Org#63, SPulse-Org#75, SPulse-Org#76, SPulse-Org#77, SPulse-Org#78, SPulse-Org#80, SPulse-Org#81, SPulse-Org#89
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.

[LOW] MIN_BET is checked on gross, but the staked amount is net — fee-dependent minimum stake inconsistency

2 participants