Risk Types
Code Vulnerabilities
Bugs or logic errors could lead to loss of funds.- Types: Reentrancy attacks, integer overflow, access control failures, logic errors
- Mitigations:
- Multiple independent audits
- Battle-tested OpenZeppelin libraries
- Extensive testing (unit, integration, fuzzing)
- Active bug bounty program
Upgrade Risks
Upgradeable contracts could theoretically introduce vulnerabilities.- Mitigations:
- Diamond Pattern (EIP-2535) for modular upgrades
- 48-hour timelock delay
- 3-of-5 multi-sig approval required
- Full transparency in upgrade history
Dependency Risks
Vulnerabilities in integrated external protocols could affect us.Oracle Risks
Price oracle manipulation could occur.- Mitigations:
- Stablecoin focus minimizes oracle dependency
- DEX spot prices instead of external oracles
- TWAP protection where applicable
- Slippage limits as final safeguard
Security Measures
Audit Status
- Primary Audits: Core contracts and bridge integrations scheduled
- Automated Scanning: Continuously active
- Report Publication: Will be published when available
Security Patterns
- Reentrancy Protection: Locks during execution
- Access Control: Role-based
- Pausability: For emergency response
- Implementation Standard: OpenZeppelin’s well-established implementations
Emergency Controls
Contract Architecture
TED Protocol uses the Diamond Pattern (EIP-2535).Structure
- DiamondProxy: Single entry point
- FXSwapFacet: Swap logic
- DEX Adapters: Curve, Uniswap V3/V4, PancakeSwap, DragonSwap
- Bridge Facets: CCTP, LayerZero, Wormhole
- AdminFacet: Governance
Benefits
- Single entry point reduces attack surface
- Modular upgrades (changing one facet doesn’t affect others)
- Improved gas efficiency
- No contract size limits
Storage Safety
All facets share diamond storage using unique storage positions, preventing storage collision issues that have affected other upgradeable contracts.Testing
Bug Bounty
In Scope:
- Smart contracts on all supported chains
- Bridge integrations
- TEDP token contracts
User Protections
Transaction Safeguards
- Slippage Limits: Revert if output falls below minimum
- Deadlines: Revert transactions that are too old
- Validation: Amount and address validation prevents common errors