Deep Dive
PoolNameRegistryTemplate1 contract
This contract acts as a PNS (Pool Name Service), where pool names can be registered by a pool operator by depositing their LST.
The amount of LST deposited depends on the length of the pool name. For eg, single character names cost more than 2-characters, which cost more than 3-characters, and so on.
A pool operator can create only one pool of each type (InterestPool and UnderwriterPool) for a name.
A pool name can be registered in three ways:
- Directly on this contract
- Via the InterestPoolDao, when a pool operator creates an InterestPool
- Via the UnderwriterPoolDao, when a pool operator creates an UnderwriterPool
When a pool name is deregistered, the operator gets back the LST deposited for that pool.
Dao-only
Function | Params | Description |
---|---|---|
initialize | LSTcontract ,currencyDao ,interestPoolDao ,UnderwriterPoolDao ,min_stake | Called only by the ProtocolDao, but initiated by the Deployer. Stores the following information
|
register_name_and_pool | pool_name ,operator | This is called from a PoolDao when the operator wants to create a Pool, and has not previously registered a pool_name. |
register_pool | pool_name ,operator | This is called from a PoolDao when the operator wants to create a Pool, and has previously registered a pool_name. |
deregister_pool | pool_name ,operator | This is called by a PoolDao when the operator of a pool closes that pool. |
Dao-only
Function | Params | Description |
---|---|---|
name_exists | pool_name | Returns True if a given pool_name has been already registered. |
register_name | pool_name | Registers a pool name. |
deregister_name | pool_name | Deregisters a pool name. |
Admin-only
Function | Params | Description |
---|---|---|
set_name_registration_minimum_stake | min_stake | Called only by the ProtocolDao (transaction initiated by the Governor multisig). Set the default / minimum amount of LST required to register a pool name. |
set_name_registration_stake_lookup | name_length ,stake | Called only by the ProtocolDao (transaction initiated by the Governor multisig). Set the default / minimum amount of LST required to register a pool name. |
Escape-hatch
Function | Params | Description |
---|---|---|
pause | - | Pauses all operations of the contract. |
unpause | - | Resumes all operations of the contract. |
escape_hatch_erc20 | address | Transfers the ERC20 token with the given address to the Escape Hatch Token Holder wallet. |