Closed jtfirek closed 1 year ago
Also would you guys want to see the USD values in this entity as well?
@jtfirek : Only if we are confident that we will have an exchange rate in the oracle to work with. Meaning no calls out to coingecko or similar - if we need external feeds for exchange rates, then the conversion should take place outside of squid.
However, I would encourage you to add human readable amounts in parallel for the new amounts. Use the same name and add Human
to the end of it.
eg. In conjunction with liquidationCost
(holding the atomic amount), add liquidationCostHuman
with the human readable amount.
Hey @daniel-savu @bvotteler, Here is what I currently have. We can get usdt without calls outside of squid, but lmk if the issue is more that we do not what to trust usdt specifically and I can remove it. Also @bvotteler I used the helper functions that the grants team created as it made this much simpler, but lmk if you want me to use the excahangeRate objects like we discussed in discord.
type LoanLiquidation @entity {
id: ID!
amountRepaid: BigInt!
amountRepaidHuman: BigDecimal!
amountRepaidToken: Currency!
seizedCollateral: BigInt!
seizedCollateralHuman: BigDecimal!
seizedCollateralToken: Currency!
liquidationCostBtc: Float!
liquidationCostUsdt: Float!
timestamp: DateTime!
}
Also @bvotteler I used the helper functions that the grants team created as it made this much simpler, but lmk if you want me to use the excahangeRate objects like we discussed in discord.
If it works, then there's no reason to postpone the PR for that improvement. I do lean towards using the exchange rates, but I'm happy for you to add that as a new issue instead that we can work on at a later stage.
@jtfirek , just checking in regarding your initial comments:
but have been unable to test due to the issues I have been having running the kinsugi testnet
Have you been able to test drive the changes and do a few sanity checks (that the values make sense) since then?
@bvotteler Ugh no, I am still having trouble with the kinsugi testnet and it so odd because I can run all the other networks just fine, but I feel like the kinsugi testnet would be the only network with liquidations I could test against.
I am still unable to run the kinsugi testnet on my machine.
@bvotteler could we merge this in with the next squid release please?
@bvotteler could we merge this in with the next squid release please?
I'm not strictly opposed, but to be clear, there is some remaining risk because it hasn't run a full scan against testnet yet. (Speed issues haven't been resolved on testnet afaict.)
Ok, then let's @ns212 on those speed issues and let's rerun this against testnet.
For reference, this is the spot where we get the error mentioned above: https://github.com/interlay/interbtc-squid/pull/104/files#diff-96180e02130ffdf0db84cb80b8acff3480e612bebb402793a480dc20d8bf89aaR574
Closing due to lack of permissions to modify. Replacing it with #128
Proposed solution for #103 I have a proposed solution, but have been unable to test due to the issues I have been having running the kinsugi testnet. Also would you guys want to see the USD values in this entity as well?