How it works
Here you will find more information on how the smart contract works. For detailed product information, visit Create offer or Buy/Sell offer.
Notes: This includes test examples of package IDs where we tested all phases on $FUD tokens. For information about current packages, check Contract Address.
Market
Admin-Only Market Creation: To ensure the security and integrity of the platform, only the PinataBot Admin of the Smart Contract can create a new market. This measure is in place to prevent scams and protect users.
Our Responsibility: We take full responsibility for verifying the token type and ensuring that the correct token is used in each market.
1. Market Creation
Invoking the new
Function: Only PinataBot Admins can initiate a new market by calling the market::new
function within the smart contract. This process ensures that all markets are created and managed under strict, controlled conditions, minimizing the risk of fraudulent activities.
Required Parameters:
Name: Assign a unique and descriptive name to the market.
URL: Provide a link to official information about the token, such as documentation or a project website.
Token Symbol: Define the predicted symbol for the token that will be traded in this market.
Fee Percentage: A 2% fee is automatically applied to all transactions within the market.
Market Activation: Once the market is created, it enters the "Active" phase, allowing users to start creating and filling offers. The market's status is governed by a timestamp, ensuring that all trading activities occur within the appropriate timeframes.
2. Managing Market Settlement
Triggering the Delivery/Settlement Phase: PinataBot Admin can transition the market into the settlement phase following the Token Generation Event (TGE). This is done by calling the settlement
function.
Details to Define:
Settlement End Timestamp: Set by adding a fixed duration (24 hours - hardcoded by the smart contract) to the current time, marking the end of the settlement/delivery period.
Token Information: Accurately specify the actual token type, symbol, and decimals post-TGE to ensure the market reflects the correct token details.
During the settlement phase, the market status changes, and no new offers can be created. Existing offers that are not filled can be canceled at any moment.
3. Closing the Market
In this phase, no further trading can occur, and the market is effectively locked to prevent any new activity.
4. Unsettling a Market (Optional)
Addressing Settlement Issues: In rare cases where there are errors or issues during the settlement phase, PinataBot Admin can "unsettle" the market using the unsettlement
function.
Resetting the Market: This function rolls back the market to a pre-settlement state, allowing to correct any mistakes before re-attempting the settlement. The token details and settlement time are cleared, providing a clean slate.
Offer
1. Offer Creation: Users can create offers within an active market, allowing them to buy or sell tokens before they are officially listed. The offer creation process is governed by the smart contract to ensure transparency and fairness. PinataBot Admin does not have any permission to cancel or change offers.
Offer Parameters: When creating an offer, users must specify the following:
Offer Type: Choose between a buy offer (if you want to purchase tokens) or a sell offer (if you intend to sell tokens).
Token Amount: The number of tokens involved in the offer.
Collateral Value: The total value in USDC that must be deposited as collateral to back the offer.
Once the offer is created, it becomes "Active(0)" and is available for other users to participate in.
2. Understanding Offer Statuses
Active (0): An offer is in the "Active" state when it is first created and available for participation. Both buy and sell offers can be active, meaning they are open for acceptance by other users.
Cancelled (1): If an offer is not accepted and the creator decides to withdraw it, the offer status changes to "Cancelled." This status indicates that the offer is no longer available for participation.
Filled (2): When an offer is accepted by another participant, its status changes to "Filled." At this point, the offer is locked, and the terms of the trade (such as token delivery) must be completed.
Closed (3): After the settlement is completed or if the offer is force-closed after the delivery period without fulfillment, the offer status changes to "Closed." This status means that the offer has been fully processed and is no longer active or open.
Important Considerations
Offer Finality: Once an offer reaches the "Filled" status, it cannot be canceled or altered. The terms of the trade must be honored as outlined in the smart contract.
Fee Structure: A 2% fee applies to both the offer creator and the buyer, which is non-refundable even if the offer is canceled before being filled.
Transparency: All offers and their statuses are recorded on-chain, ensuring transparency and security throughout the trading process.
Last updated