Prepare ve-token fee reinvestment
prepare_ve33_reinvestBuild the safe phased workflow for 'reinvest my fees': automatically claim all active voter fees, prepare one exact-input swap per claimed non-stake token, then increase one VeToken or every existing active allocation without changing ownership or replacing votes. phase=swap returns jurisdiction metadata inline on the result and on every child swap; it is not permission to trade. For a nonempty restricted_jurisdictions list, follow its execution_notice before requesting any signature. Phases run in order after each confirms: claim (omit claims to discover every active allocation; keep the pre-claim balance snapshots), swap with only the exact claimed deltas, never a pre-existing balance, then stake_all with the refreshed state_id and the measured STONX output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phase | Yes | ||
| ve_id | No | decimal integer | |
| amount | No | Stake token base units (decimal integer) | |
| claims | No | ||
| sender | Yes | address | |
| source | No | ||
| chain_id | Yes | With ve_token, from get_ve33_allocations (STONX: 4663), not the wallet's chain | |
| ve_token | Yes | address | |
| stake_token | No | address | |
| fee_balances | No | ||
| slippage_bps | No | ||
| current_state_id | No | bytes32 hex | |
| swap_deadline_minutes | No | Ekubo router route deadline; default 30 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phase | No | ||
| jurisdiction | No | jurisdiction metadata (ekubo-token-jurisdictions-v2): coverage, execution_hold, restricted_jurisdictions, per-asset classification | |
| exact_input_full_balance_swaps | No |