BsafeDecentralized storage

The money layer · Ethereum Mainnet

Paid by code, not a company.

Every storage payment and every node operator payout runs through one public contract, StorageIncentive. Nobody can pay operators more than users paid in, and nobody can take back what an operator has earned.

01 · Money flow

Every wei has an owner.

Money enters only through a storage purchase or a direct top-up of the pool. The contract tracks who each wei belongs to.

  1. A user pays once

    Exactly storagePrice, once per wallet. Wrong amounts and repeat purchases revert.

    purchaseStorage()
  2. The contract splits it

    Reward pool · mostFee

    The pool belongs to node operators. The fee is the only part the owner can ever collect.

  3. Operators are credited

    The coordinator meters each node's storage, bandwidth and uptime, and as settler moves earnings from the pool to the operator's balance.

    rewardNode()
  4. Operators withdraw

    Whenever they like, straight to their own wallet. A credited balance can't be clawed back.

    withdraw()

02 · Roles

Who can call what.

Users

Anyone storing files

  • purchaseStorage()

Pay exactly storagePrice, once per wallet. Any other amount, and any repeat purchase, reverts.

Operators

Anyone running nodes

  • registerNode()
  • withdraw()

Register a payout wallet once, then pull your full credited balance whenever you want.

Settler

The coordinator's key

  • rewardNode(node, amount)

Can only move money from the reward pool to registered operators, never more than the pool holds.

Owner

The deployer

  • setStoragePrice()
  • setSettler()
  • withdrawProtocolFees()
  • transferOwnership()

Can collect protocol fees and nothing else. The reward pool and operator balances are out of reach.

03 · Guarantees

What nobody can do.

  • Rewards can never exceed the pool
  • A credited balance can't be taken back
  • The owner can't touch the pool or any operator balance
  • The fee is fixed at deploy and capped at 20%
  • Withdrawals are guarded against re-entrancy
  • Ownership changes in two steps
  • Plain ETH transfers are refused, so every wei is accounted for

04 · Events

What it announces.

EventMeaning
StoragePurchased(user, amount)A wallet paid for storage. The backend requires this event before it unlocks uploads.
NodeRegistered(node)An operator registered a payout wallet.
NodeRewarded(node, amount)The settler moved earnings from the pool to an operator's balance.
Withdraw(node, amount)An operator pulled their balance out.
RewardPoolFunded(from, amount)Someone topped up the reward pool directly.
ProtocolFeesWithdrawn(to, amount)The owner collected protocol fees.

Source: contracts/src/StorageIncentive.sol, covered by unit tests and verified on Etherscan. How the backend checks a payment