Witty Staking General 1
These are the general functions external users can interact with
1. Function Name: Stake
User to stake in their Witty Token with a valid referrer and plan
Expected Parameter:
uint planId
bool isArbitrage
address referrer
Return Value
emit the stake of the user, plan and timestamp
2. Function Name: getStakingPlan
To get all the staking plans in the contract
Expected Parameter
uint id
Return Value
PlanData mappings
3. Function Name: getUserStakingDetail
Returns staking details of user for both Arbitrage and non-arbitrage trade
Expected Parameter
address of current user
Return Value
StakingDetail[] array
4. Function Name: getUserTotalBusdStaked
Returns total stake of user according to their arbitrage status
Expected Parameter
address of current user
bool isArbitrage
Return Value
totalStake of user
5. Function Name: getNumberQualifiedDownline
Returns the total number of referrals that has an active stake
Expected Parameter
address of current user
Return Value
numberOfQualifiedStakers
6. Function Name: claimAndStake
Users claims incentive and stake automatically at claim
Expected Parameter
uint planId
uint incentiveId
Return Value
emit the stake of the user, plan and timestamp
7. Function Name: withdrawRewards
Users claiming their daily rewards to their wallet
Expected Parameter
address _token
Return Value
the rewards of the user to their account
8. Function Name: terminateStake
Users can terminate their stake before output date
Expected Parameter
uint Id
bool isArbitrage
Return Value
emit the stake of the user, amount and timestamp
9. Function Name: topUpStakerEarnedProfitOnArbitrage
Users Earned profit on arbitrage is added to their total profit
Expected Parameter
address of staker
bool _profitInBusd
Return Value
-
10. Function Name: getWittyPrice
Get current witty price
Expected Parameter
bool scale
Return Value
Returns a normal value of witty price if scale is true, if false returns the scaled value
Last updated