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).
The steps
Section titled “The steps”-
Approve the token (you’ll sign this in your wallet). The first time you deposit that asset, or when an older approval is smaller than this deposit, your wallet asks you to approve the Anvil Collateral Vault to spend the token. This is an on-chain transaction. You pay gas.
-
Deposit (you’ll sign this in your wallet). Confirm the deposit. Your collateral now sits in your Anvil vault.
-
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.
-
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.
-
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.
The flow
Section titled “The flow”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 →