https -pb <https://stagenet-thornode.ninerealms.com/thorchain/quote/saver/deposit> \\
asset==ETH.ETH \\
amount==10000000
{
"expected_amount_out": "9601116",
"fees": {
"affiliate": "0",
"asset": "ETH/ETH",
"outbound": "3853"
},
"inbound_address": "0x8d6ed3bcdafc38214af914b08bc47ce36802c87c",
"memo": "+:ETH/ETH",
"slippage_bps": 399
}
https://viewblock.io/thorchain/tx/2B23394F6C5C3BA60EAC58FBA591DF2A02F08177AE6E9BBB1B5BCA6E2C3CB6BA?network=stagenet
curl <https://stagenet-thornode.ninerealms.com/thorchain/pool/ETH.ETH/savers>
[
{
"asset": "ETH/ETH",
"asset_address": "0x3021c479f7f8c9f1d5c7d8523ba5e22c0bcb5430",
"last_add_height": 4393927,
"units": "9604969",
"pending_rune": "0",
"pending_asset": "0",
"rune_deposit_value": "0",
"asset_deposit_value": "9604969"
}
NOTE: asset_deposit_value is off by the fees.outbound amount from the quote above, meaning expected_outbound_amount is taking into account the outbound fee, but thornode is not assessing it when adding to the savers vault.
Fix here: https://gitlab.com/thorchain/thornode/-/merge_requests/2669
➜ ~ https -pb <https://stagenet-thornode.ninerealms.com/thorchain/quote/saver/withdraw?height=4394617> \\
asset==ETH.ETH \\
address==0x3021c479f7f8c9f1d5c7d8523ba5e22c0bcb5430 \\
withdraw_bps==10000
{
"dust_amount": "10000",
"expected_amount_out": "7631436",
"fees": {
"affiliate": "0",
"asset": "ETH.ETH",
"outbound": "1440000"
},
"inbound_address": "0x8d6ed3bcdafc38214af914b08bc47ce36802c87c",
"memo": "-:ETH/ETH:10000",
"outbound_delay_blocks": 1,
"outbound_delay_seconds": 15,
"slippage_bps": 376
}
https://viewblock.io/thorchain/tx/58DD4C5953BBBACE8EF9E9151C3A09BDFD1768ACAD93CEE276E2505FDE826CD7?network=stagenet
Received back 0.07391436. Exact match!
➜ ~ https -pb <https://stagenet-thornode.ninerealms.com/thorchain/quote/saver/deposit> \\
asset==ETH.ETH \\
amount==10000000
{
"expected_amount_out": "9606686",
"fees": {
"affiliate": "0",
"asset": "ETH/ETH",
"outbound": "0"
},
"inbound_address": "0x8d6ed3bcdafc38214af914b08bc47ce36802c87c",
"memo": "+:ETH/ETH",
"slippage_bps": 398
}
https://viewblock.io/thorchain/tx/2C2243F6CF590AD5C6B5CCF673BD51F1AFF9114807E684E7C5870B487C140DCB?network=stagenet
➜ ~ curl <https://stagenet-thornode.ninerealms.com/thorchain/pool/ETH.ETH/savers>
[
{
"asset": "ETH/ETH",
"asset_address": "0x3021c479f7f8c9f1d5c7d8523ba5e22c0bcb5430",
"last_add_height": 4397756,
"units": "9606686",
"pending_rune": "0",
"pending_asset": "0",
"rune_deposit_value": "0",
"asset_deposit_value": "9606686"
}
]
~ curl -sL <https://stagenet-thornode.ninerealms.com/thorchain/constants> | grep YieldBasis
"SynthYieldBasisPoints": 5000,
➜ ~ curl -sL <https://stagenet-thornode.ninerealms.com/thorchain/pool/ETH.ETH\\?height\\=4401020>
{
"LP_units": "74847051408",
"asset": "ETH.ETH",
"balance_asset": "505399571",
"balance_rune": "273472910513",
"pending_inbound_asset": "0",
"pending_inbound_rune": "0",
"pool_units": "81694860932",
"savers_depth": "9606686",
"savers_units": "9606686",
"status": "Available",
"synth_mint_paused": false,
"synth_supply": "84726994",
"synth_units": "6847809524"
}
Made an ETH/USDT swap (get back ~$65 USDT)
https://viewblock.io/thorchain/tx/CCE2D13AABAFC80CF6222FF5D8BE0D8AF36C5F747BA7DF63E920A387F5A4AF13?network=stagenet
➜ ~ curl -sL <https://stagenet-thornode.ninerealms.com/thorchain/pool/ETH.ETH\\?height\\=4401021>
{
"LP_units": "74847051408",
"asset": "ETH.ETH",
"balance_asset": "505399571",
"balance_rune": "273473003642",
"pending_inbound_asset": "0",
"pending_inbound_rune": "0",
"pool_units": "81694860932",
"savers_depth": "9606686",
"savers_units": "9606686",
"status": "Available",
"synth_mint_paused": false,
"synth_supply": "84726994",
"synth_units": "6847809524"
}
Expected redeemable amount of savings before swap
➜ ~ https -pb <https://stagenet-thornode.ninerealms.com/thorchain/quote/saver/withdraw\\?height\\=4401019> \\
asset==ETH.ETH \\
address==0x3021c479f7f8c9f1d5c7d8523ba5e22c0bcb5430 \\
withdraw_bps==10000
{
"dust_amount": "10000",
"expected_amount_out": "8355230",
"fees": {
"affiliate": "0",
"asset": "ETH.ETH",
"outbound": "720000"
},
"inbound_address": "0x8d6ed3bcdafc38214af914b08bc47ce36802c87c",
"memo": "-:ETH/ETH:10000",
"outbound_delay_blocks": 2,
"outbound_delay_seconds": 30,
"slippage_bps": 375
}