PrizeFlush
Last updated
Last updated
The PrizeFlush contract helps capture interest from the PrizePool and move collected funds to a designated PrizeDistributor contract. When deployed, the destination, reserve addresses are set and used as static parameters during every "flush" execution. The parameters can be reset by the Owner if necessary. The protocol can charge a fee during the movement of the funds.
Allows to initialize the contract during the deployment.
Parameters:
Name | Type | Description |
---|---|---|
Migrate interest from PrizePool to PrizeDistributor and the protocolFeeRecipient in a single transaction. Captures interest, checkpoints data and transfers tokens to final destination.
Return:
Name | Type | Description |
---|---|---|
Set global destination variable. PrizeDistributor contract that will receive the obtained yield.
Set global prizePool variable. PrizePool from where to get the yield from.
Set global protocolFeePercentage variable.
Set global protocolFeeRecipient variable.
Set global reserve variable.
Transfers ownership of the contract to a _pendingOwner. Can only be called by the current owner.
Parameters:
Allows the pendingOwner
address to claim the owner role. This function is only callable by the pendingOwner
.
Leaves the contract without owner. It will not be possible to call the owner's functions anymore. Can only be called by the current owner. The method does not take any parameters. Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
Allows the owner to give the manager role to an address. The manager role has access to the functions with the modified onlyOwner
or onlyManagerOrOwner
.
Parameters:
Representation of 100% with 3 decimal places, used to split the obtained funds.
Read global destination variable. It shows where the funds will be moved at the end.
Read global prizePool variable. Pool from where to capture the award balance.
Read global ProtocolFeePercentage variable. Portion of the obtained yield that will be paid to the protocol as a fee.
Read global ProtocolFeeRecipient variable. Address that will receive the protocolFee.
Read global reserve variable. Contract that tracks funds earned over periods of time.
Owner role that can be granted exclusive access to specific functions with the modifier onlyOwner.
Manager role that can be granted exclusive access to specific functions with the modifier onlyManager or onlyManagerOrOwner.
The address that can claim the owner role. It is used to transfer the owner.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_owner
address
An account that will become a new owner of a contract.
_destination
address
Address of the prizeDistributor contract.
_reserve
address
Reserve address.
_prizePool
address
PrizePool address.
_flushed
bool
true if operation is successful, false otherwise.
newOwner
address
An account that will become the _pendingOwner.
_newManager
address
An account that will become the new manager.