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

# The herding toll

> What a goat pays when it is bound and when it is brought in, and how the goat lane works.

## What you pay

1. **At the bind to Grazing**, each goat pays the toll once (the Grazing toll), in CSM from your wallet. That CSM is burned out of supply.
2. **That goat's first Bring In** has no toll.
3. **Every later Bring In** pays the toll, taken from the Barn's balance first. That CSM is burned out of supply too.

A bind straight into a Barn pays only one toll: the Bring In toll.

## How the toll is worked out

**Toll = rate x the goat's In Barn weight x reference**, rounded up, in CSM.

A bind to Grazing is also priced on the In Barn weight, at the roll currently in force. A bind of several goats pays the sum of their tolls.

**The reference** is the highest of these four:

* the Permit floor,
* the middle of the last two sold Permit [closes](https://docs.cashmere.exchange/mountain/auctions.md#a-permit-roll),
* the Raising price,
* 10 days of one stall's Forage.

The reference is fixed when a [Permit roll](https://docs.cashmere.exchange/mountain/auctions.md#a-permit-roll) opens, so the toll changes every 12 hours. It falls when more weight joins and when the Season drops.

**The rate** is 1. At launch settings, it drops to 0.5 when the toll is low in ETH terms:

* Take the highest of the Permit floor, the Raising price and the lower of the last two sold closes.
* Price that in ETH at the pool's time-weighted average price.
* If it stays at or below 0.25 ETH for 2 full days, the rate is 0.5. From the first roll where it is above that, the rate is 1 again.
* If there is no average price to read, the rate stays as it is.

### A worked example

On roll 1, at rate 1, the reference is 35 days of one stall's Forage. This is a worked example, not a predicted outcome:

| Goat | In Barn weight | Toll at roll 1 | Toll at the lowest reference |
| - | - | - | - |
| Intern | 0.18 | 6.3 days of one stall's Forage | 1.8 days |
| King | 1.296 | 45.36 days | 12.96 days |

## Your limit

A Bring In is paid for by the wallet that holds both the Deed and the Bell: from the Barn's balance first, then from that wallet if you choose. A bind to Grazing is paid from your wallet only, after you allow the Ledger to take the total. A bind straight into a Barn is paid like a Bring In: from the Barn's balance first, then from your wallet.

Every bind and Bring In carries the highest toll you accept and a deadline. If the toll is above that limit, or the deadline has passed, the transaction fails and only gas is spent.

The deadline of a bind is the end of the current Permit roll. The page shows it to the second, in UTC. If your bind lands after the deadline, it fails and only gas is spent. Check the new toll and send again.

If a Permit roll is due, it opens with your transaction, so the toll can differ from the one you saw. A bind pays at most the quote you approved. No bind or Bring In pays more than your highest toll.

If a Trek has ended and is not settled, the app asks you to send the settlement first, as its own transaction. Settling takes nothing from your wallet. Only gas is spent.

When a bind fails, the app says why:

* **The quote expired**: the roll ended before your bind landed.
* **The toll changed with the new roll**: a new roll opened with a new toll.
* **The toll rose before your bind landed**: a setting changed during the roll.
* **Mountain could not price this goat**: the goat was not counted as Grazing when its toll was worked out.

Each message ends with: "No goat was bound and no CSM was spent; only gas was spent."

## What never comes back

The toll is never paid back, whether at Turn Out, at a cash-out or when the goat never comes In Barn. A first Bring In that has been used never comes back through a Turn Out, a Deed move or a Barn closing. A goat that is cashed out before its first Bring In gives up that Bring In with no toll.

## What Bring In needs

* A Grazing goat and an empty stall in your own Barn. You must hold the Deed and the goat's Bell.
* Room among the Barn's 3 new stalls for the current 24-hour window.
* Room in the goat lane.
* Fewer than 9 goats in the Barn, at launch settings.

A Bring In with no toll still needs all of these.

## The goat lane

Goats and Permits share the day's count. Goat weight brought In Barn lowers the number of Permits offered, and a goat that is turned out gives room back later.

| When | The lane, over a trailing 24 hours | Per Barn, per roll |
| - | - | - |
| Raising Week, the first 14 rolls | Whichever is lower: the day's count less 5, or half of the day's count. At most half of that in one roll | One Bring In |
| After Raising Week | Half of the day's count at launch settings (5 stalls' weight a day while the level is 10 and the Season 1.00) | The first always fits. A later one fits only while the Barn's total for that roll, including the first, stays within the larger of 1.296 (one King's In Barn weight) and 10% of the roll's lane |

When the lane is full, Bring In fails with "lane full" and only gas is spent. Try again in a later roll.

The value of one stall's day of Forage changes over time, so the same number of days can mean a different amount of CSM. More on [Risks](https://docs.cashmere.exchange/mountain/risks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.