balancednetwork / balanced-java-contracts

Java contracts for Balanced
Apache License 2.0
10 stars 15 forks source link

Balanced docs #420

Open AntonAndell opened 6 months ago

AntonAndell commented 6 months ago

Balanced docs

Loans

Should cover the following topics.

Router

Crosschain basics/XCall integration

AssetManager

xCallManager

BnUSD

TRSSMG commented 5 months ago

https://docs.google.com/document/d/1zyEmLocUaT_LVzzF7ohu41KmV18_VD7CdeNFL22C8-A/edit?usp=sharing https://docs.google.com/document/d/1IxRIsxWd8bWphRUASLt7TWi5RSjli6StXBQkZ06XZag/edit?usp=sharing

FezBox commented 5 months ago

Anton is reviewing the docs

AntonAndell commented 5 months ago

For mentioning handleCallMessage on contracts, instead we should say which incoming messages they can handle and what they do. The handleCallMessage is mostly irrelevant i think. We should probably clean up the language a bit to be less verbose but that is my preference. Devs mostly do not want to read to much about functions. We should also take a bit of a wider stance on what each functions actually does. Looks alot like chatgtp generated a lot of this text since it is very shallow and does not add much to the understanding.

The deposit function on assetManager, it should be explains how the tokens are relayed on the ICON chain. triggering xTokenFallback etc. Which can be used to for example do swaps or deposit collateral. Or for other devs on ICON to understand how to integrate our tokenservice

I think we can remove conclusions.

I think we got enough text giving outlines. What we would need now is to give different usecases and how to do them.

Like how to actually do a swap using mainnet contracts. A few examples on creating different kinds of data preferably in Javascript Swap to bnUSD or back Swap to another chain Stable swaps Bridge to ICON Deposit collateral Repay debt Borrow Withdraw collateral Then a few examples on each chain how to deposit token and bnUSD (how to use the data created for each scenario)

parrot9design commented 5 months ago

@AntonAndell Where were you planning to publish this info? Happy to work with you to update the official docs so we can keep everything in one location.

FezBox commented 4 months ago

@FezBox to organise meeting to work through pending items