Skip to content

Paxeer Network

Security Model

Threat Matrix

ThreatSeverityMitigation
ReentrancyCriticalCustom ReentrancyGuard on all state-mutating facets (EIP-1153 tstore/tload)
Oracle manipulationHighTWAP (not spot) as primary anchor; staleness circuit breaker
Flash loan attacksHighProgressive fees make large instant trades prohibitively expensive
Sandwich attacksHighSlippage protection in Router; deadline enforcement; quadratic fees
Storage collisionHighSingle AppStorage struct at deterministic slot (EIP-2535 pattern)
Facet selector clashMediumDiamondCutFacet validates no duplicate selectors on upgrade
Integer overflowMediumSolidity 0.8.27 checked math; unchecked only in proven-safe paths
Unauthorized upgradeHighOwnershipFacet restricts diamondCut to owner
Token transfer failureMediumSafeTransfer library handles non-standard ERC-20 returns
Price manipulationHighSigmoid curve bounds max price impact; fees punish large trades

Access Control

OperationWho Can Call
Create poolAnyone (permissionless)
Initialize poolAnyone
SwapAnyone
Add/remove liquidityAnyone
Collect LP feesPosition owner only
Collect protocol feesOwner or treasury
Set fee configOwner only
Set oracle pegOwner only
Pause/unpauseOwner or pause guardians
Diamond cut (upgrade)Owner only
Execute ordersAnyone (keeper bounty)
Advance epochAnyone

Reentrancy Protection

The protocol uses EIP-1153 transient storage for the reentrancy guard:

solidity
// Before state mutation
tstore(REENTRANCY_SLOT, 2)  // _ENTERED

// After state mutation
tstore(REENTRANCY_SLOT, 1)  // _NOT_ENTERED

Transient storage is cleared at the end of each transaction, saving approximately 2,600 gas compared to traditional SSTORE-based guards.

Flash Loan Safety

Flash loans are safe because:

  1. The fee (default 9 bps) is enforced at the protocol level
  2. The callback must return a specific magic value
  3. Tokens are pulled back in the same transaction
  4. The progressive fee structure makes flash-loan-based price manipulation unprofitable

Upgrade Security

Current: Owner-controlled diamondCut with no timelock.

Planned upgrade path:

  1. Phase 1 (current): Owner-controlled diamondCut
  2. Phase 2: 48-hour timelock on all facet upgrades
  3. Phase 3: Governance token + on-chain voting
  4. Phase 4: Freeze diamondCut permanently (immutable)

Audit Status

  • Static analysis: Slither configured (slither.config.json)
  • Fuzz testing: Foundry fuzz tests with 10,000+ runs per property
  • Unit tests: 23 Hardhat tests covering all facets
  • Integration tests: 7 E2E scenario tests
  • Live tests: 23/23 checks passing on Paxeer mainnet

License

Licensed under the GNU General Public License v3.0--see LICENSE for terms.

Copyright (C) 2026 PaxLabs Inc.
SPDX-License-Identifier: GPL-3.0-only

Contact & Resources

ResourceLink
Protocol Documentationdocs.hyperpaxeer.com
Block Explorerpaxscan.paxeer.app
Sidiora Exchangeapp.hyperpaxeer.com
Websitepaxeer.app
Twitter/X@paxeer_app
General Inquiriesinfopaxeer@paxeer.app
Security Reportssecurity@paxeer.app

Released under the GPL-3.0 License.