5SKY LTI (Core)
5Sky LTI Smart Contract Analysis
We will now delve into the 5Sky LTI
smart contract, known within our team as the 'core' of phase two. The contract's interrelation with other contracts will also be discussed.
Contract Functions
Create Function: This function allows the creation of a new artistic token and lists it for sale.
Purchase Function: Users can purchase an NFT token using a unique invitation code. Any additional funds sent will be returned to the buyer. Each
purchase
transaction creates a maximum of 28 logs, which can generally be segmented into three transaction parts and five log sections. Notably, in theInteracted With (To)
section of a transaction initiated via thepurchase
function, you will observe a reward distribution to the senior team members amounting to 55% of the transaction value, a 20% transfer to the PancakeSwap exchange for securing 5Sky tokens, and a 25% division among the various departments of the 5Sky development and marketing team. All these distributions are conducted using the BNB cryptocurrency.Upgrade Function: This allows the NFT token holder to elevate the design associated with their token to a more valuable one. Users must pay the price difference between the two designs, and any surplus funds are returned.
In simpler terms, when a user makes a purchase of an NFT, the purchase
function is called. The BEP-20 Tokens Transferred section of the transaction page shows the transfer of the purchased token from PancakeSwap to the token sharing contract. Upon this transfer, 25% of the tokens instantly go to the lottery contract, and the remaining 75% go to the user who invoked the function.
Data Structure: The NFTData
structure encapsulates information about an NFT token, including its associated design, invitation code, number of subsets, and parent token ID.
A notable point is that 5% of the total 5SKY tokens reside in the contract address 0xad94A9B78b2B97DB6492a5504D4524e4DAFdf74f
. This is set up in this manner since transactions on the 5Sky token involve certain fees for burning, administrative purposes, and charity. The details can be found in the 5Sky token project's description. We ensure that these fees aren't deducted from the reward tokens given to the user invoking the function. Instead, the deductions are made from the 5% reserve in the aforementioned contract address.
To clarify further, the reason this contract isn't exempted from fees, like the owner
role in many token contracts, is to prevent potential misuse and to ensure future contract modifications don't compromise the added value principles.
Lastly, in the BEP-721 Tokens Transferred section, we can observe the transfer of the purchased NFT from an owner
or supervisor
wallet to the user invoking the function.
The same process, with a few modifications, applies when the upgrade
function is called. However, the BEP-721 Tokens Transferred section would not be present as only the NFT holder can invoke this function.
Benefit Sharing during NFT Upgrade
Members of our team will also profit from the "upgrade" of an NFT, in the same manner as they do from its "purchase". The reward distribution process remains identical to the "purchase" procedure. This means that whenever a user opts to upgrade their NFT, the associated benefits are shared amongst team members according to predefined protocols.
Upgrade Transaction Costs
It's important to note that during the upgrade of an NFT, the user will be charged based on the price difference between their current and new plan. However, this fee strictly pertains to the upgrade difference and will not encompass any additional costs, nor will it include a fee of 5 USDT (Tether). This ensures that the upgrade remains as cost-effective as possible for the user, while still allowing the team to gain the intended benefits.
For more intricate details on invoking functions and examining logs, kindly refer to the technical details section under 'developer'.
Last updated