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

# svm venue: huma

> 13 exports of the huma venue integration in @eco-incorp/sauce/svm, including humaLenderStatePda, humaFeeBpsFor, humaFeeAssignLines, HUMA_PROGRAM_ID, HUMA_CURATED_MODE_CONFIGS, HumaFeeTier.

Solana venue integration `huma` under `svm/venues/huma`.

<Note>
  Generated from the type declarations shipped in `@eco-incorp/sauce` 0.99.4. Each entry shows the package authors' JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see [architecture and deployments](/programmable-transactions/sauce/architecture-and-deployments).
</Note>

### `humaLenderStatePda`

*Function* · `sdk/dist/svm/venues/huma/index.d.ts`

PDA(\["lender\_state", modeConfig, lender], HUMA\_PROGRAM\_ID) - a per-(mode,owner) precondition account; see the module doc.

```typescript theme={null}
export declare function humaLenderStatePda(modeConfig: Address, lender: Address): Promise<Address>;
```

### `humaFeeBpsFor`

*Function* · `sdk/dist/svm/venues/huma/index.d.ts`

The tier fee (bps) applying at a given liquid-asset-ratio (bps): the first (smallest threshold) tier the ratio is strictly below; 0 if none match.

```typescript theme={null}
export declare function humaFeeBpsFor(liquidRatioBps: bigint, feeTiers: readonly HumaFeeTier[]): bigint;
```

### `humaFeeAssignLines`

*Function* · `sdk/dist/svm/venues/huma/index.d.ts`

Builds the tiered instant-withdrawal fee lookup as a flat `let` + sequence
of top-level `if` reassignments - NO ternaries (the compiler rejects a
nested/chained ConditionalExpression; see this file's emitQuote doc).
Tiers are ascending by ltBps; checked in DESCENDING order so the LAST if to
fire (the smallest matching threshold - the correct, most-conservative
tier) is the one left standing, reproducing "first ascending match wins"
exactly.

```typescript theme={null}
export declare function humaFeeAssignLines(c: HumaPoolConfig, ratioVar: string, feeVar: string): string[];
```

### `HUMA_PROGRAM_ID`

*Variable* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
HUMA_PROGRAM_ID: Address<"HumaXepHnjaRCpjYTokxY4UtaJcmx41prQ8cxGmFC5fn">
```

### `HUMA_CURATED_MODE_CONFIGS`

*Variable* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
HUMA_CURATED_MODE_CONFIGS: Readonly<Record<string, Address>>
```

### `HumaFeeTier`

*Interface* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
export interface HumaFeeTier {
    ltBps: bigint;
    feeBps: bigint;
}
```

### `HumaPoolConfig`

*Interface* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
export interface HumaPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "deposit" | "withdraw";
    modeConfig: Address;
    poolConfigAccount: Address;
    poolState: Address;
    modeMint: Address;
    poolAuthority: Address;
    poolUnderlyingToken: Address;
    underlyingMint: Address;
    humaConfig: Address;
    poolOwnerTreasuryUnderlyingToken: Address;
    modeAssetsOffset: number;
    liquidAssetsDeployedOffset: number;
    disbursementReserveOffset: number;
    liquidityCap: bigint;
    minDepositAmount: bigint;
    reserveLimit: bigint;
    feeTiers: readonly HumaFeeTier[];
    liquidityDeploymentConfig: Address | null;
    liquidityDeploymentState: Address | null;
}
```

### `huma`

*Variable* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
huma: SvmVenueAdapter
```

### `humaDepositAccounts`

*Function* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
declare function depositAccounts(c: HumaPoolConfig, user: SwapUser): VenueAccount[];
```

### `humaInstantWithdrawAccounts`

*Function* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
declare function instantWithdrawAccounts(c: HumaPoolConfig, user: SwapUser): VenueAccount[];
```

### `humaEncodeDepositData`

*Function* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
declare function encodeDepositData(assets: bigint): Uint8Array;
```

### `humaEncodeInstantWithdrawData`

*Function* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
declare function encodeInstantWithdrawData(shares: bigint): Uint8Array;
```

### `HUMA_MODE_STATE_SIZE`

*Variable* · `sdk/dist/svm/venues/huma/index.d.ts`

```typescript theme={null}
MODE_STATE_SIZE = 216
```
