糖浆池
Syrup Pools
Contract info
Contract name: pancake::smart_chef Contract address:
fd1d8a523f1be89277ac0787ae3469312667e3d0b3f75a5f01bfc95530a2dc91::smart_chef
Admin multi sig address: 0xd97268666bad31a7299cc80c1bca26face32718630c5498544fe8e9bcc593d74
Types
Name | Type | Description |
---|---|---|
StakeToken |
| The coin type address of stake token in pool. |
RewardToken |
| The coin type address of reward token in pool. |
UID |
| The UID of the pool, can be found in here. |
Resources
SmartChefMetadata
The metadata of the module.
Name | Type | Description |
---|---|---|
signer_cap |
| The signer capability of the resource account. |
admin |
| The admin address of the module. |
uid |
| The latest id of the latest pool. |
create_pool_event |
| The event emit when a new pool is created |
PoolInfo
The information of each pool.
Name | Type | Description |
---|---|---|
total_staked_token |
| The total amount of staked token in the pool. |
total_reward_token |
| The total amount of reward token in the pool. |
reward_per_second |
| The reward emitting out per second. |
start_timestamp |
| The start time in seconds. |
end_timestamp |
| The end time in seconds. |
last_reward_timestamp |
| The latest time that reward was distributed. |
seconds_for_user_limit |
| The time that user limit will apply after the start time. |
pool_limit_per_user |
| The amount of token allow to be stake within the seconds_for_user_limit. |
acc_token_per_share |
| The accumulative token per share. |
precision_factor |
| The precision factor used for calculation. |
emergency_withdraw_reward_event |
| The event emit when the reward is withdrawn. |
stop_reward_event |
| The event emit when the admin stop reward. |
new_pool_limit_event |
| The event emit when the admin update the new pool limit. |
new_reward_per_second_event |
| The event emit when the admin update the reward per second of the pool. |
new_start_and_end_timestamp_event |
| The event emit when the admin update the start or end timestamp of the pool. |
Entry Functions
Deposit
Deposit the stake token into the pool. It will also transfer reward token to the user if there's any.
Name | Type | Description |
---|---|---|
account |
| The sender's signer when calling the function. |
amount |
| The amount of stake token that will be deposited. |
Withdraw
Withdraw the stake token from the pool. It will also transfer reward token to the user if there's any.
Name | Type | Description |
---|---|---|
account |
| The sender's signer when calling the function. |
amount |
| The amount of stake token that will be withdrawn. |
Emergency Withdraw
Withdraw the stake token from the pool regardless of any rewards.
Name | Type | Description |
---|---|---|
account |
| The sender's signer when calling the function. |
Public Functions
Get Pool Info
Get the pool informations.
Return Values
Position | Type | Description |
---|---|---|
0 |
| The total amount of staked token in the pool. |
1 |
| The total amount of reward token in the pool. |
2 |
| The reward emitting out per second. |
3 |
| The start time in seconds. |
4 |
| The end time in seconds. |
5 |
| The time that user limit will apply after the start time. |
6 |
| The amount of token allow to be stake within the seconds_for_user_limit. |
Get User Stake Amount
Get the user stake amount in the pool.
Input Values
Name | Type | Description |
---|---|---|
account |
| The depositor address. |
Return Values
Type | Description |
---|---|
| The total amount of depositor staked token in the pool. |
Get Pending Reward
Get the pending reward of the depositor in the pool.
Input Values
Name | Type | Description |
---|---|---|
account |
| The depositor address. |
Return Values
Type | Description |
---|---|
| The amount of pending reward token in the pool that depositor is eligible to claim. |
Audit
Last updated