Function: endPool(PoolParams poolParams)
This function is used to end a pool with the given parameters.
Inputs
poolParams
Control: Arbitrary.
Constraints: None.
Impact: Pool parameters.
Branches and code coverage
Intended branches
Updates
sState.actualEndTimestamp
with the current block timestamp.Updates
sState.balanceChangePerShare
with the calculated balance change per share.Invokes
_endBounty
withpoolParams
and pays the bounty to the caller.
Negative behavior
Reverts if the pool has already ended.
Reverts if the current block timestamp is less than the target end timestamp.
Function call analysis
index.balance()
What is controllable? Address of index and the return value of the balance function.
If the return value is controllable, how is it used and how can it go wrong? Arbitrary return value can be used to manipulate the state of the pool.
index.decimals()
What is controllable? Address of index and the return value of the decimals function.
If the return value is controllable, how is it used and how can it go wrong? Arbitrary return value can be used to manipulate the state of the pool.