Magpie LogoMagpieM Aggregated Ecosystem

Resources

Security

Multi-layered protection from contracts to backend.

  • BondingCurve and token contracts bind each other’s addresses at deployment; state-transition functions are guarded by strict modifiers to prevent forged graduation calls
  • ReentrancyGuard protects against reentrancy — every fund-moving function is marked nonReentrant
  • An inSwap lock covers both internal curve settlement and PancakeSwap swaps, preventing nested circular calls
  • The three-state TokenStatus variable automatically controls tax-settlement paths and feature permissions — no manual intervention
  • TWAP windows are at least 30 minutes, preventing flash-loan price manipulation
  • The token factory uses the OpenZeppelin Clones library, avoiding initialization vulnerabilities
  • LP tokens are burned at graduation — liquidity is locked forever, preventing rug pulls
  • MagpieLock checks TokenStatus before locking; curve-stage tokens are rejected
  • The points system is stored off-chain with signature verification against cheating
  • Emergency pause: all operations can be frozen instantly if a vulnerability is discovered, protecting user funds

Contract Architecture

ContractResponsibility
BondingCurve.solCurve market making, progress tracking, graduation trigger and liquidity migration
TokenFactory.solClone-deploys new tokens, binds the curve contract, records token addresses
NoTaxToken.sol / TaxToken.solNo-tax / tax token templates; the state machine switches settlement paths automatically
DividendDistributor.solStandalone dividend contract, activates distribution after graduation
MagpieLock.solAll personal- and collective-pool locking logic
PriceOracle.solTWAP price reads for price-based commitment judgment
Admin.solRevenue withdrawal, parameter tuning, emergency pause