Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions contract/vault/soroban/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ This crate is the Soroban executor layer for the shared vault kernel. It owns:
- RBAC/auth enforcement via `require_auth()` + shared `ActionKind`
- execution of `KernelEffect`s against Soroban token contracts

Governance timelock/orchestration lives in the dedicated `contract/vault/soroban/governance`
contract. The runtime still applies canonical governance state changes. Vault-bound governance
actions cross the contract boundary via `execute_governance(env, caller, payload)`, where the
payload carries a `GovernanceCommand`. `SetTimelock` and `Other` actions stay local to the
governance contract. The generic `execute(payload)` path remains for user flows and for the
retained execute-path config subset (`ALLOCATORS`, `ALLOWED_ADAPTERS`, `VIRTUAL_OFFSETS`).
Comment on lines +15 to +20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove the retained-execute config claim.

The runtime no longer accepts governance/config mutations through execute(payload). Documenting ALLOCATORS, ALLOWED_ADAPTERS, and VIRTUAL_OFFSETS as still reachable on that path will send integrators to a dead entrypoint; these bullets should point only to execute_governance(...).

Also applies to: 76-78

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@contract/vault/soroban/README.md` around lines 15 - 20, The README
incorrectly states that retained-config keys ALLOCATORS, ALLOWED_ADAPTERS, and
VIRTUAL_OFFSETS are reachable via execute(payload); update the text to remove
that claim and instead point integrators to the governance entrypoint
execute_governance(env, caller, payload) (and note that SetTimelock/Other remain
local to the governance contract) so all references to execute(payload) as a
path for config/governance mutations are deleted or replaced accordingly (also
update the repeated text at lines 76-78).


```mermaid
graph TB
subgraph Contract["contract/vault/soroban"]
Expand Down Expand Up @@ -59,6 +66,17 @@ sequenceDiagram
Entry-->>Caller: return result
```

### Governance Control-Plane Boundary

- The governance contract owns proposal submission, timelocks, approval/revocation, and abdication.
- The runtime remains the canonical owner of applied vault config/policy state.
- Vault-bound governance actions cross the boundary through a single bridge:
`execute_governance(env, caller, payload)`. The payload is a `GovernanceCommand` that the
runtime decodes and dispatches to the corresponding internal config/policy/state helpers.
- `execute(payload)` remains for user flows and for the retained execute-path config subset
(`ALLOCATORS`, `ALLOWED_ADAPTERS`, `VIRTUAL_OFFSETS`). Governance never calls `execute`
for vault-bound mutations.

### Soroban-Specific Withdrawal Path

```mermaid
Expand Down
110 changes: 70 additions & 40 deletions contract/vault/soroban/STRIDE.md

Large diffs are not rendered by default.

Loading