Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve contract security and prevent potential vulnerabilities
- Fix reentrancy vulnerabilities in Ledger.sol: - Modify transferToken() to use CEI pattern - Update subTokenBalance() to use require instead of if - Add explicit balance checks in burnUnPayablePoint() - Add require statement in changeToPayablePoint() - Add explicit validation in LoyaltyConsumer.sol: - Add timestamp validation for payment expiry - Add explicit balance checks before transfers - Add nonce validation in payment functions - Enhance security in LoyaltyBridge.sol: - Add protocol fee validation - Add explicit balance checks before withdrawals - Add chainId validation in signatures - Improve CurrencyRate.sol: - Add overflow protection in currency conversions - Add validation for zero rates - Add quorum validation in rate updates Security improvements: - Use require() instead of if() for critical checks - Add explicit balance validations before transfers - Implement CEI (Checks-Effects-Interactions) pattern - Add proper validation for signatures and nonces - Add protection against integer overflow
- Loading branch information