Private Pools and Whitelisting
You can configure your pool as Public or Private on creation. However, pool owners can change this status easily.
Public Pools can be used by anyone
If you are a service provider willing to manage anyone's Ether, create a Public Pool.
Public Pools will show up within on Geode's App.
Private Pools can only be used by whitelisted addresses
If you are using a personal staking pool, or worried about KYC/AML, create a Private Pool.
Private Pools do not show up on Geode's App.
Making Your Pool Public
Portal.setPoolVisibility(id, false);
Making Your Pool Private
Portal.setPoolVisibility(id, true);
Whitelisting
You can use a whitelist to manage staker addresses on Private Pools
But you don't need to.
A Pool Owner is able to use their private Pool without being whitelisted.
This whitelist should be a contract that has implemented isAllowed() function:
interface IWhiteList {
// @notice returns true if the address is allowed
function isAllowed(address) external view returns (bool);
}
After making your pool private and creating your whitelisting contract with required functionality, simply notify Portal:
Porta.setWhitelist(id, contract_address);
Here is an unupgradable ,unaudited, untested, simple Whitelist contract for you 💕
pragma solidity =0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
interface IWhiteList {
// @notice returns true if the address is allowed
function isAllowed(address) external view returns (bool);
}
contract Whitelist is IWhitelist, Ownable {
event Listed(address indexed account, bool isWhitelisted);
mapping(address => bool) private whitelist;
function isAllowed(
address _address
) external view virtual override returns (bool) {
return whitelist[_address];
}
function setAddress(address _address, bool allow) external virtual onlyOwner {
require(whitelist[_address] != allow);
whitelist[_address] = allow;
emit Listed(_address, allow);
}
}
Last updated