This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# prints current loss percentage due to burning UST for LUNA | |
# requires: curl, jq, bc | |
luna_rate_via_burn=`curl -s "https://fcd.terra.dev/terra/market/v1beta1/swap?ask_denom=uluna&offer_coin=100000000uusd" | jq -r ".return_coin.amount"` | |
luna_to_ust_exchange_rate=`curl -s "https://fcd.terra.dev/terra/oracle/v1beta1/denoms/uusd/exchange_rate" | jq -r ".exchange_rate"` | |
echo "(100 - ((${luna_rate_via_burn} * ${luna_to_ust_exchange_rate}) / 10^6))" | bc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 13 17 19 | |
101 103 107 109 | |
191 193 197 199 | |
821 823 827 829 | |
1481 1483 1487 1489 | |
1871 1873 1877 1879 | |
2081 2083 2087 2089 | |
3251 3253 3257 3259 | |
3461 3463 3467 3469 | |
5651 5653 5657 5659 |
OlderNewer