Function: endPool(PoolParams poolParams)
This function is used to end a pool with the given parameters.
Inputs
poolParamsControl: Arbitrary.
Constraints: None.
Impact: Pool parameters.
Branches and code coverage
Intended branches
Updates
sState.actualEndTimestampwith the current block timestamp.Updates
sState.balanceChangePerSharewith the calculated balance change per share.Invokes
_endBountywithpoolParamsand 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.