Asset rebalancing

Hey all. So ideally we want Incognito to be where folks keep any of their assets that are available in Incognito right? The privacy feature of course is huge, but what about adding some asset management features?

A really big one for me would be an asset rebalancing feature. I’ve seen folks mention creating a custom coin to do it, ala Idea for a new type of coin but would it be easier for it to just be done in-app?

Ex if I keep a portfolio like this in Incognito:

40% PRV
30% BTC
30% ETH

And whenever I shield new funds, withdrawal reward PRV from Provide, or if the values of those assets drift too much, I want to rebalance my assets to maintain the above percentages. Click a “Rebalance” button in the app and it does all the math and pDex exchanges automatically. Bonus points for being able to do so in Provide/Add, though I’m sure that gets much more complicated.

This is a pretty common feature in brokerage accounts for long-term stock/fund investing (M1 Finance does it particularly intuitively), and something I currently do manually in Incognito. Could be really helpful to attain new and retain current Incognito users.

5 Likes

Sounds like a periodic script using the new SDK will do the trick. You can just get current balances, compute the diff and create the pdex transactions.

https://github.com/incognitochain/go-incognito-sdk-v2 or https://github.com/incognitochain/incognito-cli once it has pdex functions.

3 Likes

This looks promising for sure. Can one see their balances within Provide from the SDK? I only see the balance within Assets (incclient.GetBalance), and what appears to be the balance in Add (incclient.GetShareAmount)

It’s a good idea, I like it :+1:

You cannot check the balance with Provide since it is a centralized component and handled by the backend.

This function will return the amount of assets you have directly contributed to the pDEX (via the Add component).

1 Like

Hi @adrian, @Lohash,

A new version of the CLI has been released.

3 Likes