Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Allow the application to set pool's minimum bondable value #508

Merged
merged 9 commits into from
Jul 29, 2020
Merged

Conversation

pdyraga
Copy link
Member

@pdyraga pdyraga commented Jul 23, 2020

Refs: #506
Depends on keep-network/sortition-pools#84

BondedSortitionPool allows specifying a global minimum bondable value the operator needs to have so that it can join and stay in the pool. The responsibility for setting it to some reasonable value goes to the application.

We now have two minimum bond values in the sortition pool (see keep-network/sortition-pools#84): one defining the minimum unbonded value the operator needs to have so that it can join and stay in the pool, and another defining the required bond value for the current selection. If the given operator has enough unbonded value to stay in the pool but it does not have enough unbonded value for the current group selection, it is
skipped.

Sortition pool is created with a minimum bond of 20 ETH to avoid small operators joining and griefing future selections before the minimum bond is set to the right value by the application. Anyone can create a sortition pool for an application with the default minimum bond value but the application can change this value later, at any point. 20 ETH per operator should be more than enough to cover 1 BTC deposit in 3-operators group.

The next step is going to be: modify tBTC to set the minimum bondable value for itself on initialization and for each lot size update.

pdyraga added 3 commits July 23, 2020 16:12
Updated sortition-pools dependency to the version with updated unbonded
value behaviour and allowing to set the expected unbonded value on the
sortition pool. That work is still under development and we'll replace
sortition-pools dependency with a reference to the proper version once
the work on the sortition pool is complete.
BondedSortitionPool allows to specify a global minimum bondable value
the operator needs to have so that it can join and stay in the pool.
The responsibility for setting it to some reasonable value goes to the
application.

We now have two minimum bond values: one defining the minimum unbonded
value the operator needs to have so that it can join and stay in the pool,
and another defining the required bond value for the current selection.
If the given operator has enough unbonded value to stay in the pool but it
does not have enough unbonded value for the current group selection, it is
skipped.
Sortition pool is created with a minimum bond of 20 ETH to avoid small
operators joining and griefing future selections before the minimum bond
is set to the right value by the application.
Anyone can create a sortition pool for an application with the default
minimum bond value but the application can change this value later, at
any point. 20 ETH per operator should be more than enough to cover 1 BTC
deposit in 3-operators group.
pdyraga added 2 commits July 24, 2020 09:05
No functionality changes, just linting.
This function has to be called by the application so the public
interface is a good place for it.
nkuba
nkuba previously approved these changes Jul 27, 2020
@@ -384,6 +370,23 @@ contract BondedECDSAKeepFactory is
groupSelectionSeed = _relayEntry;
}

/// @notice Gets the sortition pool address for the given application.
/// @dev Reverts if sortition does not exits for the application.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exits->exist

@pdyraga pdyraga marked this pull request as ready for review July 29, 2020 07:51
@nkuba nkuba merged commit dcd17d4 into master Jul 29, 2020
@nkuba nkuba deleted the the-bond branch July 29, 2020 09:44
@pdyraga pdyraga added this to the v1.2.0 milestone Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants