This is an ethereum subscription payment protocol built with solidity.
- Subscription.sol - this is the subscription contract to whcih users subscribe and from which the creator (person being subscribed to) recieves/withdraws their ether or tokens.
- UserAccount.sol - This is the user's smart contract which stores their subscrptions and hte funds for paying these subscriptions. The reason behind having a seperate smart contract is the lack of a allowance function in native ether.
UserAccount:
- Deposit funds.
- Add the subscription contract addresses you wish to subscribe to.
- Add you UserAccount Address to the subscriptions.sol contracts you would like to subscribe to.
Subscription:
- Set subscription period.
- Set subscription value.
- Trigger startSubscription.
- Claim the subscriptions - this allows multiple periods to accrue.
- withdraw the funds - there is ana option to withdraw your ether balance as any token on Kyber Netowrk using an integration.