Today, I would like to talk about such a great feature of the FOIL blockchain as global smart contracts.
You are probably very familiar with classical smart contracts in ETH, BSC or any other networks. They work quite simply - you interact with a certain address in the network (e.g., send funds to it), and the smart contract on that address gives some result, depending on the code you have.
For example, this is how NFT bundles can unbox in classical networks.
The user sends a bundle to the smart contract account, the smart contract calculates the probability of getting some NFT, then creates (minits) them and sends to the user's account. Everything is extremely simple and straightforward. If you don't touch the account, nothing will happen.
The global smart contracts in the FOIL network work differently.
If we take the closest analogy, they are like laws issued by the parliament, which take effect immediately after adoption, and affect absolutely everything. In this case, a global smart contract can be issued by the conditional "government" represented by the developers of the network, as well as by ordinary users, in case their initiative is supported by the network.There is no need to interact with the specific address where the smart contract is located. All actions are performed based on common predefined triggers.
As an example, the global smart contract of a network-wide lottery conducted between owners of participating wallets and users of forging pools.
To begin with, the global smart contract assigns a commission of 1% on all transactions in the network and an address (treasury) where the funds will be accumulated.
Next, a simple action trigger is defined. In our case, it could be, for example, 10 days of participation in a forging pool with at least 500 FOIL and 10 days of continuous full node working with Stacking enabled.
The algorithm, initially built into the smart contract, determines the winners, sends them to their accounts the required percentage of funds from the treasury (it is possible to make "more" and "less" winning tickets, including the possibility of getting the jackpot) and turns on the mode of accumulation of funds.
All this is without the need for users to interact with any account, confirm their participation and so on. Everything happens automatically according to the program. And this example - just a small fraction of what can be realized in a FOIL network using the global contracts. Especially when you consider that, the classic smart contracts have not disappeared! And there's a lot more to the FOIL network... Statuses, communities, voting, encrypted messages...
If you know all the functionality and know how to use it, you can do unimaginable, in other networks, things!