Measure spendable FIL inside a storage provider actor

A provider actor's total balance can include funds committed to protocol obligations. A treasury alert based on the gross balance can overstate the amount available to spend.

Read the spendable portion

Use the provider actor ID rather than its worker or owner address. Lotus returns the available balance as an integer amount encoded as a decimal string, denominated in attoFIL.

{"jsonrpc":"2.0","id":1,"method":"Filecoin.StateMinerAvailableBalance","params":["f01234",[]]}

Compare against the operational budget

For a budget of 0.5 FIL compare the integer with 500000000000000000. Keep collateral and other unavailable funds out of this comparison. The result does not include the separate balances of control addresses and is not evidence that the current caller has withdrawal authority.

docs.filecoin.io StateMinerAvailableBalance