-
Notifications
You must be signed in to change notification settings - Fork 5
Entrypoints
This entrypoint serves as a gateway to the farm. Users can deposit a certain amount of stakeable LP tokens to begin accumulating staking rewards, which can be claimed at a later point in time through manual interaction with the contract.
-
nat
A single value representing the amount of stakeable tokens being deposited. The user depositing must create an appropriate allowance by calling
%approve
on the underlying token contract beforehand. The farm itself will transfer the specified amount to its own KT1 address.This mechanism is important to maintain the
farmTokenBalance
in the storage.
This entrypoint calculates the earned reward tokens for the user invoking it and pays it out.
unit
This entrypoint unstakes the number of LP tokens the delegator specifies and pays out earned reward tokens.
-
nat
Number of staked LP tokens the user wants to withdraw.
This entrypoint is authenticated implicitly with Tezos.sender
who has to match with the admin property in storage. The call sets the specified address as new admin.
-
address
The address of the new admin.
This entrypoint is authenticated implicitly with Tezos.sender
who has to match with the admin property in storage. This call can be used to extend or shorten the reward payout scheme of the farm. It can be also used to "rehydrate" a "dry" farm.
-
nat %rewardPerBlock
Number of reward tokens per block. -
nat %totalBlock
Number of total blocks in the payout scheme.
Emergency withdraw function called escape is an extra layer of protection for users. Do not call this except the farm encounters a critical bug. Rewards are not being calculated for the user, but LP tokens are transferred back.