This section describes the various smart contract building blocks upon which all payment flows are built.
We recommend reading the flow of funds page if you haven't already. The below diagram shows the different methods for moving funds through the system. Though each contract's distribution logic is unique, the general three steps are the same.
- Receive: ETH and ERC20 tokens flow into the contract via
calland the contract's balance increases
- Distribute: Once a contract has a positive balance, anyone can call
distributeERC20and earn the distributor fee
- Withdraw: Anyone can call
withdrawat any time for any account, thereby pushing that account's balance out of SplitMain to the account