Smart contracts and tokens logo

Vault Exit Lawyer

$0.25 USDC per call · Smart contracts and tokens · POST /api/v1/vault-exit · Id vault-exit-lawyer

Before moving treasury funds out of an ERC-4626 or ERC-7540 vault: reads the chain at one pinned block and returns how much can exit now, the haircut vs convertToAssets, partial-exit maximum, liquidity coverage, queue/cooldown timing, admin-power flags (upgrade, pause, multisig threshold, timelock), and a verdict EXIT_NOW_FULL / EXIT_PARTIAL / QUEUED / BLOCKED / UNKNOWN. With a holder it simulates redeem via eth_call. Optional docsUrls are checked against the contract for contradictions. All numbers are computed deterministically; the model only reads documentation. Answers in seconds to about a minute; if a data source stalls it returns a signed partial result (partial, missing) that names what was not read instead of timing out. Not financial advice.

What you get

Stops a yield router from sizing a withdrawal the vault cannot honor, and flags vaults whose docs promise liquidity the contract does not provide.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/vault-exit. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/vault-exit \
  -H 'content-type: application/json' \
  -d '{"chain":"ethereum","vault":"0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB","exit":{"shares":"1000000000000000000000"}}'

Input

FieldTypeRequiredDescription
chainstring; one of "ethereum", "base", "polygon", "arbitrum", "optimism"yesChain the vault lives on.
vaultstringyesERC-4626 or ERC-7540 vault address.
exitobjectyesExactly one of shares or assets, as base-unit integer strings. shares may be "max" (needs holder).
holderstringnoAddress that holds the shares. Enables an exact eth_call redeem simulation and per-holder limits.
docsUrlsarray<string; length 0..2000>; max 4 itemsnoPublic documentation pages whose redemption claims are checked against the contract.

Example request body

{
  "chain": "ethereum",
  "vault": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB",
  "exit": {
    "shares": "1000000000000000000000"
  }
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
chainstringno
vaultstringno
block_numberintegerno
block_timestampintegerno
verdictstring; one of "EXIT_NOW_FULL", "EXIT_PARTIAL", "QUEUED", "BLOCKED", "UNKNOWN"no
confidencestring; one of "high", "medium", "low"noLowered one level when the result is partial or the docs check is incomplete.
summarystringnoOne-sentence decision with the amount that can leave now and the critical admin-flag count.
next_stepstringnoConcrete action for the caller given the verdict.
verdict_reasonsarray<string>no
partialbooleannoTrue when the time budget ended a stage early; missing says which.
missingarray<object>noStages the time budget cut off and what each gap means for the result.
time_budgetobjectnobudget_ms and elapsed_ms for this request.
vault_infoobjectnoName, asset, decimals, totals, and vault-type specifics (MetaMorpho, Yearn v3, Euler v2, ERC-7540).
requestobjectnoResolved exit in shares with fair (convertToAssets) and quoted (previewRedeem) values.
holderone ofno
exitable_nowobjectnoassets, shares, basis (simulation | liquidity_pool | claimable_queue | ...).
haircutobjectnofee_haircut_bps = price haircut vs convertToAssets; undeliverable_now_bps = share of the exit that cannot leave this block; effective_haircut_bps (null when QUEUED, which is delay not loss).
partial_exit_maxobjectnoLargest exit that works now (shares, assets, method, resolution_shares).
time_to_full_exitobjectnokind, seconds (null when the contract states no schedule), basis.
liquidityobjectnoPool assets, coverage_ratio, per-market (Morpho Blue) or per-strategy (Yearn) withdrawable amounts.
simulationone ofno
adminobjectno
unknownsarray<string>no
what_would_change_verdictarray<string>no
docs_analysisobjectnoClaims with verified quotes, contradictions with severity (ensemble plus adversarial review), confidence.

Pay and connect

Available through: x402 (USDC on Base), MCP, RapidAPI.

Machine-readable