# EarnShares.toAmountUp

Converts venue shares to a vault share amount at the anchor rate, rounding up.

Mirrors the adapter's ceiling conversion used by exact-asset exits.

## Imports

:::code-group
```ts [Named]
import { EarnShares } from 'ox/tempo'
```

```ts [Entrypoint]
import * as EarnShares from 'ox/tempo/EarnShares'
```
:::

## Examples

```ts twoslash
import { EarnShares } from 'ox/tempo'

const shareAmount = EarnShares.toAmountUp(
  { engineShares: 3n, shareSupply: 2n },
  7n
)
// @log: 5n
```

## Definition

```ts
function toAmountUp(
  anchor: Anchor,
  venueShareAmount: bigint,
): bigint
```

**Source:** [src/tempo/EarnShares.ts](https://github.com/wevm/ox/blob/main/src/tempo/EarnShares.ts#L236)

## Parameters

### anchor

* **Type:** [`Anchor`](/tempo/reference/EarnShares/types#earnsharesanchor)

The conversion anchor.

#### anchor.engineShares

* **Type:** `bigint`

Venue shares held by the engine at the anchor point.

#### anchor.shareSupply

* **Type:** `bigint`

Vault share supply at the anchor point.

### venueShareAmount

* **Type:** `bigint`

Venue share amount, base units.

## Return Type

Vault share amount, rounded up.

`bigint`
