KeyPurchaserallows users to purchase a single key or start a regular subscription to a lock. End users only need to broadcast a single transaction (ERC-20
approve) or a single signed message (
KeyPurchaseris deployed via the
KeyPurchaserFactorycontract. There are a few settings to enter at this time and they may not be changed. This allows us to set terms (such as allowing the subscription to continue so long as the
keyPricedoes not increase by more than 10%). These terms can and should be communicated to the end user before they approve.
0) to cancel their recurring membership anytime.
KeyPurchaserto execute the purchase as appropriate. In the future Unlock Inc will host this but there are no restrictions - anyone could perform this service. The transaction to purchase keys will succeed only if the following requirements are met:
KeyPurchaserguarantees that a rogue lock will not be able to steal all the funds from a given user, as transactions will only succeed if the key price is not larger than what the KeyPurchaser allows (and that the user approved), and if they do not already own a valid key.
KeyPurchasersfor a given lock.
swap-and-callto allow users to subscribe using any ERC-20 token, regardless of what the lock is priced in. This is hard to do safely due to possible price manipulation - I think we should revisit this after UniswapV2 is released.