> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exponent.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Modify Market

> Low-level instruction to update tranching market configuration

# createModifyMarketInstruction

Builds a raw instruction that updates optional market configuration fields.

## Usage

```typescript theme={null}
import { createModifyMarketInstruction } from "@exponent-labs/exponent-sdk/client/tranching";

const ix = createModifyMarketInstruction(
  {
    authority: admin.publicKey,
    market: marketAddress,
    returnModelStorage,
    addressLookupTable,
    syProgram,
    adminState,
    systemProgram,
  },
  {
    riskConfig: null,
    protocolFeeConfig: null,
    returnModel: null,
    syCpiAccounts: null,
    addressLookupTable: null,
    roles: null,
    maxSeniorLpSupply: null,
    maxJuniorLpSupply: null,
    seniorLpMetadata: null,
    juniorLpMetadata: null,
  }
);
```

## Accounts

| Name                 | Type        | Signer | Writable | Description                         |
| -------------------- | ----------- | ------ | -------- | ----------------------------------- |
| `authority`          | `PublicKey` | Yes    | Yes      | Market admin authority              |
| `market`             | `PublicKey` | No     | Yes      | Tranching market account            |
| `returnModelStorage` | `PublicKey` | No     | Yes      | Return model storage account        |
| `addressLookupTable` | `PublicKey` | No     | No       | Current or new address lookup table |
| `syProgram`          | `PublicKey` | No     | No       | Linked SY program                   |
| `adminState`         | `PublicKey` | No     | No       | Exponent admin state                |
| `systemProgram`      | `PublicKey` | No     | No       | System program                      |

## Args

All args are optional. Pass `null` to leave a field unchanged.

| Name                 | Type                                 | Description                             |
| -------------------- | ------------------------------------ | --------------------------------------- |
| `riskConfig`         | `TranchingRiskConfig \| null`        | New risk config                         |
| `protocolFeeConfig`  | `TranchingProtocolFeeConfig \| null` | New protocol fee config                 |
| `returnModel`        | `TrancheReturnModelUpdate \| null`   | New return model or curve point updates |
| `syCpiAccounts`      | `CpiAccounts \| null`                | New SY CPI account indexes              |
| `addressLookupTable` | `PublicKey \| null`                  | New address lookup table                |
| `roles`              | `TranchingMarketRoles \| null`       | New admin and sentinel role lists       |
| `maxSeniorLpSupply`  | `u64 \| null`                        | New Senior LP supply cap                |
| `maxJuniorLpSupply`  | `u64 \| null`                        | New Junior LP supply cap                |
| `seniorLpMetadata`   | `LpTokenMetadata \| null`            | Senior LP token metadata update         |
| `juniorLpMetadata`   | `LpTokenMetadata \| null`            | Junior LP token metadata update         |

## Returns

`TransactionInstruction` - a transaction instruction ready to be added to a transaction.
