- Create or fund a spoke-bound account
- Accrue supply index growth (scaled balances)
- Borrow against collateralizable listings
Supplying
- Identify the market (
HubAssetKey) - Confirm the spoke allows collateral / supply
- Authorize token transfer to the pool
- Call
supply
Identify the market
UseHubAssetKey { hub_id, asset }. Confirm pool listing and spoke SpokeAsset
flags (collateral, not paused/frozen for increases, caps).
Call shape
Preconditions
callerauthorizes the call and the token transfer.- The market exists and its hub is active.
- The account’s spoke lists the asset and marks it collateralizable.
- Supply caps and the position limit (at most 5 supply positions) have headroom.
- Neither the protocol nor the listing is blocking entry.
- Every amount is strictly positive. Zero is rejected — unlike
withdraw, it is not a sentinel here.
Anyone can supply into someone else’s account, but only narrowly. A caller
who is neither the owner nor a delegate may add only to assets the account
already holds a supply position in. Anything else is
#44 NotAuthorized. This
stops a third party from filling up an account’s 5 supply-position slots.Creating an account (account_id = 0) skips the check, because the caller
becomes the owner.
