Yield Farming
Farm LP tokens for additional yield.
Last updated
Farm LP tokens for additional yield.
Last updated
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 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 |
---|---|
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
Get current HBAR and SAUCE yield reward values for a user
Function name: pendingSauce
⛽ No gas cost
Withdraw any amount of LP tokens from an existing farm.
Function name: withdraw
⛽ Recommended gas: 190,000 gwei (~ $0.016 USD)
Parameter Name | Description |
---|---|
Parameter Name | Description |
---|---|
uint256 _pid
Liquidity pool id
uint256 _amount
LP token amount in its smallest unit
uint256 _pid
Liquidity pool id
address _user
User's solidity address
uint256 _pid
Liquidity pool id
uint256 _amount
LP token amount in its smallest unit