Mint liquid farm share for auto compounding rewards. The module mints the corresponding amount of sbCoin and sends it to the farmer when the execution is complete.
Usage
mint-share [public-position-id] [desired-amount]
Argument
Description
public-position-id
liquid farm id
desired-amount
deposit amounts of base and quote coins
Example
# In order to fully test the module in your local network, liquidFarm must be set up by governance proposal.
#
# For example,
crescentd tx gov submit-proposal public-position-create proposal.json --chain-id localnet --from alice
Where proposal.json contains:
{
"title": "Public Position Create Proposal",
"description": "Let's start new liquid amm",
"pool_id": "1",
"lower_price": "4.5",
"upper_price": "5.5",
"min_bid_amount": "100000000",
"fee_rate": "0.003"
}
# mint share
crescentd tx liquidamm mint-share 1 100000000uatom,500000000uusd \
--chain-id localnet \
--from alice
#
# Tips
#
# Query all the registered public position objects
crescentd q liquidamm public-positions -o json | jq
#
# Query account balances to see if Alice has sb-coin.
crescentd q bank balances cre1zaavvzxez0elundtn32qnk9lkm8kmcszxclz6p -o json | jq
BurnShare
Burn liquid amm share to withdraw underlying tokens.
Place a bid for a rewards auction. Bidders estimate how much rewards for the next epoch will be accumulated and place their bids accordingly with sb coin amount.
Query all rewards auctions for specific public position.
Usage
rewards-auctions [public-position-id]
Example
# The "rewards_auction_duration" param is the duration that is used to create new rewards auction in begin blocker.
# You can adjust the value in config-test.yml file to make it faster or slower.
# By default, the value is set to 8 hours but for local testing purpose it is set to 120 seconds.
# If you wait 120 seconds (2 minutes) after starting a local network, the module automatically creates new rewards auction.
crescentd query liquidamm rewards-auctions 1 -o json | jq
crescentd query liquidamm rewards-auctions 1 --status AUCTION_STATUS_STARTED -o json | jq
crescentd query liquidamm rewards-auctions 1 --status AUCTION_STATUS_FINISHED -o json | jq
crescentd query liquidamm rewards-auctions 1 --status AUCTION_STATUS_SKIPPED -o json | jq