bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 9쪽 중 8쪽
></tr></thead><tbody><tr><td>rswETH</td><td><a href="https://etherscan.io/address/0xfae103dc9cf190ed75350761e95403b7b8afa6c0">0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0</a></td></tr><tr><td>rswETH Deposit Manager<br>(Execution client " suggested-fee-receipient")</td><td><a href="https://etherscan.io/address/0x5e6342d8090665be14eeb8154c8a87b7249a4889">0x5e6342D8090665bE14eeB8154c8a87B7249a4889</a></td></tr><tr><td>rswETH Node Operator Registry</td><td><a href="https://etherscan.io/address/0xaae0b305b3f1edde7b11b680d4fa9252f7a1c524">0xAae0B305B3F1edDE7B11b680d4FA9252F7a1c524</a></td></tr><tr><td>EigenPod Address</td><td><a href="https://etherscan.io/address/0x8d0b4dfccc8b2a268486d9754b135d8ad1ee7258">0x8d0B4dfCcc8B2A268486d9754b135d8aD1Ee7258</a></td></tr></tbody></table>
{% endtab %}
{% tab title="Mainnet (BTC Liquid Staking)" %}
| Contract | Address |
| --------------------- | --------------------------------------------------------------------------------------------------------------------- |
| VaultFactory | [0x981771292052c5f77B14A3BD4DF22e43a8B17bB0](https://etherscan.io/address/0x981771292052c5f77b14a3bd4df22e43a8b17bb0) |
| Accountant | [0x48DaCb0b938Aa6D5752ca2ea23CD8593FaFb3825](https://etherscan.io/address/0x48dacb0b938aa6d5752ca2ea23cd8593fafb3825) |
| Keeper | [0xc2a55871a713Fb98A6b60E2e76FC94021c9f182f](https://etherscan.io/address/0xc2a55871a713Fb98A6b60E2e76FC94021c9f182f) |
| ReleaseRegistry | [0x5bd444Ad23E02376F8fbbA47e3CC9D2caDB6c4F6](https://etherscan.io/address/0x5bd444ad23e02376f8fbba47e3cc9d2cadb6c4f6) |
| RegistryFactory | [0x939f1cC163fDc38a77571019eb4Ad1794873bf8c](https://etherscan.io/address/0x939f1cc163fdc38a77571019eb4ad1794873bf8c) |
| Registry | [0xe5FCBdE076F36bB076170758F8E3AEC7412C5f91](https://etherscan.io/address/0xe5fcbde076f36bb076170758f8e3aec7412c5f91) |
| Vault | [0x8DB2350D78aBc13f5673A411D4700BCF87864dDE](https://etherscan.io/address/0x8db2350d78abc13f5673a411d4700bcf87864dde) |
| Delayed Withdraw Auth | [0xA9Bd691b166aAFCC9EF55aaBC1960825630558d6](https://etherscan.io/address/0xa9bd691b166aafcc9ef55aabc1960825630558d6) |
| Delayed Withdraw | [0x805c6d95c9e707332215F42cb89f93752FFa55B8](https://etherscan.io/address/0x805c6d95c9e707332215f42cb89f93752ffa55b8) |
| withdrawLimitModule | [0x4c86cb5CD701CBf2364f25ED9563Ff3D3d493C22](https://etherscan.io/address/0x4c86cb5cd701cbf2364f25ed9563ff3d3d493c22) |
| Tokenized Strategy | [0x975304C676eB3dc86CD336138328E107A95EaA50](https://etherscan.io/address/0x975304c676eb3dc86cd336138328e107a95eaa50) |
| AeraStrategy | [0x8041bA598f0E656EBe80c67289efb42C09E86aE3](https://etherscan.io/address/0x8041bA598f0E656EBe80c67289efb42C09E86aE3) |
| {% endtab %} | |
{% tab title="Mainnet (rSWELL Liquid Restaking)" %}
| **Contract** | **Address** |
| ------------------------ | ------------------------------------------ |
| Vault Factory | TBD |
| Accountant | 0x15a94d49fac6E23E17C1366c999117a1De8bA7b6 |
| Keeper | TBD |
| Release Registry | 0x70F8AC14DfdEc437aba5E30C7B509Dd01E1dA901 |
| Registry Factory | 0xFF22ea467301010F1364fc154c13e0c86Fcfb077 |
| Registry | 0x88B96f11ab91D282B4200b73FE401F6fc388603a |
| Vault (**rSWELL** token) | 0x358d94b5b2F147D741088803d932Acb566acB7B6 |
| Delayed Withdraw Auth | 0x9D663f1dD3cB752B47301Abdc22d620d1868F377 |
| Delayed Withdraw | 0x755A078Dee1c264A3053F02CD634e750d505CF85 |
| Withdraw Limit Module | 0xa2ed40f46c391dDd30094E866aaC913A20f17216 |
| Tokenized Strategy | |
| Aera Strategy | 0x473F0ADEc308dC82440665d9FC7d5E26EBcf0E05 |
| Role Manager | 0xa1A3257813eD45d91e9c45E03C66FcDD54B4e7c1 |
| {% endtab %} | |
| {% endtabs %} | |
### Earn
{% tabs %}
{% tab title="earnETH" %}
<table><thead><tr><th width="238">Contract</th><th>Address</th></tr></thead><tbody><tr><td>earnETH Token (boringVault)</td><td><a href="https://etherscan.io/address/0x9Ed15383940CC380fAEF0a75edacE507cC775f22">0x9Ed15383940CC380fAEF0a75edacE507cC775f22</a></td></tr><tr><td>manager</td><td><a href="https://etherscan.io/address/0x69FC700226E9e12D8c5E46a4b50A78efB64F50C0">0x69FC700226E9e12D8c5E46a4b50A78efB64F50C0</a></td></tr><tr><td>accountant</td><td><a href="https://etherscan.io/address/0x411c78BC8c36c3c66784514f28c56209e1DF2755">0x411c78BC8c36c3c66784514f28c56209e1DF2755</a></td></tr><tr><td>teller</td><td><a href="https://etherscan.io/address/0x685aDb4797fb38D4Fc4a69750aa048B398160429">0x685aDb4797fb38D4Fc4a69750aa048B398160429</a></td></tr><tr><td>rolesAuthority</td><td><a href="https://etherscan.io/address/0x1F5dddF627C3796a589c6271b36A570f18d3a016">0x1F5dddF627C3796a589c6271b36A570f18d3a016</a></td></tr></tbody></table>
{% endtab %}
{% tab title="earnBTC" %}
| earnBTC token (Boring Vault) | 0x66E47E6957B85Cf62564610B76dD206BB04d831a |
| ---------------------------- | ------------------------------------------ |
| Teller | 0x1DA9ceFA0F46b2087b2cF7dbF9E62Dd94076Ece1 |
| Accountant | 0x6bBf58f1A95D22f497fD2e7f640fAE94481b1A08 |
| Roles Authority | 0x05FAE28773ab9dAfD5C8997AcEe5099fa0D1f219 |
| Manager | 0x6cEA0a42a44cABcc42b1Ec31c3D714DcAAE91e06 |
| {% endtab %} | |
| {% endtabs %} | |
### Govern
{% tabs %}
{% tab title="SWELL" %}
<table><thead><tr><th width="238">Contract</th><th>Address</th></tr></thead><tbody><tr><td>SWELL token</td><td><a href="https://etherscan.io/address/0x0a6E7Ba5042B38349e437ec6Db6214AEC7B35676">0x0a6E7Ba5042B38349e437ec6Db6214AEC7B35676</a></td></tr></tbody></table>
{% endtab %}
{% endtabs %}
# Contract references
The following pages documents the methods and parameters of Swell's smart contracts.
# swETH | LST
Refer to the [LST Github](https://github.com/SwellNetwork/v3-core-public/tree/dab410f4c4ea4f70f5ed3563eb1bf433a4d22bdf/contracts/lst) for detailed information about the contracts.
# swETH
Contract for handling user deposits in ETH in exchange for swETH at the stored rate. Also handles the rate updates from the BOT wallet which will occur at a fixed interval.
*This contract inherits the Whitelist contract which holds the Access control manager state variable and the checkRole modifier*
## lastRepriceETHReserves
```solidity
uint256 lastRepriceETHReserves
```
*Returns the ETH reserves that were provided in the most recent call to the reprice function*
### Return Values
## swellTreasuryRewardPercentage
```solidity
uint256 swellTreasuryRewardPercentage
```
*Returns the current swell treasury reward percentage.*
### Return Values
## nodeOperatorRewardPercentage
```solidity
uint256 nodeOperatorRewardPercentage
```
*Returns the current node operator reward percentage.*
### Return Values
## lastRepriceUNIX
```solidity
uint256 lastRepriceUNIX
```
*Returns the last time the reprice method was called in UNIX*
### Return Values
## totalETHDeposited
```solidity
uint256 totalETHDeposited
```
*Returns the total ETH that has been deposited over the protocols lifespan*
### Return Values
## minimumRepriceTime
```solidity
uint256 minimumRepriceTime
```
*Returns the minimum reprice time*
### Return Values
## maximumRepriceDifferencePercentage
```solidity
uint256 maximumRepriceDifferencePercentage
```
*Returns the maximum percentage difference with 1e18 precision*
### Return Values
## maximumRepriceswETHDifferencePercentage
```solidity
uint256 maximumRepriceswETHDifferencePercentage
```
*Returns the maximum percentage difference with 1e18 precision*
### Return Values
## constructor
```solidity
constructor() public
```
## fallback
```solidity
fallback() external
```
## initialize
```solidity
function initialize(contract IAccessControlManager _accessControlManager) external
```
## withdrawERC20
```solidity
function withdrawERC20(contract IERC20 _token) external
```
\_This method withdraws contract's *token balance to a platform admin*
### Parameters
| Name | Type | Description |
| ------- | --------------- | --------------------------------------------- |
| \_token | contract IERC20 | The ERC20 token to withdraw from the contract |
## setSwellTreasuryRewardPercentage
```solidity
function setSwellTreasuryRewardPercentage(uint256 _newSwellTreasuryRewardPercentage) external
```
Only a platform admin can call this function.
*Sets the new swell treasury reward percentage.*
### Parameters
| Name | Type | Description |
| ---------------------------------- | ------- | ------------------------------------------------ |
| \_newSwellTreasuryRewardPercentage | uint256 | The new swell treasury reward percentage to set. |
## setNodeOperatorRewardPercentage
```solidity
function setNodeOperatorRewardPercentage(uint256 _newNodeOperatorRewardPercentage) external
```
Only a platform admin can call this function.
*Sets the new node operator reward percentage.*
### Parameters
| Name | Type | Description |
| --------------------------------- | ------- | ----------------------------------------------- |
| \_newNodeOperatorRewardPercentage | uint256 | The new node operator reward percentage to set. |
## setMinimumRepriceTime
```solidity
function setMinimumRepriceTime(uint256 _minimumRepriceTime) external
```
Only a platform admin can call this function.
*Sets the minimum permitted time between successful repricing calls using the block timestamp.*
### Parameters
| Name | Type | Description |
| -------------------- | ------- | ------------------------------------------------------- |
| \_minimumRepriceTime | uint256 | The new minimum time between successful repricing calls |
## setMaximumRepriceswETHDifferencePercentage
```solidity
function setMaximumRepriceswETHDifferencePercentage(uint256 _maximumRepriceswETHDifferencePercentage) external
```
Only a platform admin can call this function.
*Sets the maximum percentage allowable difference in swETH supplied to repricing compared to current swETH supply.*
### Parameters
| Name | Type | Description |
| ----------------------------------------- | ------- | ----------------------------------------------------------- |
| \_maximumRepriceswETHDifferencePercentage | uint256 | The new maximum percentage swETH supply difference allowed. |
## setMaximumRepriceDifferencePercentage
```solidity
function setMaximumRepriceDifferencePercentage(uint256 _maximumRepriceDifferencePercentage) external
```
Only a platform admin can call this function.
*Sets the maximum percentage allowable difference in swETH to ETH price changes for a repricing call.*
### Parameters
| Name | Type | Description |
| ------------------------------------ | ------- | -------------------------------------------------------- |
| \_maximumRepriceDifferencePercentage | uint256 | The new maximum percentage difference in repricing rate. |
## swETHToETHRate
```solidity
function swETHToETHRate() external view returns (uint256)
```
*Returns the current SwETH to ETH rate, returns 1:1 if no reprice has occurred otherwise it returns the swETHToETHRateFixed rate.*
### Return Values
| Name | Type | Description |
| ---- | ------- | ------------------------------ |
| \[0] | uint256 | The current SwETH to ETH rate. |
## ethToSwETHRate
```solidity
function ethToSwETHRate() external view returns (uint256)
```
*Returns the current ETH to SwETH rate.*
### Return Values
| Name | Type | Description |
| ---- | ------- | ------------------------------ |
| \[0] | uint256 | The current ETH to SwETH rate. |
## getRate
```solidity
function getRate() external view returns (uint256)
```
## deposit
```solidity
function deposit() external payable
```
The amount of ETH deposited will be converted to SwETH at the current SwETH to ETH rate
*Deposits ETH into the contract*
## reprice
```solidity
function reprice(uint256 _preRewardETHReserves, uint256 _newETHRewards, uint256 _swETHTotalSupply) external
```
### Parameters
| Name | Type | Description |
| ---------------------- | ------- | ------------------------------------------------------------------- |
| \_preRewardETHReserves | uint256 | The PoR value exclusive of the new ETH rewards earned |
| \_newETHRewards | uint256 | The total amount of new ETH earnt over the period. |
| \_swETHTotalSupply | uint256 | The total swETH supply at the time of off-chain reprice calculation |
## \_ethToSwETHRate
```solidity
function _ethToSwETHRate() internal view returns (UD60x18)
```
*Returns the ETH -> swETH rate, if no PoR reading has come through the rate is 1:1*
### Return Values
| Name | Type | Description |
| ---- | ------- | ------------------------------ |
| \[0] | UD60x18 | The rate as a fixed-point type |
## \_swETHToETHRate
```solidity
function _swETHToETHRate() internal view returns (UD60x18)
```
*Returns the swETH -> ETH rate, if no PoR reading has come in the rate is 1:1*
### Return Values
| Name | Type | Description |
| ---- | ------- | ------------------------------ |
| \[0] | UD60x18 | The rate as a fixed-point type |
## \_absolute
```solidity
function _absolute(uint256 _a, uint256 _b) internal pure returns (uint256)
```
*Returns the absolute difference between two uint256 values*
# NodeOperatorRegistry
This contract will hold all the node operators and any associated validator details. This contract will be used when fetching the next validators to setup and allows management of node operators.
## AccessControlManager
```solidity
contract IAccessControlManager AccessControlManager
```
*Returns the address of the AccessControlManager contract*
## numOperators
```solidity
uint128 numOperators
```
*Returns the number of operators in the registry*
## getOperatorForOperatorId
```solidity
mapping(uint128 => struct INodeOperatorRegistry.Operator) getOperatorForOperatorId
```
## getOperatorIdForAddress
```solidity
mapping(address => uint128) getOperatorIdForAddress
```
Throws NoOperatorFound if the operator address is not found in the registry
*Returns the operator ID for a given operator address*
### Parameters
### Return Values
## operatorIdToValidatorDetails
```solidity
mapping(uint128 => struct EnumberableSetValidatorDetails.ValidatorDetailsSet) operatorIdToValidatorDetails
```
## numPendingValidators
```solidity
uint256 numPendingValidators
```
*Returns the amount of pending validator keys in the registry*
## activeValidatorIndexes
```solidity
struct EnumerableSetUpgradeable.Bytes32Set activeValidatorIndexes
```
## getOperatorIdForPubKey
```solidity
mapping(bytes => uint128) getOperatorIdForPubKey
```
Returns 0 if no operatorId controls the pubKey
*Returns the `operatorId` associated with the given `pubKey`.*
### Parameters
## constructor
```solidity
constructor() public
```
## checkRole
```solidity
modifier checkRole(bytes32 role)
```
## checkZeroAddress
```solidity
modifier checkZeroAddress(address _address)
```
*Modifier to check for empty addresses*
### Parameters
| Name | Type | Description |
| --------- | ------- | -------------------- |
| \_address | address | The address to check |
## fallback
```solidity
fallback() external
```
## initialize
```solidity
function initialize(contract IAccessControlManager _accessControlManager) external
```
## withdrawERC20
```solidity
function withdrawERC20(contract IERC20 _token) external
```
\_This method withdraws contract's *token balance to a platform admin*
### Parameters
| Name | Type | Description |
| ------- | --------------- | --------------------------------------------- |
| \_token | contract IERC20 | The ERC20 token to withdraw from the contract |
## getNextValidatorDetails
```solidity
function getNextValidatorDetails(uint256 _numNewValidators) external view returns (struct INodeOperatorRegistry.ValidatorDetails[] validatorDetails, uint256 foundValidators)
```
This method tries to return enough validator details to equal the provided \_numNewValidators, but if there aren't enough validator details to find, it will simply return what it found, and the caller will need to check for empty values.
\_Gets the next available validator details, ordered by operators with the least amount of active validators. There may be less available validators then the provided \_numNewValidators amount, in that case the function will return an array of length equal to *numNewValidators but all indexes after the second return value; foundValidators, will be 0x0 values*
### Parameters
| Name | Type | Description |
| ------------------ | ------- | ------------------------------------------------ |
| \_numNewValidators | uint256 | The number of new validators to get details for. |
### Return Values
| Name | Type | Description |
| ---------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------- |
| validatorDetails | struct INodeOperatorRegistry.ValidatorDetails\[] | An array of ValidatorDetails and the length of the array of non-zero validator details |
| foundValidators | uint256 | |
## usePubKeysForValidatorSetup
```solidity
function usePubKeysForValidatorSetup(bytes[] _pubKeys) external returns (struct INodeOperatorRegistry.ValidatorDetails[] validatorDetails)
```
This method will be called when the DepositManager is setting up new validators.
\_Allows the DepositManager to move provided *pubKeys from the pending validator details arrays into the active validator details array. It also returns the validator details, so that the DepositManager can pass the signature along to the ETH2 deposit contract.*
### Parameters
| Name | Type | Description |
| --------- | -------- | ------------------------------------------------ |
| \_pubKeys | bytes\[] | Array of public keys to use for validator setup. |
### Return Values
| Name | Type | Description |
| ---------------- | ------------------------------------------------ | ---------------------------------------------------------- |
| validatorDetails | struct INodeOperatorRegistry.ValidatorDetails\[] | The associated validator details for the given public keys |
## addNewValidatorDetails
```solidity
function addNewValidatorDetails(struct INodeOperatorRegistry.ValidatorDetails[] _validatorDetails) external
```
*Adds new validator details to the registry. /\*\* Callable by node operator's to add their validator details to the setup queue*
### Parameters
| Name | Type | Description |
| ------------------ | ------------------------------------------------ | --------------------------------- |
| \_validatorDetails | struct INodeOperatorRegistry.ValidatorDetails\[] | Array of ValidatorDetails to add. |
## addOperator
```solidity
function addOperator(string _name, address _operatorAddress, address _rewardAddress) external
```
Throws if an operator already exists with the given \_operatorAddress
*Adds a new operator to the registry.*
### Parameters
| Name | Type | Description |
| ----------------- | ------- | -------------------------------------------------- |
| \_name | string | Name of the operator. |
| \_operatorAddress | address | Address of the operator. |
| \_rewardAddress | address | Address of the reward recipient for this operator. |
## enableOperator
```solidity
function enableOperator(address _operatorAddress) external
```
Throws NoOperatorFound if the operator address is not found in the registry
*Enables an operator in the registry.*
### Parameters
| Name | Type | Description |
| ----------------- | ------- | ---------------------------------- |
| \_operatorAddress | address | Address of the operator to enable. |
## disableOperator
```solidity
function disableOperator(address _operatorAddress) external
```
Throws NoOperatorFound if the operator address is not found in the registry
*Disables an operator in the registry.*
### Parameters
| Name | Type | Description |
| ----------------- | ------- | ----------------------------------- |
| \_operatorAddress | address | Address of the operator to disable. |
## updateOperatorControllingAddress
```solidity
function updateOperatorControllingAddress(address _operatorAddress, address _newOperatorAddress) external
```
Throws NoOperatorFound if the operator address is not found in the registry
*Updates the프로젝트로 돌아가기