Yield Farming
Farm LP tokens for additional yield.
Outlined below are the common operations associated with yield farming:
Contract ID: Masterchef
Query https://api.saucerswap.finance/farms/ for all eligible farm pool IDs.
Query https://api.saucerswap.finance/pools/ for all available pool IDs
Deposit LP Tokens to a Farm
Deposit any amount of LP tokens to an existing farm to earn additional yield.
Function name: deposit
⛽ Recommended gas: 210,000 gwei (~ $0.018 USD)
Parameter Name | Description |
---|---|
uint256 _pid | Liquidity pool id |
uint256 _amount | LP token amount in its smallest unit |
A spender allowance for the Farm contract is required for the LP token.
It costs $0.25 USD, payable in HBAR, to deposit the tokens into a farm. To get the current deposit creation fee, call the depositFee() method from the Farm contract. This will will return the current value expressed in Tinycent. To accurately convert this value to Tinybar, query the exchange rate from /api/v1/network/exchangerate
Code Overview
Get User's Current Farm Reward
Get current HBAR and SAUCE yield reward values for a user
Function name: pendingSauce
⛽ No gas cost
Parameter Name | Description |
---|---|
uint256 _pid | Liquidity pool id |
address _user | User's solidity address |
Code Overview
Withdraw LP Tokens from a Farm
Withdraw any amount of LP tokens from an existing farm.
Function name: withdraw
⛽ Recommended gas: 190,000 gwei (~ $0.016 USD)
Parameter Name | Description |
---|---|
uint256 _pid | Liquidity pool id |
uint256 _amount | LP token amount in its smallest unit |
Code Overview
Last updated