Closed enriquefynn closed 2 years ago
the price in UST will be so off that our program does not allow the sell to go through
In this case, we can simply trigger a new FetchPoolPrice
. But we also shouldn’t be too pessimistic about it, because the transaction can execute against a different state than we observe, and even preflight in the RPC doesn’t execute against the right state. I guess if it often fails, it just means that the admin should relax the min_out_bps
a bit.
hum... That's right, but we can't change this right now, should we add this command for the admin?
Ah yes, we need to add an instruction for the admin to be able to change it, just like ChangeTerraRewardsDestination
. Because I don’t think we can predict ahead of time what value we are going to need.
Added it here #542
I'll close this for now, we can investigate it if it turns out to be a problem
The maintainer tries to sell Anker rewards with
try_sell_anker_rewards
. It might happen that the pool does not have enough liquidity to sell all rewards or that (more likely) the price in UST will be so off that our program does not allow the sell to go through.In these cases, we could try to provide liquidity enough so we can profit from arbitraging our own maintainer.