ActaFi Incentives Smart Contract

Incentives

Incentives contract holds the Earn functionality of the platform, where users can use: Stake, Referrals or participate in DAO program. The contracts are deployed as a single contract, so that users who have given ACTA token allowance, could easily participate in all Incentives. Incentive contract deploys Staking, Referrals and DAO contracts and acts as a proxy via admin function in respective contracts. This allows users who given ACTA allowance easily participate in all Incentives. Upon staking the required amount of tokens, users can claim: Counselor, Minister, Ambassador titles. Fees gathered from the Staking participants are distributed to current DAO token holders. Additional rewards can be funded to the contract to be distributed for all the contracts in Incentives program.


tokenAddress

address tokenAddress

address of the ERC20 token


stakingPool

contract StakingPool stakingPool

StakingPool contract


referrals

contract Referrals referrals

Referrals contract


dao

contract DAO dao

DAO contract


rewardBalance

uint256 rewardBalance

external method to get reward balance in tokens


devFundBalance

uint256 devFundBalance

external method to get dev fund balance in tokens


referralFeeBalance

uint256 referralFeeBalance

external method to get referral fee balance in tokens


constructor

constructor(address _tokenAddress, uint256 _aprLevel1, uint256 _aprLevel2, uint256 _daysTillLevel2, uint256 _depositFee, uint256 _withdrawFee) public

Incentives contructor

Parameters

Name
Type
Description

_tokenAddress

address

address of the ERC20 token

_aprLevel1

uint256

StakingPool: APR level 1 percentage with percentage base 100000 (i.e. 12% => 12000 )

_aprLevel2

uint256

StakingPool: APR level 1 percentage with percenatge base 100000 (i.e. 15% => 15000 )

_daysTillLevel2

uint256

StakingPool: period in days when APR level 2 takes over

_depositFee

uint256

StakingPool: deposit fee percenatge with percentage base 100000 (i.e. 0.75% => 750 )

_withdrawFee

uint256

StakingPool: withdraw fee percenatge with percentage base 100000 (i.e. 0.5% => 50 )


stake

function stake(uint256 _amount) external

method used to deposit tokens to Staking contract

Parameters

Name
Type
Description

_amount

uint256

amount of tokens to deposit


unstake

function unstake(uint256 _amount) external

method used to withdraw tokens from Staking contract

Parameters

Name
Type
Description

_amount

uint256

amount of tokens to withdraw


claim

function claim() external

Staking method used to claim staking rewards


compound

function compound() external

Staking method used to compound staking rewards (add rewards to existing staking balance)


function createReferralLink(string _name, string _hashString) external

Referrals method used to create a referral link for the Affiliate program

Parameters

Name
Type
Description

_name

string

the user given title for the link

_hashString

string

unique hash string for the link


claimAllRewards

function claimAllRewards() external

used to claim all rewards stored in Milestone contract


refund

function refund() external

refund function used to transfer locked tokens to the owner


fundReward

function fundReward(uint256 _amount) external

method used to fund the contract rewards balance

Parameters

Name
Type
Description

_amount

uint256

amount of ACTA tokens to transfer


transferReward

function transferReward(address _recipient) external

admin method used to transfer remaining reward balance to the owner

Parameters

Name
Type
Description

_recipient

address

id of voting proposal


transferDevFund

function transferDevFund(address _recipient) external

admin method used to transfer remaining dev fund balance to the owner

Parameters

Name
Type
Description

_recipient

address

id of voting proposal


daoApproveGovernor

function daoApproveGovernor(address[] _userAddresses) external

DAO admin function to approve Governor titles

Parameters

Name
Type
Description

_userAddresses

address[]

list of user addresses


daoProvideTitle

function daoProvideTitle(address[] _userAddresses, uint8 _titleId) external

DAO admin function to provide free titles

WILL BE REMOVED BEFORE DEPLOYING TO MAINNET

Parameters

Name
Type
Description

_userAddresses

address[]

list of user addresses

_titleId

uint8

DAO title Id to be provided


daoSetTitleCost

function daoSetTitleCost(uint8 _titleId, uint256 _cost) external

DAO admin function to set DAO title cost

Parameters

Name
Type
Description

_titleId

uint8

DAO title id

_cost

uint256

cost of DAO title


daoSubscribe

function daoSubscribe(uint8 _titleToSubcribe) external

DAO external function to subscribe to DAO title

Parameters

Name
Type
Description

_titleToSubcribe

uint8

DAO title to subscribe


daoClaimReward

function daoClaimReward() external

DAO external function to claim DAO reward


daoVoteCreateProposal

function daoVoteCreateProposal(uint8 _category, string _name, string _description, bytes32[] _voteOptions) external

DAO external function to create DAO voting proposal

Parameters

Name
Type
Description

_category

uint8

category of voting proposal

_name

string

name string of voting proposal

_description

string

description string of voting proposal

_voteOptions

bytes32[]

array of bytes32 with voting options


daoVoteSetProposalStatus

function daoVoteSetProposalStatus(address _voteProposalAddress, uint8 _status, uint256 _startTime, uint256 _endTime) external

DAO external admin function to set status, start and end time for voting proposal

Parameters

Name
Type
Description

_voteProposalAddress

address

address of DAOVoteProposal contract

_status

uint8

new status of voting proposal

_startTime

uint256

start time for the vote

_endTime

uint256

end time for the vote


daoVoteOnProposal

function daoVoteOnProposal(address _voteProposalAddress, uint8 _voteOption) external

DAO external function to vote on proposal

Parameters

Name
Type
Description

_voteProposalAddress

address

vote proposal addresss

_voteOption

uint8

voting option user is voting for

Last updated