-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a state entry to find total amount of native assets IBC'd out #2664
Comments
I'm in favor. You technically could do this as a middleware if it was needed tomorrow, but I think transfer should do this anyways. I guess this will need to run a migration which calculates the native asset value in escrow when the functionality is added. This is something that could be done with #330 (though I wouldn't block on #330 being implemented) |
Quick question Just to clear up terminology:
The proposal here is to track the IBC'd out of all assets, not just native ones, correct?
This is true for all types of tokens? Not just native ones? (using my definition of native) |
I believe we are only "tracking native assets that's outside of the chain" which is also total balance of the escrow accounts. The reason being if there are say three channels from Osmosis to Juno:
We would like to be find that its been 60 osmo IBC'd out, with no iteration. |
We discussed it here;
|
Is there a reason for explicitly not tracking non native tokens in this same situation? It seems like it would be useful, but that your use case is primarily concerned with having an understanding of the amount of osmo not on the chain? To me it seems other folks may be interested in tracking non-native tokens as well, and it would simplify the code logic? |
yup, we just wanted to track native tokens for this specific issue. If you think its important i can make a follow up PR after we merge this that tracks non-native tokens as well |
Summary
Currently every channel has its own escrow bank account, which is a great design! So its very easy to see the amount of native assets IBC'd in or out on any IBC channel.
However, there are use cases that would like us to be able to reason about the total amount of a native asset that has been IBC'd out.
So if there are say three channels from Osmosis to Juno:
I would like to be find that its been
60 osmo
IBC'd out, with no iteration.Problem Definition
One such use case is rate limiting, where we would like to limit the amount of osmo in total that can flow out of osmosis in a given time interval. For IBC"d in assets, this is quite easy as all incoming assets for it on are on the same channel, so we can easily find "total IBC'd to Osmosis".
For native assets though, there is no efficient way to get the total amount IBC'd out. We'd like to make our rate limits reason about this, rather than the total supply of osmo on Osmosis. (As much of the Osmo should be illiquid due to staking and LP'ing) We can't iterate over all channels, as there are thousands of these on Osmosis.
Proposal
total_native_ibc_out/{denom}
which then stores the amount IBC'd out across all channels.For Admin Use
The text was updated successfully, but these errors were encountered: