# SiloRepository

> SiloRepository

SiloRepository handles the creation and configuration of Silos.

*Stores configuration for each asset in each silo. Each asset in each Silo starts with a default config can later be changed by the contract owner. Stores registry of Factory contracts that deploy different versions of Silos. It is possible to have multiple versions/implementations of Silo and use different versions for different tokens. For example, one version can be used for UNI (ERC20) and the other can be used for UniV3LP tokens (ERC721). Manages bridge assets. Each Silo can have 1 or more bridge assets. New Silos are created with all currently active bridge assets. Silos that are already developed must synchronize bridge assets. Sync can be done by anyone, function has public access. Is a single source of truth for other contract addresses.*

## Methods

### acceptOwnership

```solidity
function acceptOwnership() external nonpayable
```

*Transfers ownership of the contract to a pending owner Can only be called by the pending owner.*

### addBridgeAsset

```solidity
function addBridgeAsset(address _newBridgeAsset) external nonpayable
```

Adds new bridge asset

*New bridge asset must be unique. Duplicates in bridge assets are not allowed. It's possible to add bridge asset that has been removed in the past. Note that all Silos must be synced manually. Callable only by owner.*

#### Parameters

| Name             | Type    | Description          |
| ---------------- | ------- | -------------------- |
| \_newBridgeAsset | address | bridge asset address |

### assetConfigs

```solidity
function assetConfigs(address, address) external view returns (uint64 maxLoanToValue, uint64 liquidationThreshold, contract IInterestRateModel interestRateModel)
```

*maps silo => asset => config*

#### Parameters

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |
| \_1  | address | undefined   |

#### Returns

| Name                 | Type                        | Description |
| -------------------- | --------------------------- | ----------- |
| maxLoanToValue       | uint64                      | undefined   |
| liquidationThreshold | uint64                      | undefined   |
| interestRateModel    | contract IInterestRateModel | undefined   |

### bridgePool

```solidity
function bridgePool() external view returns (address)
```

*Silo for bridge asset. We can have only one bridge pool*

#### Returns

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

### defaultAssetConfig

```solidity
function defaultAssetConfig() external view returns (uint64 maxLoanToValue, uint64 liquidationThreshold, contract IInterestRateModel interestRateModel)
```

*Default values for AssetConfig. Used if values are not configured manually.*

#### Returns

| Name                 | Type                        | Description |
| -------------------- | --------------------------- | ----------- |
| maxLoanToValue       | uint64                      | undefined   |
| liquidationThreshold | uint64                      | undefined   |
| interestRateModel    | contract IInterestRateModel | undefined   |

### ensureCanCreateSiloFor

```solidity
function ensureCanCreateSiloFor(address _asset, bool _assetIsABridge) external view
```

*checks all conditions for new silo creation and throws when not possible to create*

#### Parameters

| Name             | Type    | Description                                                   |
| ---------------- | ------- | ------------------------------------------------------------- |
| \_asset          | address | address of asset for which you want to create silo            |
| \_assetIsABridge | bool    | bool TRUE when `_asset` is bridge asset, FALSE when it is not |

### entryFee

```solidity
function entryFee() external view returns (uint256)
```

*Get protocol fee for opening a borrow position*

#### Returns

| Name | Type    | Description                                                      |
| ---- | ------- | ---------------------------------------------------------------- |
| \_0  | uint256 | fee in precision points (BaseSilo.PRECISION\_DECIMALS() == 100%) |

### fees

```solidity
function fees() external view returns (uint64 entryFee, uint64 protocolShareFee, uint64 protocolLiquidationFee)
```

#### Returns

| Name                   | Type   | Description |
| ---------------------- | ------ | ----------- |
| entryFee               | uint64 | undefined   |
| protocolShareFee       | uint64 | undefined   |
| protocolLiquidationFee | uint64 | undefined   |

### getBridgeAssets

```solidity
function getBridgeAssets() external view returns (address[])
```

Get current bridge assets

*Keep in mind that not all Silos may be synced with current bridge assets so it's possbile that some assets in that list are not part of given Silo.*

#### Returns

| Name | Type       | Description                    |
| ---- | ---------- | ------------------------------ |
| \_0  | address\[] | address array of bridge assets |

### getInterestRateModel

```solidity
function getInterestRateModel(address _silo, address _asset) external view returns (contract IInterestRateModel model)
```

Get Interest Rate Model address for asset in given Silo

*If dedicated config is not set, method returns default config*

#### Parameters

| Name    | Type    | Description         |
| ------- | ------- | ------------------- |
| \_silo  | address | address of Silo     |
| \_asset | address | address of an asset |

#### Returns

| Name  | Type                        | Description                    |
| ----- | --------------------------- | ------------------------------ |
| model | contract IInterestRateModel | address of interest rate model |

### getLiquidationThreshold

```solidity
function getLiquidationThreshold(address _silo, address _asset) external view returns (uint256)
```

Get liquidation threshold for asset in given Silo

*If dedicated config is not set, method returns default config*

#### Parameters

| Name    | Type    | Description         |
| ------- | ------- | ------------------- |
| \_silo  | address | address of Silo     |
| \_asset | address | address of an asset |

#### Returns

| Name | Type    | Description                                                                |
| ---- | ------- | -------------------------------------------------------------------------- |
| \_0  | uint256 | liquidation threshold in precision points (BaseSilo.PRECISION\_DECIMALS()) |

### getMaxSiloDeposits

```solidity
function getMaxSiloDeposits(address _silo, address _asset) external view returns (uint256)
```

Gets deposit limit for Silo

#### Parameters

| Name    | Type    | Description                         |
| ------- | ------- | ----------------------------------- |
| \_silo  | address | Silo address for which to set limit |
| \_asset | address | Silo asset for which to set limit   |

#### Returns

| Name | Type    | Description            |
| ---- | ------- | ---------------------- |
| \_0  | uint256 | deposit limit for Silo |

### getMaximumLTV

```solidity
function getMaximumLTV(address _silo, address _asset) external view returns (uint256)
```

Get maximum LTV for asset in given Silo

*If dedicated config is not set, method returns default config*

#### Parameters

| Name    | Type    | Description         |
| ------- | ------- | ------------------- |
| \_silo  | address | address of Silo     |
| \_asset | address | address of an asset |

#### Returns

| Name | Type    | Description                                                      |
| ---- | ------- | ---------------------------------------------------------------- |
| \_0  | uint256 | maximum LTV in precision points (BaseSilo.PRECISION\_DECIMALS()) |

### getNotificationReceiver

```solidity
function getNotificationReceiver(address) external view returns (contract INotificationReceiver)
```

*Maps Silo address to incentive contract that will distribute rewards for that Silo*

#### Parameters

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### Returns

| Name | Type                           | Description |
| ---- | ------------------------------ | ----------- |
| \_0  | contract INotificationReceiver | undefined   |

### getRemovedBridgeAssets

```solidity
function getRemovedBridgeAssets() external view returns (address[])
```

Get removed bridge assets

*Keep in mind that not all Silos may be synced with bridge assets so it's possbile that some assets in that list are still part of given Silo.*

#### Returns

| Name | Type       | Description                    |
| ---- | ---------- | ------------------------------ |
| \_0  | address\[] | address array of bridge assets |

### getSilo

```solidity
function getSilo(address) external view returns (address)
```

*maps token address to silo address, asset => silo*

#### Parameters

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### Returns

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

### isPaused

```solidity
function isPaused() external view returns (bool globalPause)
```

#### Returns

| Name        | Type | Description |
| ----------- | ---- | ----------- |
| globalPause | bool | undefined   |

### isSilo

```solidity
function isSilo(address _silo) external view returns (bool)
```

Check if contract address is a Silo deployment

#### Parameters

| Name   | Type    | Description              |
| ------ | ------- | ------------------------ |
| \_silo | address | address of expected Silo |

#### Returns

| Name | Type | Description                                         |
| ---- | ---- | --------------------------------------------------- |
| \_0  | bool | true if address is Silo deployment, otherwise false |

### isSiloPaused

```solidity
function isSiloPaused(address _silo, address _asset) external view returns (bool)
```

Check given asset in a Silo is paused

#### Parameters

| Name    | Type    | Description         |
| ------- | ------- | ------------------- |
| \_silo  | address | address of Silo     |
| \_asset | address | address of an asset |

#### Returns

| Name | Type | Description                                              |
| ---- | ---- | -------------------------------------------------------- |
| \_0  | bool | true if given asset in a Silo is paused, otherwise false |

### maxLiquidity

```solidity
function maxLiquidity() external view returns (bool globalToggle, uint256 defaultMaxLiquidity)
```

#### Returns

| Name                | Type    | Description |
| ------------------- | ------- | ----------- |
| globalToggle        | bool    | undefined   |
| defaultMaxLiquidity | uint256 | undefined   |

### newSilo

```solidity
function newSilo(address _siloAsset, uint128 _siloVersion, bytes _siloData) external nonpayable
```

use this method only when off-chain verification is OFF

*Silo does NOT support rebase and deflationary tokens*

#### Parameters

| Name          | Type    | Description                                             |
| ------------- | ------- | ------------------------------------------------------- |
| \_siloAsset   | address | silo asset                                              |
| \_siloVersion | uint128 | version of silo implementation                          |
| \_siloData    | bytes   | (optional) data that may be needed during silo creation |

### owner

```solidity
function owner() external view returns (address)
```

Get owner role address of Repository

#### Returns

| Name | Type    | Description        |
| ---- | ------- | ------------------ |
| \_0  | address | owner role address |

### pendingOwner

```solidity
function pendingOwner() external view returns (address)
```

*Returns the address of the pending owner.*

#### Returns

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

### priceProvidersRepository

```solidity
function priceProvidersRepository() external view returns (contract IPriceProvidersRepository)
```

*PriceProvidersRepository contract that manages ProceProviders implementations and is an entry point for reading prices for Silos.*

#### Returns

| Name | Type                               | Description |
| ---- | ---------------------------------- | ----------- |
| \_0  | contract IPriceProvidersRepository | undefined   |

### protocolLiquidationFee

```solidity
function protocolLiquidationFee() external view returns (uint256)
```

*Get protocol liquidation fee*

#### Returns

| Name | Type    | Description                                                                           |
| ---- | ------- | ------------------------------------------------------------------------------------- |
| \_0  | uint256 | protocol liquidation fee in precision points (BaseSilo.PRECISION\_DECIMALS() == 100%) |

### protocolShareFee

```solidity
function protocolShareFee() external view returns (uint256)
```

*Get protocol share fee*

#### Returns

| Name | Type    | Description                                                                     |
| ---- | ------- | ------------------------------------------------------------------------------- |
| \_0  | uint256 | protocol share fee in precision points (BaseSilo.PRECISION\_DECIMALS() == 100%) |

### registerSiloVersion

```solidity
function registerSiloVersion(contract ISiloFactory _factory, bool _isDefault) external nonpayable
```

Registers new Silo version

*User can choose which Silo version he wants to deploy. It's possible to have multiple versions of Silo. Callable only by owner.*

#### Parameters

| Name        | Type                  | Description                                       |
| ----------- | --------------------- | ------------------------------------------------- |
| \_factory   | contract ISiloFactory | factory contract that deploys new version of Silo |
| \_isDefault | bool                  | true if this version should be used as default    |

### removeBridgeAsset

```solidity
function removeBridgeAsset(address _bridgeAssetToRemove) external nonpayable
```

Removes bridge asset

*Note that all Silos must be synced manually. Callable only by owner.*

#### Parameters

| Name                  | Type    | Description                        |
| --------------------- | ------- | ---------------------------------- |
| \_bridgeAssetToRemove | address | bridge asset address to be removed |

### renounceOwnership

```solidity
function renounceOwnership() external nonpayable
```

*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.*

### replaceSilo

```solidity
function replaceSilo(address _siloAsset, uint128 _siloVersion, bytes _siloData) external nonpayable
```

use this method to deploy new version of Silo for an asset that already has Silo deployed. Only owner (DAO) can replace.

*Silo does NOT support rebase and deflationary tokens*

#### Parameters

| Name          | Type    | Description                                                                               |
| ------------- | ------- | ----------------------------------------------------------------------------------------- |
| \_siloAsset   | address | silo asset                                                                                |
| \_siloVersion | uint128 | version of silo implementation. Use 0 for default version which is fine for 99% of cases. |
| \_siloData    | bytes   | (optional) data that may be needed during silo creation                                   |

### router

```solidity
function router() external view returns (address)
```

*SiloRouter utility contract that combines number of actions (Deposit, Withdraw, Borrow, Repay) for batch execution in single transaction.*

#### Returns

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

### setAssetConfig

```solidity
function setAssetConfig(address _silo, address _asset, ISiloRepository.AssetConfig _assetConfig) external nonpayable
```

Set configuration for given asset in given Silo

*Callable only by owner*

#### Parameters

| Name          | Type                        | Description                                                                                                                                                                                                                                                                                                                  |
| ------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_silo        | address                     | Silo address for which config applies                                                                                                                                                                                                                                                                                        |
| \_asset       | address                     | asset address for which config applies                                                                                                                                                                                                                                                                                       |
| \_assetConfig | ISiloRepository.AssetConfig | : - \_maxLoanToValue maximum Loan-to-Value, for detailes see `Repository.AssetConfig.maxLoanToValue` - \_liquidationThreshold liquidation threshold, for detailes see `Repository.AssetConfig.maxLoanToValue` - \_interestRateModel interest rate model address, for detailes see `Repository.AssetConfig.interestRateModel` |

### setDefaultInterestRateModel

```solidity
function setDefaultInterestRateModel(contract IInterestRateModel _defaultInterestRateModel) external nonpayable
```

Set default interest rate model

*Callable only by owner*

#### Parameters

| Name                       | Type                        | Description                 |
| -------------------------- | --------------------------- | --------------------------- |
| \_defaultInterestRateModel | contract IInterestRateModel | default interest rate model |

### setDefaultLiquidationThreshold

```solidity
function setDefaultLiquidationThreshold(uint64 _defaultLiquidationThreshold) external nonpayable
```

Set default liquidation threshold

*Callable only by owner*

#### Parameters

| Name                          | Type   | Description                                                                        |
| ----------------------------- | ------ | ---------------------------------------------------------------------------------- |
| \_defaultLiquidationThreshold | uint64 | default liquidation threshold in precision points (BaseSilo.PRECISION\_DECIMALS()) |

### setDefaultMaximumLTV

```solidity
function setDefaultMaximumLTV(uint64 _defaultMaxLTV) external nonpayable
```

Set default maximum LTV

*Callable only by owner*

#### Parameters

| Name            | Type   | Description                                                              |
| --------------- | ------ | ------------------------------------------------------------------------ |
| \_defaultMaxLTV | uint64 | default maximum LTV in precision points (BaseSilo.PRECISION\_DECIMALS()) |

### setDefaultSiloMaxDepositsLimit

```solidity
function setDefaultSiloMaxDepositsLimit(uint256 _maxDeposits) external nonpayable
```

Sets default deposit limit for all Silos

#### Parameters

| Name          | Type    | Description                 |
| ------------- | ------- | --------------------------- |
| \_maxDeposits | uint256 | deposit limit amount in ETH |

### setDefaultSiloVersion

```solidity
function setDefaultSiloVersion(uint128 _defaultVersion) external nonpayable
```

Set default Silo version

*Callable only by owner.*

#### Parameters

| Name             | Type    | Description                       |
| ---------------- | ------- | --------------------------------- |
| \_defaultVersion | uint128 | Silo version to be set as default |

### setFees

```solidity
function setFees(ISiloRepository.Fees _fees) external nonpayable
```

Set default fees

*Callable only by owner*

#### Parameters

| Name   | Type                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------ | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_fees | ISiloRepository.Fees | : - \_entryFee one time protocol fee for opening a borrow position in precision points (BaseSilo.PRECISION\_DECIMALS()) - \_protocolShareFee protocol revenue share in interest paid in precision points (BaseSilo.PRECISION\_DECIMALS()) - \_protocolLiquidationFee protocol share in liquidation profit in precision points (BaseSilo.PRECISION\_DECIMALS()). It's calculated from total collateral amount to be transferred to liquidator. |

### setGlobalPause

```solidity
function setGlobalPause(bool _globalPause) external nonpayable
```

Pause all Silos

*Callable only by owner.*

#### Parameters

| Name          | Type | Description                              |
| ------------- | ---- | ---------------------------------------- |
| \_globalPause | bool | true to pause all Silos, otherwise false |

### setNotificationReceiver

```solidity
function setNotificationReceiver(address _silo, contract INotificationReceiver _newNotificationReceiver) external nonpayable
```

Set NotificationReceiver contract

*Callable only by owner*

#### Parameters

| Name                      | Type                           | Description                                           |
| ------------------------- | ------------------------------ | ----------------------------------------------------- |
| \_silo                    | address                        | silo address for which to set `_notificationReceiver` |
| \_newNotificationReceiver | contract INotificationReceiver | undefined                                             |

### setPriceProvidersRepository

```solidity
function setPriceProvidersRepository(address _repository) external nonpayable
```

Set price provider repository

*Callable only by owner*

#### Parameters

| Name         | Type    | Description                       |
| ------------ | ------- | --------------------------------- |
| \_repository | address | price provider repository address |

### setRouter

```solidity
function setRouter(address _router) external nonpayable
```

Set router contract

*Callable only by owner*

#### Parameters

| Name     | Type    | Description    |
| -------- | ------- | -------------- |
| \_router | address | router address |

### setSiloMaxDepositsLimit

```solidity
function setSiloMaxDepositsLimit(address _silo, address _asset, uint256 _maxDeposits) external nonpayable
```

Sets deposit limit for Silo

#### Parameters

| Name          | Type    | Description                         |
| ------------- | ------- | ----------------------------------- |
| \_silo        | address | Silo address for which to set limit |
| \_asset       | address | Silo asset for which to set limit   |
| \_maxDeposits | uint256 | deposit limit amount in ETH         |

### setSiloPause

```solidity
function setSiloPause(address _silo, address _asset, bool _pauseValue) external nonpayable
```

Pause single asset in a single Silo

*Callable only by owner.*

#### Parameters

| Name         | Type    | Description                                       |
| ------------ | ------- | ------------------------------------------------- |
| \_silo       | address | address of Silo in which `_asset` is being paused |
| \_asset      | address | address of an asset that is being paused          |
| \_pauseValue | bool    | true to pause, false to unpause                   |

### setTokensFactory

```solidity
function setTokensFactory(address _tokensFactory) external nonpayable
```

Set factory contract for debt and collateral tokens for each Silo asset

*Callable only by owner*

#### Parameters

| Name            | Type    | Description                                                               |
| --------------- | ------- | ------------------------------------------------------------------------- |
| \_tokensFactory | address | address of TokensFactory contract that deploys debt and collateral tokens |

### siloFactory

```solidity
function siloFactory(uint256) external view returns (contract ISiloFactory)
```

*Maps version => ISiloFactory. Versions start at 1 and are incremented by 1.*

#### Parameters

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

#### Returns

| Name | Type                  | Description |
| ---- | --------------------- | ----------- |
| \_0  | contract ISiloFactory | undefined   |

### siloRepositoryPing

```solidity
function siloRepositoryPing() external pure returns (bool)
```

#### Returns

| Name | Type | Description |
| ---- | ---- | ----------- |
| \_0  | bool | undefined   |

### siloReverse

```solidity
function siloReverse(address) external view returns (address)
```

*maps silo address to token address, silo => asset*

#### Parameters

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

#### Returns

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | address | undefined   |

### siloVersion

```solidity
function siloVersion() external view returns (uint128 byDefault, uint128 latest)
```

#### Returns

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| byDefault | uint128 | undefined   |
| latest    | uint128 | undefined   |

### toggleLimitedMaxLiquidity

```solidity
function toggleLimitedMaxLiquidity() external nonpayable
```

Switch to turn on and off limited liquidity

### tokensFactory

```solidity
function tokensFactory() external view returns (contract ITokensFactory)
```

*Factory contracts that deploys debt and collateral tokens for each asset in Silo*

#### Returns

| Name | Type                    | Description |
| ---- | ----------------------- | ----------- |
| \_0  | contract ITokensFactory | undefined   |

### transferOwnership

```solidity
function transferOwnership(address newOwner) external nonpayable
```

*Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.*

#### Parameters

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| newOwner | address | undefined   |

### transferPendingOwnership

```solidity
function transferPendingOwnership(address newPendingOwner) external nonpayable
```

*Transfers pending ownership of the contract to a new account (`newPendingOwner`). Can only be called by the current owner.*

#### Parameters

| Name            | Type    | Description |
| --------------- | ------- | ----------- |
| newPendingOwner | address | undefined   |

### unregisterSiloVersion

```solidity
function unregisterSiloVersion(uint128 _siloVersion) external nonpayable
```

Unregisters Silo version

*Callable only by owner.*

#### Parameters

| Name          | Type    | Description                     |
| ------------- | ------- | ------------------------------- |
| \_siloVersion | uint128 | Silo version to be unregistered |

## Events

### BridgeAssetAdded

```solidity
event BridgeAssetAdded(address newBridgeAsset)
```

Emitted on new bridge asset

#### Parameters

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| newBridgeAsset | address | undefined   |

### BridgeAssetRemoved

```solidity
event BridgeAssetRemoved(address bridgeAssetRemoved)
```

Emitted on removed bridge asset

#### Parameters

| Name               | Type    | Description |
| ------------------ | ------- | ----------- |
| bridgeAssetRemoved | address | undefined   |

### BridgePool

```solidity
event BridgePool(address indexed pool)
```

Emitted when new Silo (or existing one) becomes a bridge pool (pool with only bridge tokens).

#### Parameters

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| pool `indexed` | address | undefined   |

### DefaultSiloMaxDepositsLimitUpdate

```solidity
event DefaultSiloMaxDepositsLimitUpdate(uint256 newMaxDeposits)
```

Emitted when default max liquidity limit is changed

#### Parameters

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| newMaxDeposits | uint256 | undefined   |

### FeeUpdate

```solidity
event FeeUpdate(uint64 newEntryFee, uint64 newProtocolShareFee, uint64 newProtocolLiquidationFee)
```

Emitted when default fee is updated

#### Parameters

| Name                      | Type   | Description |
| ------------------------- | ------ | ----------- |
| newEntryFee               | uint64 | undefined   |
| newProtocolShareFee       | uint64 | undefined   |
| newProtocolLiquidationFee | uint64 | undefined   |

### GlobalPause

```solidity
event GlobalPause(bool globalPause)
```

Emitted when all Silos are paused or unpaused

#### Parameters

| Name        | Type | Description |
| ----------- | ---- | ----------- |
| globalPause | bool | undefined   |

### InterestRateModel

```solidity
event InterestRateModel(contract IInterestRateModel newModel)
```

Emitted when default interest rate model is changed

#### Parameters

| Name     | Type                        | Description |
| -------- | --------------------------- | ----------- |
| newModel | contract IInterestRateModel | undefined   |

### LimitedMaxLiquidityToggled

```solidity
event LimitedMaxLiquidityToggled(bool newLimitedMaxLiquidityState)
```

Emitted when max liquidity toggle is switched

#### Parameters

| Name                        | Type | Description |
| --------------------------- | ---- | ----------- |
| newLimitedMaxLiquidityState | bool | undefined   |

### NewDefaultLiquidationThreshold

```solidity
event NewDefaultLiquidationThreshold(uint64 defaultLiquidationThreshold)
```

#### Parameters

| Name                        | Type   | Description |
| --------------------------- | ------ | ----------- |
| defaultLiquidationThreshold | uint64 | undefined   |

### NewDefaultMaximumLTV

```solidity
event NewDefaultMaximumLTV(uint64 defaultMaximumLTV)
```

#### Parameters

| Name              | Type   | Description |
| ----------------- | ------ | ----------- |
| defaultMaximumLTV | uint64 | undefined   |

### NewSilo

```solidity
event NewSilo(address indexed silo, address indexed asset, uint128 siloVersion)
```

Emitted on new Silo creation

#### Parameters

| Name            | Type    | Description |
| --------------- | ------- | ----------- |
| silo `indexed`  | address | undefined   |
| asset `indexed` | address | undefined   |
| siloVersion     | uint128 | undefined   |

### NotificationReceiverUpdate

```solidity
event NotificationReceiverUpdate(contract INotificationReceiver newIncentiveContract)
```

Emitted on INotificationReceiver address update

#### Parameters

| Name                 | Type                           | Description |
| -------------------- | ------------------------------ | ----------- |
| newIncentiveContract | contract INotificationReceiver | undefined   |

### OwnershipPending

```solidity
event OwnershipPending(address indexed previousOwner, address indexed newOwner)
```

Emitted when ownership transfer is proposed, aka pending owner is set

#### Parameters

| Name                    | Type    | Description |
| ----------------------- | ------- | ----------- |
| previousOwner `indexed` | address | undefined   |
| newOwner `indexed`      | address | undefined   |

### OwnershipTransferred

```solidity
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
```

Emitted when ownership is transferred on `transferOwnership` and `acceptOwnership`

#### Parameters

| Name                    | Type    | Description |
| ----------------------- | ------- | ----------- |
| previousOwner `indexed` | address | undefined   |
| newOwner `indexed`      | address | undefined   |

### PriceProvidersRepositoryUpdate

```solidity
event PriceProvidersRepositoryUpdate(contract IPriceProvidersRepository oldProvider, contract IPriceProvidersRepository newProvider)
```

Emitted on price provider repository address update

#### Parameters

| Name        | Type                               | Description |
| ----------- | ---------------------------------- | ----------- |
| oldProvider | contract IPriceProvidersRepository | undefined   |
| newProvider | contract IPriceProvidersRepository | undefined   |

### RegisterSiloVersion

```solidity
event RegisterSiloVersion(address factory, uint128 siloLatestVersion, uint128 siloDefaultVersion)
```

Emitted when new Silo version is registered

#### Parameters

| Name               | Type    | Description |
| ------------------ | ------- | ----------- |
| factory            | address | undefined   |
| siloLatestVersion  | uint128 | undefined   |
| siloDefaultVersion | uint128 | undefined   |

### RouterUpdate

```solidity
event RouterUpdate(address oldRouter, address newRouter)
```

Emitted on router address update

#### Parameters

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| oldRouter | address | undefined   |
| newRouter | address | undefined   |

### SiloDefaultVersion

```solidity
event SiloDefaultVersion(uint128 oldDefaultVersion, uint128 newDefaultVersion)
```

Emitted when default Silo version is updated

#### Parameters

| Name              | Type    | Description |
| ----------------- | ------- | ----------- |
| oldDefaultVersion | uint128 | undefined   |
| newDefaultVersion | uint128 | undefined   |

### SiloMaxDepositsLimitsUpdate

```solidity
event SiloMaxDepositsLimitsUpdate(address indexed silo, address indexed asset, uint256 newMaxDeposits)
```

Emitted when deposit liquidity limit is changed for Silo and asset

#### Parameters

| Name            | Type    | Description |
| --------------- | ------- | ----------- |
| silo `indexed`  | address | undefined   |
| asset `indexed` | address | undefined   |
| newMaxDeposits  | uint256 | undefined   |

### SiloPause

```solidity
event SiloPause(address silo, address asset, bool pauseValue)
```

Emitted when asingle Silo or single asset in a Silo is paused or unpaused

#### Parameters

| Name       | Type    | Description |
| ---------- | ------- | ----------- |
| silo       | address | undefined   |
| asset      | address | undefined   |
| pauseValue | bool    | undefined   |

### TokensFactoryUpdate

```solidity
event TokensFactoryUpdate(address oldTokensFactory, address newTokensFactory)
```

Emitted on token factory address update

#### Parameters

| Name             | Type    | Description |
| ---------------- | ------- | ----------- |
| oldTokensFactory | address | undefined   |
| newTokensFactory | address | undefined   |

### UnregisterSiloVersion

```solidity
event UnregisterSiloVersion(address factory, uint128 siloVersion)
```

Emitted when Silo version is unregistered

#### Parameters

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| factory     | address | undefined   |
| siloVersion | uint128 | undefined   |

## Errors

### AddressZeroAsInput

```solidity
error AddressZeroAsInput()
```

### AssetIsNotABridge

```solidity
error AssetIsNotABridge()
```

### CanNotRemoveLastBridgeAssets

```solidity
error CanNotRemoveLastBridgeAssets()
```

### InvalidTokenAddress

```solidity
error InvalidTokenAddress()
```

### NoPriceProviderForAsset

```solidity
error NoPriceProviderForAsset()
```

### SiloAlreadyExistsForAsset

```solidity
error SiloAlreadyExistsForAsset()
```

### SiloForBridgeAssetsAlreadyExists

```solidity
error SiloForBridgeAssetsAlreadyExists()
```

### SiloNotAllowedForBridgeAsset

```solidity
error SiloNotAllowedForBridgeAsset()
```

### SiloNotExists

```solidity
error SiloNotExists()
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devdocs.silo.finance/smart-contracts-overview/core-protocol/silorepository.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
