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:

  1. uint planId

  2. bool isArbitrage

  3. 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

  1. uint id

Return Value

PlanData mappings

3. Function Name: getUserStakingDetail

Returns staking details of user for both Arbitrage and non-arbitrage trade

Expected Parameter

  1. address of current user

Return Value

StakingDetail[] array

4. Function Name: getUserTotalBusdStaked

Returns total stake of user according to their arbitrage status

Expected Parameter

  1. address of current user

  2. bool isArbitrage

Return Value

totalStake of user

5. Function Name: getNumberQualifiedDownline

Returns the total number of referrals that has an active stake

Expected Parameter

  1. address of current user

Return Value

numberOfQualifiedStakers

6. Function Name: claimAndStake

Users claims incentive and stake automatically at claim

Expected Parameter

  1. uint planId

  2. 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

  1. 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

  1. uint Id

  2. 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

  1. address of staker

  2. bool _profitInBusd

Return Value

-

10. Function Name: getWittyPrice

Get current witty price

Expected Parameter

  1. bool scale

Return Value

Returns a normal value of witty price if scale is true, if false returns the scaled value

Last updated