{"id":"vault-exit-lawyer","title":"Vault Exit Lawyer","description":"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.","roi":"Stops a yield router from sizing a withdrawal the vault cannot honor, and flags vaults whose docs promise liquidity the contract does not provide.","audience":"crypto","channels":["x402","mcp","rapidapi"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/vault-exit","path":"/api/v1/vault-exit","contentType":"application/json"},"price":{"amount":"0.25","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["chain","vault","exit"],"properties":{"chain":{"type":"string","enum":["ethereum","base","polygon","arbitrum","optimism"],"description":"Chain the vault lives on."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-4626 or ERC-7540 vault address."},"exit":{"type":"object","additionalProperties":false,"description":"Exactly one of shares or assets, as base-unit integer strings. shares may be \"max\" (needs holder).","properties":{"shares":{"type":"string","pattern":"^([0-9]{1,78}|max)$","description":"Vault shares to redeem (base units), or \"max\" for the holder's whole balance."},"assets":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Underlying assets to receive (base units)."}}},"holder":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address that holds the shares. Enables an exact eth_call redeem simulation and per-holder limits."},"docsUrls":{"type":"array","maxItems":4,"items":{"type":"string","maxLength":2000},"description":"Public documentation pages whose redemption claims are checked against the contract."}}},"resultSchema":{"type":"object","properties":{"chain":{"type":"string"},"vault":{"type":"string"},"block_number":{"type":"integer"},"block_timestamp":{"type":"integer"},"verdict":{"type":"string","enum":["EXIT_NOW_FULL","EXIT_PARTIAL","QUEUED","BLOCKED","UNKNOWN"]},"confidence":{"type":"string","enum":["high","medium","low"],"description":"Lowered one level when the result is partial or the docs check is incomplete."},"summary":{"type":"string","description":"One-sentence decision with the amount that can leave now and the critical admin-flag count."},"next_step":{"type":"string","description":"Concrete action for the caller given the verdict."},"verdict_reasons":{"type":"array","items":{"type":"string"}},"partial":{"type":"boolean","description":"True when the time budget ended a stage early; missing says which."},"missing":{"type":"array","description":"Stages the time budget cut off and what each gap means for the result.","items":{"type":"object","properties":{"stage":{"type":"string","enum":["vault_state","exit_quote","simulation","partial_exit_search","admin_power","docs_check"]},"impact":{"type":"string"}}}},"time_budget":{"type":"object","description":"budget_ms and elapsed_ms for this request."},"vault_info":{"type":"object","description":"Name, asset, decimals, totals, and vault-type specifics (MetaMorpho, Yearn v3, Euler v2, ERC-7540)."},"request":{"type":"object","description":"Resolved exit in shares with fair (convertToAssets) and quoted (previewRedeem) values."},"holder":{"anyOf":[{"type":"object","description":"Holder balance, maxRedeem, maxWithdraw, pending/claimable requests, cooldown. Null when no holder address was given."},{"type":"null"}]},"exitable_now":{"type":"object","description":"assets, shares, basis (simulation | liquidity_pool | claimable_queue | ...)."},"haircut":{"type":"object","description":"fee_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_max":{"type":"object","description":"Largest exit that works now (shares, assets, method, resolution_shares)."},"time_to_full_exit":{"type":"object","description":"kind, seconds (null when the contract states no schedule), basis."},"liquidity":{"type":"object","description":"Pool assets, coverage_ratio, per-market (Morpho Blue) or per-strategy (Yearn) withdrawable amounts."},"simulation":{"anyOf":[{"type":"object","description":"eth_call result of redeem (or requestRedeem for ERC-7540) from the holder. Null without a holder."},{"type":"null"}]},"admin":{"type":"object","properties":{"proxy":{"type":"object"},"controllers":{"type":"array","items":{"type":"object"}},"power":{"type":"object","properties":{"flags":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["info","warn","critical"]},"detail":{"type":"string"}}}}}}}},"unknowns":{"type":"array","items":{"type":"string"}},"what_would_change_verdict":{"type":"array","items":{"type":"string"}},"docs_analysis":{"type":"object","description":"Claims with verified quotes, contradictions with severity (ensemble plus adversarial review), confidence."}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"chain":{"type":"string"},"vault":{"type":"string"},"block_number":{"type":"integer"},"block_timestamp":{"type":"integer"},"verdict":{"type":"string","enum":["EXIT_NOW_FULL","EXIT_PARTIAL","QUEUED","BLOCKED","UNKNOWN"]},"confidence":{"type":"string","enum":["high","medium","low"],"description":"Lowered one level when the result is partial or the docs check is incomplete."},"summary":{"type":"string","description":"One-sentence decision with the amount that can leave now and the critical admin-flag count."},"next_step":{"type":"string","description":"Concrete action for the caller given the verdict."},"verdict_reasons":{"type":"array","items":{"type":"string"}},"partial":{"type":"boolean","description":"True when the time budget ended a stage early; missing says which."},"missing":{"type":"array","description":"Stages the time budget cut off and what each gap means for the result.","items":{"type":"object","properties":{"stage":{"type":"string","enum":["vault_state","exit_quote","simulation","partial_exit_search","admin_power","docs_check"]},"impact":{"type":"string"}}}},"time_budget":{"type":"object","description":"budget_ms and elapsed_ms for this request."},"vault_info":{"type":"object","description":"Name, asset, decimals, totals, and vault-type specifics (MetaMorpho, Yearn v3, Euler v2, ERC-7540)."},"request":{"type":"object","description":"Resolved exit in shares with fair (convertToAssets) and quoted (previewRedeem) values."},"holder":{"anyOf":[{"type":"object","description":"Holder balance, maxRedeem, maxWithdraw, pending/claimable requests, cooldown. Null when no holder address was given."},{"type":"null"}]},"exitable_now":{"type":"object","description":"assets, shares, basis (simulation | liquidity_pool | claimable_queue | ...)."},"haircut":{"type":"object","description":"fee_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_max":{"type":"object","description":"Largest exit that works now (shares, assets, method, resolution_shares)."},"time_to_full_exit":{"type":"object","description":"kind, seconds (null when the contract states no schedule), basis."},"liquidity":{"type":"object","description":"Pool assets, coverage_ratio, per-market (Morpho Blue) or per-strategy (Yearn) withdrawable amounts."},"simulation":{"anyOf":[{"type":"object","description":"eth_call result of redeem (or requestRedeem for ERC-7540) from the holder. Null without a holder."},{"type":"null"}]},"admin":{"type":"object","properties":{"proxy":{"type":"object"},"controllers":{"type":"array","items":{"type":"object"}},"power":{"type":"object","properties":{"flags":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["info","warn","critical"]},"detail":{"type":"string"}}}}}}}},"unknowns":{"type":"array","items":{"type":"string"}},"what_would_change_verdict":{"type":"array","items":{"type":"string"}},"docs_analysis":{"type":"object","description":"Claims with verified quotes, contradictions with severity (ensemble plus adversarial review), confidence."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"chain":"ethereum","vault":"0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB","exit":{"shares":"1000000000000000000000"}},"openapiOperation":{"operationId":"vault_exit_lawyer","summary":"Vault Exit Lawyer","description":"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.\n\nPrice: 0.25 USDC on Base (x402).","x-x402-price-usdc":"0.25","x-x402-amount":"250000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-audience":"crypto","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/vault-exit-lawyer","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["chain","vault","exit"],"properties":{"chain":{"type":"string","enum":["ethereum","base","polygon","arbitrum","optimism"],"description":"Chain the vault lives on."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-4626 or ERC-7540 vault address."},"exit":{"type":"object","additionalProperties":false,"description":"Exactly one of shares or assets, as base-unit integer strings. shares may be \"max\" (needs holder).","properties":{"shares":{"type":"string","pattern":"^([0-9]{1,78}|max)$","description":"Vault shares to redeem (base units), or \"max\" for the holder's whole balance."},"assets":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Underlying assets to receive (base units)."}}},"holder":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address that holds the shares. Enables an exact eth_call redeem simulation and per-holder limits."},"docsUrls":{"type":"array","maxItems":4,"items":{"type":"string","maxLength":2000},"description":"Public documentation pages whose redemption claims are checked against the contract."}}},"example":{"chain":"ethereum","vault":"0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB","exit":{"shares":"1000000000000000000000"}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chain":{"type":"string"},"vault":{"type":"string"},"block_number":{"type":"integer"},"block_timestamp":{"type":"integer"},"verdict":{"type":"string","enum":["EXIT_NOW_FULL","EXIT_PARTIAL","QUEUED","BLOCKED","UNKNOWN"]},"confidence":{"type":"string","enum":["high","medium","low"],"description":"Lowered one level when the result is partial or the docs check is incomplete."},"summary":{"type":"string","description":"One-sentence decision with the amount that can leave now and the critical admin-flag count."},"next_step":{"type":"string","description":"Concrete action for the caller given the verdict."},"verdict_reasons":{"type":"array","items":{"type":"string"}},"partial":{"type":"boolean","description":"True when the time budget ended a stage early; missing says which."},"missing":{"type":"array","description":"Stages the time budget cut off and what each gap means for the result.","items":{"type":"object","properties":{"stage":{"type":"string","enum":["vault_state","exit_quote","simulation","partial_exit_search","admin_power","docs_check"]},"impact":{"type":"string"}}}},"time_budget":{"type":"object","description":"budget_ms and elapsed_ms for this request."},"vault_info":{"type":"object","description":"Name, asset, decimals, totals, and vault-type specifics (MetaMorpho, Yearn v3, Euler v2, ERC-7540)."},"request":{"type":"object","description":"Resolved exit in shares with fair (convertToAssets) and quoted (previewRedeem) values."},"holder":{"anyOf":[{"type":"object","description":"Holder balance, maxRedeem, maxWithdraw, pending/claimable requests, cooldown. Null when no holder address was given."},{"type":"null"}]},"exitable_now":{"type":"object","description":"assets, shares, basis (simulation | liquidity_pool | claimable_queue | ...)."},"haircut":{"type":"object","description":"fee_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_max":{"type":"object","description":"Largest exit that works now (shares, assets, method, resolution_shares)."},"time_to_full_exit":{"type":"object","description":"kind, seconds (null when the contract states no schedule), basis."},"liquidity":{"type":"object","description":"Pool assets, coverage_ratio, per-market (Morpho Blue) or per-strategy (Yearn) withdrawable amounts."},"simulation":{"anyOf":[{"type":"object","description":"eth_call result of redeem (or requestRedeem for ERC-7540) from the holder. Null without a holder."},{"type":"null"}]},"admin":{"type":"object","properties":{"proxy":{"type":"object"},"controllers":{"type":"array","items":{"type":"object"}},"power":{"type":"object","properties":{"flags":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["info","warn","critical"]},"detail":{"type":"string"}}}}}}}},"unknowns":{"type":"array","items":{"type":"string"}},"what_would_change_verdict":{"type":"array","items":{"type":"string"}},"docs_analysis":{"type":"object","description":"Claims with verified quotes, contradictions with severity (ensemble plus adversarial review), confidence."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/vault-exit-lawyer/","docsJson":"https://agents.writerslogic.com/docs/vault-exit-lawyer.json","sample":"https://agents.writerslogic.com/api/v1/samples/vault-exit-lawyer","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}