Turnkey development of secure strategy vaults (ERC-4626)

A yield strategy breaks on small things: permissions, limits, withdrawal order. We develop secure strategy vaults turnkey — from model to upgrade procedures. You get a controllable perimeter where the strategy is changed predictably and risks are visible in advance.

Blockchain Development Services

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1376
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1350
  • B2B Advance company logo design
    B2B Advance company logo design
    798
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1088
  • AIDER company logo development
    AIDER company logo development
    1034
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1130

Vault development: where yield strategy logic breaks

A yield strategy vault looks like a simple contract: it accepts assets, calculates the shareholder's share, and returns it on withdrawal.

The ERC-4626 standard defines the deposit and withdrawal interface, but says nothing about risk boundaries — that is why template vault development loses funds not in a hack, but in day-to-day routine.

The most expensive bottleneck is manual strategy execution. An operator opens and closes positions on a signal, and time passes between calculation and trade: the price moves, part of the yield settles into slippage, and a forgotten position hangs for weeks. Over a run of dozens of such operations, this is already a noticeable share of the annual result.

Next is the absence of limits on position size and concentration.

Without restrictions on asset share, counterparty, and liquidity, the vault concentrates the entire treasury in one position, and during a drawdown withdrawal is blocked entirely: the yield is on paper, but you cannot withdraw it.

And the least noticeable are errors in share calculation on deposit and withdrawal.

The order "first transfer, then share accrual," rounding in favor of one participant, lack of protection against entering right before yield accrual — each such cycle takes from the other shareholders. The difference does not show up immediately, but after dozens of operations.

All three have one thing in common: the contract does not break, it slowly redistributes funds. Below we examine how this is closed at the vault architecture level.

What a managed strategy vault provides

A correctly designed managed vault is not a wrapper around a strategy, but a set of invariants: how shares are calculated, who is authorized to move assets, what happens during a sharp market move. The effects below are visible in operation, not in the description.

Withdrawal time

The withdrawal sequence is set at the design stage: part of the liquidity remains in the vault itself, and the rest exits positions according to a pre-described rule.

A shareholder receives funds in one operation instead of waiting for the team to manually unwind positions — withdrawal is reduced from manual hours to transaction confirmation.

Volatility resilience

Shares are calculated at the rate at the moment of the operation, not at the last known value — during a sharp price drop, no one enters or exits at a stale quote.

Limits on one participant's share and on the rate of asset change prevent one large withdrawal from collapsing the value for others.

Share accounting and transparency

Every operation leaves a trace: how much was deposited, how many shares were issued, how much was withdrawn. Manual reconciliations disappear along with an entire class of failures — double accruals, lost operations, reporting discrepancies. The vault balance reconciles with the sum of shares at any moment.

The interface is fixed by the ERC-4626 standard, and the implementation is checked against battle-tested libraries OpenZeppelin — this removes discrepancies between share calculation and actual assets.

Vault models: open protocol or closed loop

The vault model decides who can become a depositor and what rights remain with the operator. An open protocol is built on the standard tokenized vault interface: an external wallet sees shares and works with them through familiar aggregators.

A closed loop is the opposite extreme: the participant composition is fixed by one team, and entry and exit go through its checks.

Model When it fits Limitations
Open protocol External pool: free entry, compatibility with wallets and aggregators Depositor composition cannot be controlled; capital inflows and outflows are unpredictable
Closed loop Single issuer, narrow group of participants, strict admission requirements No external liquidity; integration with aggregators requires a separate layer
Hybrid with role-based admission Core for insiders plus a public layer for others Two permission branches: separate checks on deposit and on share issuance

Limitations manifest at the strategy architecture level, not only in access rights.

In an open vault, shares circulate freely, so share price calculation must withstand sharp capital movements and not dilute the value of other participants' positions — liquidity buffers and limits on transaction volume per interval are built in for this.

In a closed loop, movements are predictable, but every expansion of the participant pool requires rebuilding the role model: who is allowed to issue shares, who is allowed only to top up.

A hybrid requires two independent admission paths and an explicit rule for what happens to a share when a role is lost — blocking, forced exit, or transfer to the public layer.

The model choice is fixed before writing strategy code: converting a vault from a closed loop to an open one later is more expensive than designing the right perimeter from the start.

How vault development proceeds: stages of engineering work

Vault development follows one pattern: economics and risks first, code second. Until yield sources, position size limits, and stop scenarios are fixed, we do not start assembly — otherwise the logic has to be rewritten when the model diverges from the market.

From audit to handover of control

  1. Strategy and parameter audit. We analyze yield sources, fees, and exit conditions; the output is a specification with limits and a list of failure modes the contract must handle.
  2. Role and permission scheme. Administrator, manager, and emergency circuit are separated; critical operator actions are constrained by limits and delayed execution so that a mistake cannot zero out the pool.
  3. Logic assembly. We implement ERC-4626, share price calculation, deposit and withdrawal mechanics, accumulated yield accounting; we add limits on concentration and single-operation volume.
  4. Test environment. We run scenarios on a local network copy: sharp price movement, oracle unavailability, partial withdrawal, liquidation. Every exit branch is covered by a test.
  5. External team strategy audit. We address findings and fix invariants — rules that hold under any scenario; the report goes into the documentation package.
  6. Handover of control. We transfer rights and keys, parameter documentation, the role scheme, emergency stop procedure, and the update policy.

After handover, control is with the client; we remain on support under an agreed policy. The implementation stages are repeated for any change: parameter audit, test environment, delayed execution.

Project artifacts: configurations, roles, and policies

A project is considered delivered not when the strategy has run once on a test network, but when the client's team itself changes parameters, grants roles, and sees the boundaries of its authority.

Therefore the delivery includes not only the vault code, but the entire management perimeter around it.

  • Strategy configuration. Parameter files — position size limits, rebalancing thresholds, list of eligible assets, fees — are moved out of code. Changes are made via a management call, without rebuilding and re-checking the logic.
  • Role and permission scheme. A "role → function → who holds the key" matrix with explicit separation: what is on multisig, what is on a cold address, what is available to the operator in hot mode.
  • Access policies for management functions. For each call class, it is recorded whether a timelock is needed, how many signatures are sufficient, and who can cancel an operation before it executes.
  • Parameter update policy. Sequence of steps: prepare the call, check on a local network copy, announce the delay, execute, revert to previous values if there is a deviation.
  • Vault documentation. Invariants, pause behavior, exit procedure for the share holder, yield accounting, and compliance with the standard interface so that external services can see the shares. Written so that both an engineer and a risk manager can read it.
  • Key rotation and emergency scenarios. How rights are transferred and revoked, who is given the emergency stop, what happens if one of the roles is compromised.

Handover concludes with a walkthrough: we show how to make a typical parameter change on your own. After that, the vault lives on your side — without mandatory dependence on us.

Case study: vault resilience before and after rework

The vault we reworked collected limits and asset allocation manually: the manager confirmed every operation from the console, and share accounting reconciliation was run as a separate task once a day.

On a sharp price move, this created a delay of tens of minutes — some positions managed to go beyond risk boundaries before anyone noticed.

The vault was moved to ERC-4626, and allocation rules were transferred into the contract: risk thresholds, share recalculation step, stop when the price moves outside the range.

Share accounting reconciliation was made event-driven — it runs after every operation, not on a schedule, and depositor withdrawal became one operation without manual confirmation.

Metrics before and after

Metric Before After
Share of operations performed manually about half isolated cases
Risk response time tens of minutes seconds, automatically
Incidents with share accounting discrepancies 3 per quarter zero
Depositor withdrawal time hours, with manual processing minutes, in one step

The secondary effect turned out to be more important than the main one: monitoring duty is no longer needed, deviations are visible by events, not by after-the-fact reconciliation.

That is why in this implementation case we measure the result not in convenience, but in the class of failures that disappears from the system.

How a strategy vault differs from a conventional liquidity pool

A liquidity pool and a strategy vault solve a similar task — collect capital and put it to work — but they diverge already in share accounting. In a pool, a share reflects part of the total reserve, and its value changes from the swaps themselves.

In a vault, a share is calculated from assets under management: its price is a direct result of the strategy, not a side effect of trading.

The deposit and withdrawal procedure is the second difference. From a pool, a participant exits at any moment from the available reserve, and the more was withdrawn before them, the worse the rate.

In a vault, rules are set in advance: deposit windows, delayed order execution, limit on one participant's share. The manager does not have to sell assets for every request.

Manager rights and result distribution are formalized separately here. Income is accrued through the share price, not through transfers, so the depositor does not need to do anything to receive their due.

The manager receives not access to funds, but roles: strategy and limit configuration, control of price sources, pause on operations. The ERC-4626 standard describes exactly this model.

The choice is not about "better" but about the task: continuous exchange and fee income are a pool, while managed yield with position reporting and per-depositor risk limits is a vault.

Access rights, strategy upgrades, and emergency scenarios

The vault holds depositor assets, so rights are not gathered into one key but spread across roles. The manager switches the strategy, the guardian triggers the emergency stop, the treasury sets limits and the fee procedure.

Critical operations are covered by a timelock and multisig — one access is not enough to withdraw funds from the contract.

Strategy logic is connected as a replaceable module: assets remain in the vault, only the executing contract changes, and each depositor's share is recalculated under the new logic.

Before switching, the strategy is run on a network copy with the current account state and configured limits.

How are management keys transferred?

The role is granted to the new owner's address, and they confirm it on their side. Before confirmation, the previous rights remain active; after, no old key can change the strategy or dispose of assets. Assignments are written to a log: you can see who got access and when.

Can the logic be upgraded without withdrawing funds?

Yes. The strategy module is separated from the vault: positions are closed gradually, limits for the new logic are raised in steps, and a rollback restores the previous module. Withdrawing assets is not required for this, and depositor shares are preserved.

What happens if the price source is unavailable?

The vault relies on several sources and a data staleness threshold. If the threshold is exceeded, valuation-dependent operations are blocked, new deposits are stopped, and share redemption continues to work — the depositor is not locked inside.

How is the emergency stop designed?

The guardian enables protective mode with a single call: deposits and position opening stop, while withdrawals and share redemption remain available. An alert is triggered, and the log shows which check or price source failed.

What to prepare so we can come back with an estimate and plan

Estimating a vault contract is primarily estimating the strategy and risk boundaries; the code volume here is a consequence. The more specific the inputs, the fewer assumptions in the work plan and the fewer edits after the audit.

Below is what is worth sending so we can come back with a timeline calculation and stage composition.

  • Yield logic of the strategy. Which assets the vault accepts, where they are deployed, what generates the yield, and how the share price is calculated — by oracle, by pool balance, or otherwise.
  • Depositor requirements. Open access or an address list, per-wallet limit and total capacity (deposit cap), whether a pause on deposits is needed during sharp movements.
  • Management roles and restrictions. Who manages the strategy, who can pause, who takes the fee. What is allowed immediately and what only through delayed execution.
  • Withdrawal procedure. Instant withdrawal from the free portion or a queue with a waiting window; what happens to the share during partial withdrawal and during freezing.
  • Risks we cover. Limits per venue and per position, behavior on oracle failure, emergency stop, and the procedure for returning funds to depositors.
  • Transfer of control. Who is admin after handover, multisig and signature threshold, which rights are burned and when — before launch or after an observation period.
  • Work plan and acceptance boundaries. Interface for depositors, yield reporting, audit, contract upgrade procedure, and what we consider a finished result.

If some inputs are not yet defined, that is fine: we record unclear points as assumptions directly in the plan and resolve them as we go. Describe the task in free form — we will come back with an estimate and work plan.