> ## 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.

# Contracts

> Every Goat LP contract address, what each one does, who controls it, and the contracts Goat LP calls.

<Frame>
  <img src="https://mintcdn.com/cashmerelabs/VaU9JZozZKsaMUY5/images/goat-lp/cover-contracts.png?fit=max&auto=format&n=VaU9JZozZKsaMUY5&q=85&s=76494100522a81e07a405c757bb27e62" alt="Contracts cover: a ledger of contract rows on Robinhood Chain, chain 4663, with the pixel goat." noZoom width="1600" height="640" data-path="images/goat-lp/cover-contracts.png" />
</Frame>

Goat LP runs on Robinhood Chain mainnet, chain ID **4663**. Before you approve or send anything, compare the
address in your wallet with this page. Each address links to the explorer, where its source code is
published.

<Callout type="warning">
  Goat LP is experimental. Use small amounts.
</Callout>

None of these contracts is upgradeable: no proxy, no delegatecall.

## Compounding

| Contract | What it does | Address |
| - | - | - |
| `GoatSelfCompoundor` | One-click compound on Uniswap v3. Takes the NFT, adds the fees back, pays 10% of what was added back, and returns the NFT in the same transaction | [`0x4D0D364EB62be5FcFdc88c56E64ff1eEbaD99DaA`](https://robin.etherscan.io/address/0x4D0D364EB62be5FcFdc88c56E64ff1eEbaD99DaA) |
| `GoatV4Compoundor` | The same on Uniswap v4 | [`0x307db4605691Ca81bAe9DD162de6F8De319224f5`](https://robin.etherscan.io/address/0x307db4605691Ca81bAe9DD162de6F8De319224f5) |
| `GoatPriceAnchor` | The outside price for compounds: Chainlink, or the average price of a deep pool Goat checks against | [`0x5799d99837d2736C6506AD5EE0727968B708A566`](https://robin.etherscan.io/address/0x5799d99837d2736C6506AD5EE0727968B708A566) |
| `GoatAutoCompoundV3` | Auto-compound on v3, through your permission for one position. Can only collect fees, swap part of them and add liquidity back; it cannot remove liquidity | [`0x4A036a2d8FD1d2C0110A9d775ae269fFE6Ea8390`](https://robin.etherscan.io/address/0x4A036a2d8FD1d2C0110A9d775ae269fFE6Ea8390) |
| `GoatAutoCompoundV4` | Auto-compound on v4. Its only power is to send your position to `GoatV4Compoundor` and check it came back | [`0xb0d066E7E9B21c3AbDCe9b26A767155F48Ed0500`](https://robin.etherscan.io/address/0xb0d066E7E9B21c3AbDCe9b26A767155F48Ed0500) |

## Auto-range and auto-exit on Uniswap v3

Revert Finance's AutoRange and AutoExit, with changes for Robinhood Chain only: price checks against an
outside price, re-centring on that price, a fixed 0.15% fee that can only be lowered, and a table of listed
pairs. Revert Finance has not reviewed these versions.

| Contract | What it does | Address |
| - | - | - |
| `AutoRange` | Moves a v3 position when its trigger is hit; the new position goes to the owner | [`0xF0436e6B378e7d4b1Fb17860673C091A32Fb19cD`](https://robin.etherscan.io/address/0xF0436e6B378e7d4b1Fb17860673C091A32Fb19cD) |
| `AutoExit` | Closes a v3 position at your level; everything goes to the owner | [`0xe337A443237a9eA7ED3b0610F70c24c040438161`](https://robin.etherscan.io/address/0xe337A443237a9eA7ED3b0610F70c24c040438161) |
| `GoatPairTable` | Which pairs and fee tiers v3 automation may use, their price sources and swap limits | [`0xbBF00DD403BFf43400ed3D32a29cF4eC580026De`](https://robin.etherscan.io/address/0xbBF00DD403BFf43400ed3D32a29cF4eC580026De) |

## Auto-range and auto-exit on Uniswap v4

| Contract | What it does | Address |
| - | - | - |
| `GoatV4Steward` | Decides: your rule, the price checks, the trigger and the new range | [`0xBb6494D891bd9cCCf11ADd32FD61Afe246164b3d`](https://robin.etherscan.io/address/0xBb6494D891bd9cCCf11ADd32FD61Afe246164b3d) |
| `GoatV4StewardEngine` | Executes. The one contract you allow for v4 auto-range and auto-exit; it takes orders only from the Steward and holds nothing between calls | [`0xD12D46c9d3B1FE463895A20daD19F3cae5584892`](https://robin.etherscan.io/address/0xD12D46c9d3B1FE463895A20daD19F3cae5584892) |
| `GoatV4PairRegistry` | Which v4 pools automation may use, their price sources, and reviewed hooks pinned by code | [`0x92f449da205552Eadbb51C05888EEDE1657B4048`](https://robin.etherscan.io/address/0x92f449da205552Eadbb51C05888EEDE1657B4048) |
| `GoatV4PokeOracle` | Average-price history for listed v4 pools that serve as a pair's price source | [`0xadeA4C7d46a2d3Fb442C4079FC236B262b4b2b50`](https://robin.etherscan.io/address/0xadeA4C7d46a2d3Fb442C4079FC236B262b4b2b50) |
| `GoatV4SourceMeter` | Checks a price source's depth and history when a pool is listed. No owner, no settings | [`0xd7dB57c254eA350215Fb07ab386AA5E909CD7205`](https://robin.etherscan.io/address/0xd7dB57c254eA350215Fb07ab386AA5E909CD7205) |

## What you allow, and to whom

| Automation | Uniswap v3 | Uniswap v4 |
| - | - | - |
| Auto-compound | One position, to `GoatAutoCompoundV3` | One position, to `GoatAutoCompoundV4`, used up by each run |
| Auto-range | One position, to `AutoRange` | One position, to `GoatV4StewardEngine` |
| Auto-exit | One position, to `AutoExit` | One position, to `GoatV4StewardEngine` |
| [Allow for all positions](/goat-lp/allow-for-all-positions) | All v3 positions, to `AutoRange` | All v4 positions, to `GoatV4StewardEngine` |

## Roles

<img className="block dark:hidden" src="https://mintcdn.com/cashmerelabs/VaU9JZozZKsaMUY5/images/goat-lp/diagram-safety-governance-fri-light.png?fit=max&auto=format&n=VaU9JZozZKsaMUY5&q=85&s=9d4a850099697c8aafee081edb3b7b6d" alt="Safety and governance: the owner Safe's wider changes, such as adding a keeper, hook, pair or price source, wait 24 h in public and lapse if not applied within 7 days; removing a keeper and pausing apply at once. The guardian Safe can pause, remove a keeper or narrow at once, and cannot add or unpause. Sentinels watch the keeper keys and can pause auto-range moves and the swaps of auto-range and auto-exit through the guardian Safe; exits that only withdraw still run, exits that swap wait, and sentinels cannot pause compounding or unpause. Nobody can take positions out of your wallet, send outputs elsewhere or raise a contract fee." width="2400" height="1344" data-path="images/goat-lp/diagram-safety-governance-fri-light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/cashmerelabs/VaU9JZozZKsaMUY5/images/goat-lp/diagram-safety-governance-fri-dark.png?fit=max&auto=format&n=VaU9JZozZKsaMUY5&q=85&s=b630febc80075fa1924e0825e07c2877" alt="Safety and governance: the owner Safe's wider changes, such as adding a keeper, hook, pair or price source, wait 24 h in public and lapse if not applied within 7 days; removing a keeper and pausing apply at once. The guardian Safe can pause, remove a keeper or narrow at once, and cannot add or unpause. Sentinels watch the keeper keys and can pause auto-range moves and the swaps of auto-range and auto-exit through the guardian Safe; exits that only withdraw still run, exits that swap wait, and sentinels cannot pause compounding or unpause. Nobody can take positions out of your wallet, send outputs elsewhere or raise a contract fee." width="2400" height="1344" data-path="images/goat-lp/diagram-safety-governance-fri-dark.png" />

| Role | Who | What it can do |
| - | - | - |
| Owner | Cashmere-controlled Safe [`0xA1A286F270aE86D6008B79a48D15AbaC880f64AE`](https://robin.etherscan.io/address/0xA1A286F270aE86D6008B79a48D15AbaC880f64AE) | Add and remove keepers; pause, unpause and retire automation; list pairs, pools, hooks and price sources; lower fees, never raise them; change the fee address; withdraw Cashmere's accrued fees; recover an NFT sent by mistake to a compound contract. Adding a keeper, a reviewed hook, a pair or a price source waits 24 hours in public, and so does unpausing auto-range and auto-exit. Removing a keeper and pausing apply at once. It cannot take positions out of your wallet or redirect your outputs |
| Guardian | Cashmere-controlled Safe [`0x3197767EAcf0Ae281EB661Af3dBa6723B5e181b2`](https://robin.etherscan.io/address/0x3197767EAcf0Ae281EB661Af3dBa6723B5e181b2) | Only pause, remove a keeper (on the v4 auto-range engine it pauses instead), or narrow what automation may do. Cannot add or unpause |
| Keepers | Goat-run bots | Trigger runs and pass the swap details (route, pool or reference price), which the contracts check against their own price source and limits. They receive nothing; Cashmere pays their gas |
| You | The position owner | Turn your own rules on, change or stop them. On v4, `clearConfig` works even when the contract is paused |

## Contracts Goat LP calls but did not write

| Contract | Used for | Address |
| - | - | - |
| Uniswap v3 position manager | v3 positions | [`0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3`](https://robin.etherscan.io/address/0x73991a25C818Bf1f1128dEAaB1492D45638DE0D3) |
| Uniswap v4 position manager | v4 positions | [`0x58daec3116aae6D93017bAAea7749052E8a04fA7`](https://robin.etherscan.io/address/0x58daec3116aae6D93017bAAea7749052E8a04fA7) |
| Uniswap v4 pool manager | v4 pools | [`0x8366a39CC670B4001A1121B8F6A443A643e40951`](https://robin.etherscan.io/address/0x8366a39CC670B4001A1121B8F6A443A643e40951) |
| Uniswap Universal Router | Every swap in the manual tools, and the 0.65% fee | [`0x8876789976dEcBfCbBbe364623C63652db8C0904`](https://robin.etherscan.io/address/0x8876789976dEcBfCbBbe364623C63652db8C0904) |
| Permit2 | Exact-amount, 30-minute token approvals on v4 | [`0x000000000022D473030F116dDEE9F6B43aC78BA3`](https://robin.etherscan.io/address/0x000000000022D473030F116dDEE9F6B43aC78BA3) |
| Revert Finance V3Utils | One-token tools and move range on v3. Deployed and maintained by Revert Finance | [`0x98eC492942090364AC0736Ef1A741AE6C92ec790`](https://robin.etherscan.io/address/0x98eC492942090364AC0736Ef1A741AE6C92ec790) |
| WETH | Wraps the ETH you pay on WETH pairs, inside the Uniswap position manager's transaction (your wallet never calls it directly). An upgradeable bridge token, not WETH9 | [`0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73`](https://robin.etherscan.io/address/0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73) |

On Uniswap v4, every manual action except Compound goes straight to Uniswap's own contracts. Chainlink feeds are listed in
the app.

## Fee address

Every Goat LP fee goes to
[`0x2bf95e5f307FB84e19851865193a14DaB01A561F`](https://robin.etherscan.io/address/0x2bf95e5f307FB84e19851865193a14DaB01A561F).
See [Fees](/goat-lp/fees).

## Licences

Compound contracts, price anchor and v4 automation: MIT. v3 auto-range and auto-exit: derived from Revert
Finance's AutoRange and AutoExit, licence terms in each source file's header; `GoatPairTable` is
GPL-2.0-or-later.


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