Feral File (FF) maintains the sale and is in charge of determining the sale price, sale items and royality amounts based on the sale types (normal sale or auction sale). The contract is only to facilitates payments and tokens distributing according to the sale instrument from FF.
To ensure both crypto user and credit card user both have the same opportunity to process the sale, we introduce a sale lock into the system. It is a 3 minutes lock that starts counting down when the purchase process begin. Due to the limit of signature revealing, the purchasing lock will persist until the purchase is fulfill or the time count down to zero. That means each user can only perform a purchasing flow at a time.
To ensure the contract function also align with the server lock, there is a expiry time of each sale instrument data. The expiry will set to the end time of the lock for each sale.
In crypto payments, the collectors will get sale instrument data from FF server. The data includes target tokens in a particular sale and the price of the sale. Users use the data to construct payment transactions and submit it to the blockchain to pay and get tokens directly.
In the credit card payment, the lock mechanism is the same. Instead of submit transaction directly to the blockchain, FF server will submit the sale transaction for users. Users using credit card pay will be an addition estimated fee for the blockchain transaction. The remaining fee will refund to users if they are not totally spent.
If the a credit card payment is confirmed after its sale lock expired, FF server will not send to purchasing transaction and will return all funds back to the user.