Skip to main content
The CTFExchange supports multiple signature types to accommodate different wallet architectures and user setups. Each signature type has specific validation rules to ensure security and compatibility.

SignatureType Enum

The exchange defines four signature types:
OrderStructs.sol

Signature Type Details

EOA (Externally Owned Account)

Value: 0Description: Standard ECDSA EIP-712 signatures signed by regular Ethereum accounts.

Validation Rules

1

Signature Recovery

The signature is validated using standard ECDSA signature recovery:
Signatures.sol
2

Address Verification

The signer and maker addresses must be identical:
Signatures.sol

Use Cases

MetaMask

Direct signing with MetaMask or other browser wallets

Hardware Wallets

Ledger, Trezor, and other hardware wallet users

Private Keys

Direct private key signing in backend services

Mobile Wallets

Rainbow, Trust Wallet, and other mobile wallet apps
This is the most common signature type and the simplest to implement for individual users.

Signature Validation Flow

The exchange validates signatures through a unified interface:
Signatures.sol

Signature Type Comparison

Security Considerations

  • Private key must be kept secure
  • No recovery mechanism if key is lost
  • Single point of failure
  • Simplest but least flexible
  • Ownership relationship is validated on-chain
  • Proxy contract code must be trusted
  • Additional attack surface through proxy contract
  • More flexible than raw EOA
  • Multi-signature provides redundancy
  • Owner set can be updated
  • More complex validation logic
  • Higher gas costs but better security
  • Security depends entirely on contract implementation
  • Must carefully audit validation logic
  • Potential for complex vulnerabilities
  • Maximum flexibility but requires expertise

Choosing the Right Signature Type

1

Individual Users

Use EOA for simplicity and lowest gas costs. Suitable for most retail traders.
2

Advanced Users

Use POLY_PROXY if you need gas optimization or additional wallet features.
3

Teams & Organizations

Use POLY_GNOSIS_SAFE for multi-signature security and shared account management.
4

Protocols & Smart Contracts

Use POLY_1271 for vaults, DAOs, or any custom signature validation logic.

Order Structure

Learn about the complete Order struct

EIP-712

Read the EIP-712 specification

EIP-1271

Read the EIP-1271 specification