# Destinations

Source: https://docs.formance.com/v4.0/modules/numscript/reference/destinations

Stack: v4.0

As with sources, there are several options when it comes to deciding where the funds in a financial transaction should go. The `send` statement provides the following ways of defining destinations:

## Single destination

```numscript
send [COIN 100] (
  source = @world
  destination = @users:001
)
```

## Allocation destinations

Similar to portioned sources, destinations can be defined as a sequence of fractions that splits the monetary value across multiple accounts.

In any case, the summed total of fractions in a block needs to be equal to 1 and the `remaining` keyword can be used to reach that total:

```numscript
send [COIN 100] (
  source = @world
  destination = {
    90/100 to @users:001
    remaining to @fees
  }
)
```

Out of convenience, percentage notation is also available:

```numscript
send [COIN 100] (
  source = @world
  destination = {
    90% to @users:001
    remaining to @fees
  }
)
```

### Kept destinations

Instead of transferring all funds to new accounts, you can keep part of the amount in the source account with the `kept` keyword. It stands in for a destination account inside a block, and pairs naturally with `remaining` to keep whatever is left after the explicit allocations:

```numscript
send [COIN 100] (
  source = @world
  destination = {
    50% to @users:001
    remaining kept
  }
)
```

Here 50% of the amount goes to `users:001` and the remaining 50% stays in `world`. This is useful when you only want to transfer a portion of the funds.

### Ordered destinations with maximum caps

Ordered destinations route funds to multiple accounts in sequence, sending up to a maximum cap to each one before moving on. Any leftover goes to the final `remaining` destination:

```numscript
send [COIN 100] (
  source = @world
  destination = {
    max [COIN 20] to @users:001
    max [COIN 50] to @users:002
    remaining to @users:003
  }
)
```

This sends COIN 20 to `users:001`, COIN 50 to `users:002`, and the remaining COIN 30 to `users:003`.

## Nested destinations

Finally, as with sources, destination blocks can be nested:

```numscript
send [COIN 100] (
  source = @world
  destination = {
    80% to @users:001
    20% to {
      70% to @platform
      15% to @taxes
      remaining to @charity
    }
  }
)
```
