Donors can contribute in native BNB or in USDT on BNB Smart Chain. Both paths credit the same beneficiary mapping inside the vault. This page walks through each path as implemented by the live contract and the website front end.
BNB deposits
Function: depositBNB(address beneficiary) external payable. The donor selects a family page; the front end resolves the beneficiary wallet and the BNB amount equivalent to the cart total. The wallet signs a transaction that calls the contract with that msg.value. On success, bnbBalanceOf[beneficiary] increases and a BNBDeposited event is emitted.
USDT deposits
Function: depositUSDT(address beneficiary, uint256 amount) external. USDT on BSC uses 18 decimals. The donor must approve the SolidarityBasket contract for at least amount, then call depositUSDT. The contract pulls tokens with safeTransferFrom, updates usdtBalanceOf[beneficiary], and emits USDTDeposited.
Beneficiary address
Zero address is rejected. The beneficiary should be the wallet the family registered and controls. Donating to the wrong address credits the wrong mapping; the contract cannot “redirect” later.
Fees and off-chain totals
Any platform fee presentation in the UI is applied when building the on-chain amount. The contract itself does not skim a percentage on deposit; it records what it receives for that beneficiary.