Skip to content

Make protocol parameters configurable and harden token operations#310

Merged
KillariDev merged 2 commits into
mainfrom
t3code/f38d6b27
Jun 12, 2026
Merged

Make protocol parameters configurable and harden token operations#310
KillariDev merged 2 commits into
mainfrom
t3code/f38d6b27

Conversation

@KillariDev

Copy link
Copy Markdown
Collaborator

Summary

  • Added shared protocol configuration support via shared/ts/protocolConfig.ts with environment/global overrides and strict validation, exposed through package exports.
  • Introduced SafeERC20Ops and replaced direct ERC20 approve/transfer/transferFrom calls in Solidity with safe optional-return handling across core protocol flows (Zoltar, SecurityPool, SecurityPoolForker, SecurityPoolMigrationProxy).
  • Made fork economics configurable by wiring forkThresholdDivisor and forkBurnDivisor into Zoltar state and construction, replacing fixed constants.
  • Made initial escalation game deposit configurable by passing it through SecurityPoolFactory and SecurityPoolDeployer into SecurityPool and using it in escalation deployment.
  • Added active-item tracking and deterministic newest-first paging for vaults and staged oracle operations (getActiveVaultCount/getActiveVaults, getActiveStagedOperationCount/getActiveStagedOperations) to stabilize UI previews after removals.
  • Updated interfaces, contract wiring, and generated/shared TypeScript contract bindings/tests to reflect constructor and getter changes.
  • Expanded tests for protocol config and safe ERC20 semantics, including false-returning ERC20 behavior coverage, plus updates to existing escalation/fork/security-pool test paths and UI contract tests.

Testing

  • TypeScript typecheck: Not run
  • Test suite: Not run
  • Formatting (bun run format): Not run
  • Biome check (bun run check): Not run
  • Dead code analysis (bun run knip): Not run

Base: main → Head: t3code/f38d6b27

- Add shared protocol configuration plumbing with defaults, environment/global overrides, and validation
- Make fork threshold, burn divisor, and initial escalation deposit configurable through constructors and factory wiring
- Introduce safe ERC20 call wrappers and replace vulnerable transfer/transferFrom/approve usages
- Add active vault/staged-operation paging APIs and update UI/contracts consumers and tests accordingly
# Conflicts:
#	solidity/contracts/peripherals/SecurityPoolForker.sol
@KillariDev KillariDev merged commit eca6da3 into main Jun 12, 2026
0 of 6 checks passed
@KillariDev KillariDev deleted the t3code/f38d6b27 branch June 12, 2026 11:30
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.

1 participant