Skip to content

Walkthrough: Deposit & reserve collateral

This is the on-chain heart of the process. You’ll deposit collateral into your own self-custodial vault, then, once a lender is matched and contracts are signed, reserve it against your loan using a Letter of Credit (LoC).

  1. Approve the token spending (Sign and broadcast from your wallet)

  2. Deposit (Sign and broadcast from your wallet). Your collateral now sits in your Anvil vault.

  3. Get matched and sign. A lender accepts your request. Helva generates the contracts (you, the lender, and Helva as broker and guarantor). The contracts are sent to you already pre-signed with a qualified electronic signature (QES) by Helva. Review and sign them.

  4. Sign the allowance (you’ll sign this in your wallet). You authorize the Letter of Credit contract to reserve collateral from your vault. This is a signature, not a transaction, and you pay no gas. It is skipped if that allowance is already set.

  5. Create the Letter of Credit (you’ll sign this in your wallet). This sends createDynamicLOC. Helva shows:

    • Amount: principal plus full-term interest, plus the FX buffer for a CHF loan.
    • Validity: loan maturity plus 5 days.
    • Beneficiary: Helva’s beneficiary contract, held for your lender. See Helva’s underlying entity.

    No one can convert more than the LoC amount, and unused collateral returns to you in kind.

If your vault is still short when you reserve, the wallet still asks for Approve, then Deposit, then Sign allowance, then Create LoC. Contract signing sits between the deposit and the Letter of Credit in the usual path.

When the amount you deposit covers the allowance the Letter of Credit needs, the app may send one transaction, depositAndApprove, that deposits and sets that allowance together. You will not see a separate Sign allowance step. The address being approved in that transaction must be Anvil’s Letter of Credit contract. The field list is on Verify your transactions.

sequenceDiagram
    autonumber
    actor B as You
    participant W as Your wallet
    participant A as Your Anvil vault
    participant H as Helva

    B->>W: Approve the token
    W->>A: Deposit collateral
    Note over A: Coins stay in your vault
    H-->>B: Lender matched, contracts already QES-signed
    B->>H: Sign contracts
    B->>W: Sign allowance, no gas
    B->>W: Create the Letter of Credit
    Note over A,H: LoC created. Helva checks it on-chain before the loan is activated

Next: Receiving your funds →