Smart Contract Safeguards

AetherCycle’s contracts integrate a layered security approach, blending industry best practices with custom modules to ensure the PerpetualEngine remains resilient.


1. Checks–Effects–Interactions Pattern

All state-changing functions, particularly in the PerpetualEngine, strictly enforce the Checks–Effects–Interactions pattern to prevent re-entrancy attacks.

  • Checks: Preconditions are validated immediately (e.g., cooldowns, balance thresholds).

  • Effects: Internal state is updated before any external calls (e.g., lastPublicProcessTime).

  • Interactions: External calls are executed only after state integrity is secured.

This ordering ensures that recursive exploits cannot manipulate stale state data.


2. Two-Key Security Model for Tax Processing

Critical operations such as tax handling are safeguarded by a dual-approval mechanism:

  1. Community Approval (Key 1): Any participant may call approveEngineForProcessing() on the AECToken contract, granting the Engine an allowance to operate.

  2. Engine Execution (Key 2): The PerpetualEngine then processes the funds only within its runCycle().

This separation ensures that the Engine cannot autonomously access funds without explicit, verifiable approval.


3. Adaptive Liquidity and Error Handling

The PerpetualEngine employs an Adaptive Liquidity Algorithm when adding to DEX liquidity.

  • Liquidity is deployed in smaller simulated chunks to reduce slippage and minimize failure risk.

  • If an unsafe swap is detected, the Engine dynamically reduces trade size until safe execution is achieved.

  • All external calls are wrapped in try/catch. Failed calls are logged, while unprocessed funds remain preserved for future cycles.

This prevents the protocol from stalling and ensures operational continuity.


4. Built-in Contract Safeguards

Each subsystem includes specific fail-safes:

  • PerpetualEngine Cooldown: Mandatory delay between runCycle() calls prevents spam and manipulation.

  • FairLaunch Minimum Raise: $10,000 USDC threshold guarantees either a valid launch or full refunds.

  • AECToken Dust Protection: Transfers below MIN_TRANSFER_AMOUNT are reverted to block dust attacks.

  • FounderVesting Max Cliff: Vesting extensions are capped at 10 years, preventing perpetual lock scenarios.


Closing Note

These layered mechanisms reflect AetherCycle’s commitment to preventive and adaptive security. By integrating established patterns, dual-control models, adaptive algorithms, and hard-coded safeguards, the protocol is structured to minimize systemic risk while ensuring resilience and continuity under adverse conditions.

Last updated