Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

The vault

Each user gets one vault. It's a standalone contract deployed by the factory — no shared state, no pooled funds. Your ETH is yours alone.

Deployment

The factory contract maintains a registry. When you first use Locksmith, it calls deployVault(uint256 _lockDuration) on your behalf, which deploys a fresh Locksmith.sol instance with your address as owner. Subsequent deposits go to the same contract. The factory will revert with VaultAlreadyExists() if you try to deploy twice.

Lock durations

Three options, set at vault deployment:

DurationUse case
30 minutesShort discipline window
2 hoursIntraday cooling-off
12 hoursSwing trade commitment

The duration applies to all deposits into that vault. To change it, you would need to deploy a new vault — currently not supported in v1.

Fees

A 0.5% service fee (SERVICE_FEE_BPS = 50) is deducted on every deposit. The remainder is locked. The fee is sent directly to the feeRecipient address set at factory deployment — an immutable address that can only receive ETH. It has no other privileges.

Early release

You can claim a locked deposit before its unlock time by calling releaseEarly(). This costs 15% of the locked amount (EARLY_RELEASE_FEE_BPS = 1500), which is sent to feeRecipient. The remaining 85% is returned to you immediately.

There is no admin override. Nobody can force an early release on your behalf, and nobody can block you from calling it yourself.

Deposit cap

A vault can hold a maximum of 100 active deposits (MAX_DEPOSITS = 100). Deposits past this limit revert. In practice this is unlikely to be hit — claimed deposits free up slots.

Direct ETH transfers

The vault's receive() and fallback() functions both revert. There is no way to deposit ETH directly. All ETH enters through depositProfit(), which enforces the fee logic and lock accounting. This is intentional — it prevents accidental sends and ensures every wei in the vault is accounted for.

onlyOwner

depositProfit() is guarded by onlyOwner. Only the wallet address that deployed the vault can deposit into it. Nobody else can put ETH into your vault, and nobody else can release your deposits.