The rule
No single key can move user funds on PredictStreet.VaultImplementation.withdrawERC20 on-chain checks two signatures:
- User signature — EIP-712 from the vault owner EOA.
- Backend signature — EIP-712 from the factory owner (backend key).
msg.sender of the tx is
unconstrained — a relayer, the user, or a third party can submit.
Sequence
Why two signatures
- User signature. Proves user authorised this specific withdrawal.
- Backend signature. Attests the request passed platform compliance (AML, banned-destination, return-to-source).
- Unilateral backend moves are impossible. The backend’s key alone doesn’t unlock the vault.
What the on-chain verifies
- Digest-based replay protection — single-use per digest.
- No pre-signed cancellation — if both parties want to abort, they simply don’t submit.
- Emergency withdraw — user can invoke after a 7-day timelock if the backend is gone or refusing legitimate withdrawals.