SignatureType Enum
The exchange defines four signature types:OrderStructs.sol
Signature Type Details
- EOA
- POLY_PROXY
- POLY_GNOSIS_SAFE
- POLY_1271
EOA (Externally Owned Account)
Value:0Description: Standard ECDSA EIP-712 signatures signed by regular Ethereum accounts.Validation Rules
Signature Recovery
The signature is validated using standard ECDSA signature recovery:
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
| Feature | EOA | POLY_PROXY | POLY_GNOSIS_SAFE | POLY_1271 |
|---|---|---|---|---|
| Signer = Maker | ✅ Required | ❌ Different | ❌ Different | ✅ Required |
| Must be Contract | ❌ No | ❌ No | ❌ No | ✅ Yes |
| Ownership Check | ❌ No | ✅ Proxy | ✅ Safe | ❌ No |
| Signature Type | ECDSA | ECDSA | ECDSA | EIP-1271 |
| Complexity | Low | Medium | Medium | High |
| Gas Cost | Lowest | Medium | Medium | Variable |
Security Considerations
EOA Security
EOA Security
- Private key must be kept secure
- No recovery mechanism if key is lost
- Single point of failure
- Simplest but least flexible
Proxy Security
Proxy Security
- Ownership relationship is validated on-chain
- Proxy contract code must be trusted
- Additional attack surface through proxy contract
- More flexible than raw EOA
Safe Security
Safe Security
- Multi-signature provides redundancy
- Owner set can be updated
- More complex validation logic
- Higher gas costs but better security
EIP-1271 Security
EIP-1271 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
Teams & Organizations
Use POLY_GNOSIS_SAFE for multi-signature security and shared account management.
Related Resources
Order Structure
Learn about the complete Order struct
EIP-712
Read the EIP-712 specification
EIP-1271
Read the EIP-1271 specification