> For the complete documentation index, see [llms.txt](https://docs.upshift.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.upshift.finance/upshift-vault-curation/reference-smart-contract-interface.md).

# Reference: Smart Contract Interface

Every function on the vault contract that touches curator workflows, grouped by job, with the role that calls it.

Admin functions are gated to the owner multisig or operator; attempting them from a curator-managed address reverts.

## Capital Movement (Vault ↔ Subaccount)

| Function                                                         | Caller   | Purpose and notes                                                                                                      |
| ---------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| `depositToSubaccount(uint256 amount, address subAccountAddr)`    | Operator | Transfers vault assets to a whitelisted subaccount. This is the only road capital takes toward the curator’s strategy. |
| `withdrawFromSubaccount(uint256 amount, address subAccountAddr)` | Operator | Pulls assets from the subaccount back into the vault — used to refill the buffer and fund epoch settlements.           |

## NAV and Accounting

| Function                                          | Caller        | Purpose and notes                                                                                                                                                                               |
| ------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `updateTotalAssets(uint256 externalAssetsAmount)` | Operator      | Syncs the vault’s internal accounting with the externally calculated value of deployed positions. This is what moves the share price. Bounded by the max-percentage-change guardrail (§8, §10). |
| `updateMaxChangePercent(uint256 newValue)`        | Owner         | Sets the ceiling/floor on share-price movement per update cycle (NAV volatility protection).                                                                                                    |
| `totalAssets()` , `totalSupply()`                 | Anyone (view) | Current accounting state; share price = totalAssets / totalSupply.                                                                                                                              |

## Redemption Processing

| Function                                                                             | Caller        | Purpose and notes                                                                                          |
| ------------------------------------------------------------------------------------ | ------------- | ---------------------------------------------------------------------------------------------------------- |
| `processAllClaimsByDate(uint256 year, uint256 month, uint256 day, uint256 maxLimit)` | Anyone        | Batch-settles all scheduled redemptions for a given epoch date.                                            |
| `updateTimelockDuration(uint256 newDuration)`                                        | Owner         | Changes the lag between requestRedeem and claim. Subject to the 24h timelock on withdrawal-period changes. |
| `getWithdrawalEpoch()`                                                               | Anyone (view) | Current epoch boundaries — poll this to plan unwinds.                                                      |

## Fee Management

| Function                                               | Caller   | Purpose and notes                                                      |
| ------------------------------------------------------ | -------- | ---------------------------------------------------------------------- |
| `chargeManagementFee()`                                | Operator | Triggers fee accrual against TVL. Emits ManagementFeeCharged(uint256). |
| `collectFees()`                                        | Operator | Sweeps accrued fees to the fee collector address.                      |
| `updateManagementFee(uint256 newManagementFeePercent)` | Owner    | Changes the management fee. Fee changes sit behind a 24h timelock.     |
| `updateWithdrawalFee(uint256 newWithdrawalFee)`        | Owner    | Standard withdrawal fee percentage.                                    |
| `updateInstantRedemptionFee(uint256 newFee)`           | Owner    | Fee charged on the instantRedeem path.                                 |
| `updateFeeCollector(address newFeeCollectorAddr)`      | Owner    | Where collected fees land.                                             |

## Limits, Pausing, and Emergency

| Function                                                                             | Caller | Purpose and notes                                                                          |
| ------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------------------------------ |
| `updateIssuanceLimits(uint256 maxDeposit, uint256 maxWithdrawal, uint256 maxSupply)` | Owner  | Caps on deposits, withdrawals, and total share supply — the lever for capacity management. |
| `pauseDepositsAndWithdrawals(bool bPauseDeposits, bool bPauseWithdrawals)`           | Owner  | Pause/resume either side independently. Emits DepositWithdrawalStatusChanged.              |
| `emergencyWithdraw(IERC20 token, address destinationAddr)`                           | Owner  | Emergency sweep of tokens to a safe destination.                                           |

## User-facing Functions

Curators rarely call these, but depositor behavior drives liquidity planning, so the flows must be understood:

| Function                                                                  | Caller                               | Purpose and notes                                                              |
| ------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------ |
| `deposit(uint256 assets, address receiver)`                               | User/custodian                       | Deposit underlying assets; returns shares minted.                              |
| `requestRedeem(uint256 shares, address receiverAddr, address holderAddr)` | User/custodian                       | Starts the epoch redemption flow; returns assets owed and the claimable epoch. |
| `claim(uint256 year, uint256 month, uint256 day, address receiverAddr)`   | Anyone (for the registered receiver) | Completes a matured redemption; returns assetsClaimed and sharesBurned.        |
| `instantRedeem(uint256 shares, address receiverAddr, address holderAddr)` | User/custodian                       | Immediate exit, fee applies, served from the buffer.                           |
| `previewDeposit` , `previewRedeem` , `previewInstantRedemption`           | Anyone (view)                        | Simulation surfaces for frontends and reconciliation.                          |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.upshift.finance/upshift-vault-curation/reference-smart-contract-interface.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
