Vault Module

A smart contract wallet (Gnosis Safe) that gives you:
  1. Gasless payments — sign a message, pay zero gas. Stableyard executes from vault.
  2. Yield — deposits earn APY.
  3. Instant settlement — Stableyard fronts money immediately to recipient.

Key Rules

  • One vault per account — derived from your primary EVM address (signer)
  • Signer is immutable — the primary EVM address on your account can never be changed. It’s the vault owner.
  • You can add secondary wallet addresses for receiving payments, but the signer stays the same
  • EVM only (Gnosis Safe is an EVM contract, deployed on Polygon)
  • You own the Safe (full control, withdraw anytime)
  • Stableyard has execution permission (only with your EIP-712 signature)

Activation (2-Step)

Step 1: Deploy Safe

curl -X POST https://api.stableyard.fi/v2/accounts/acc_123/vault \
  -H "Authorization: Bearer sy_auth_*"
Deploys Gnosis Safe on Polygon. Your primary EVM address is the owner.

Step 2a: Get Transaction Data

curl -X POST https://api.stableyard.fi/v2/accounts/acc_123/vault/activate \
  -H "Authorization: Bearer sy_auth_*" \
  -H "Content-Type: application/json" \
  -d '{}'
Returns txData — sign this in your wallet to grant Stableyard execution permission.

Step 2b: Submit Signed Transaction

curl -X POST https://api.stableyard.fi/v2/accounts/acc_123/vault/activate \
  -H "Authorization: Bearer sy_auth_*" \
  -H "Content-Type: application/json" \
  -d '{
    "txData": { "to": "0x...", "value": "0", "data": "0x...",
      "operation": 1, "safeAddress": "0x...", "roleKey": "0x..." },
    "signature": "0x_user_signature"
  }'
Deploys Zodiac role module. Vault is now active.

After Activation

→ Fund vault (send USDC to vault address)
→ Make payments by signing EIP-712 messages (zero gas)
→ GET /v2/accounts/:id/vault to check balance

Pay from Vault

curl -X POST https://api.stableyard.fi/v2/sessions/ses_abc/pay \
  -H "Authorization: Bearer sy_secret_*" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "vault_balance",
    "signedMessage": "0x...",
    "signerAddress": "0xOWNER"
  }'
User signs EIP-712 message, backend executes from vault. Zero gas. Stableyard fronts money to the recipient.