AI Smart Contracts
The Age of A.I. Powered Incentives
Read the chinese version here
Can a machine guide us to be good humans?
Self-interest is an integral part of human nature. Being able to re-channel self-interest into actions that would benefit all of the society is challenging but transformative. Imagine, to enable people to do social good just because it is simply the most profitable way to live. We would naturally consolidate a more sustainable lifestyle without even thinking about it. However, the design of sustainable incentives faces a plethora of challenges:
- How can we link a value to a social cause and ensure that our incentive maximizes this cause?
- How can we design incentives that are flexible enough to adapt and react to changing scenarios?
- How can we make sure, that these incentives are trustable?
In this blog post, instead of designing these incentives by hand, we want to introduce a technology stack, that allows us to design incentives by machines. We argue that this machine-powered approach not only allows us to overcome many of the aforementioned obstacles but moreover help us design more efficient, scalable, and data-driven strategies.
GainForest — A (very) smart contract to fight deforestation in the Amazon
Let’s start with a motivating example: Tropical deforestation and degradation contributes about 17% of annual global greenhouse gas (GHG) emissions and reducing it will be necessary to avoid dangerous climate change. More than 80% of deforestation in the Amazon happens due to local farmers making room for crops and cattle. Small financial incentives to caretakers have been shown to cut deforestation in half. However, verifying who takes care of what in the Amazon is a hugely labor-intensive task.
During hack4climate, our team realized that people with financial stakes are incentivized to act as caretakers. As a result, we built GainForest, a transparent, scalable platform that allows anyone to become a stakeholder in rainforest regions via blockchain-powered smart contracts.
A staking system for caretakers
The idea is simple: caretakers take responsibility for ensuring a certain patch of the Amazon is protected against deforestation. They select their patch and stake a voluntary amount of money. After the conservation period is over (1/3/6 months), if their forest still stands, they get their initial stake back plus a reward. If not, their stake is used to support future caretakers. Rewards are calculated based on the level of difficulty of the conservation, how many stakeholders there are in that patch, and other factors. People with financial stakes are incentivized to take care of the regions they invested in — locally or globally. Local farmers can simply invest in their own regions and take care on site while global entrepreneurs or communities can invest and help shape policies and pay local caretakers to fight local deforestation.
Additionally, donors can make monetary donations that the system can redistribute to caretakers. They can see where and when their support impacts conservation efforts in real-time thanks to a transparent smart contract redistribution system.
Safe and transparent transactions with blockchain-based smart contracts
Smart contracts are computer protocols that guarantee that an agreement, once signed, is precisely followed and paid out if all conditions are fulfilled. The important thing is that smart contracts are self-executing and self-enforcing. They are deployed on a decentralized blockchain, removing the need for a trusted third (human) party. All transactions are also transparently recorded within the blockchain, allowing the donators to follow the environmental impact of their donations.
Furthermore, by taking the human out of the loop during the full redistribution process, we can scale into a more transparent and data-driven system.
Data-driven stake distribution using machine intelligence
As mentioned before, verification of caretakers and their impact in the Amazon is a hugely labor-intensive task. We propose a machine learning based oracle that automatically evaluates patches of the Amazon. For example, it is straightforward for remote sensing algorithms to detect deforestation from satellite images such as GLAD, DETER, SAD or FORMA.
But we can even go further using machine intelligence. The staking system has following weakness: A clever investor could just put all his money into a remote region of the Amazon, knowing that the probability of deforestation happening is very low. Thus, we need to find a way to link interest rates with the actual risk of deforestation happening. In short: We need prediction-driven incentives. During the hackathon, we collected available image and deforestation data from GLAD and trained a convolution neural network to predict future deforestation. To our own surprise (considering the 24h time frame), we were able to get reasonable looking results. We hypothesize that with more data and time, we can get even more accurate results.
And there we have it: GainForest.org, a blockchain-powered AI smart contract. We won the first prize at hack4climate and were able to pitch our ideas at the UN Climate Change Conference 2017 (COP23). Feel free to visit our website and check out our code.
More applications of AI smart contracts
Our satellite image approach can be easily adapted to more environmental scenarios such as river pollution, oil palm plantations, and ocean protection.
The prediction of traffic congestion and rush hours are very common tasks in modern smart cities. Being able to combine them with smart contracts would allow us to dynamically adjust ticket fares of public transportation systems to incentivize people to rather take the bus than their private car.
One exciting use case might be to find possible incentives against a rising crime rate. Using historic data from policies and its impact on certain city districts, a machine might be able to design new policies and incentives with the goal to minimize crime rates.
Verifying the impact of microcredits is difficult. By linking available infrastructural and economic data with microcredit incentives in certain areas, it might be possible to determine regions with highest growth potential, allowing these regions to take credits with lower risks.
What’s next? Learning strategic incentives from data
Blockchain and A.I. are orthogonal technologies. However, from the GainForest example, we see that intelligent machines can help us automatically evaluate risk through predictions, allowing us to have dynamic smart contracts. While on the other hand, smart contracts help us define a self-enforcing and constrained system. A perfect testing ground for neural network predictions. We think that these AI smart contracts will play a huge role in future blockchain-powered transaction systems as A.I. and blockchain technology will advance. In case of GainForest, to a certain degree, we could even make predictions of deforestation patterns in different areas of the world, with limited data. That is due to the fact that A.I. algorithms such as neural networks have the ability to transfer their knowledge from one dataset to the other. Transfer learning thus allows us to train on the Amazon rainforest (where we have a lot of data) and apply predictions also to other parts of the world, where there is less or no data.
Even more interesting is that our neural network is giving out self-defeating prophecies. The moment our learning algorithm predicts deforestation, to a certain point, it prevents what it predicts from happening due to the underlying staking system which it is part of. So why don’t we just optimise the neural network not on how well it predicts deforestation, but also directly on the overall deforestation. Imagine it to be an adversarial game between two players, a neural network which can give out incentives for caretakers and logging parties trying to maximize profit. Basically, a neural network now wants to optimize the conservation area of the rainforest, while logging parties try to minimize it. With this game-theoretic objective, maybe the network is able to learn to predict strategic incentives, teaching us how to be better human beings? There is definitely an exciting area of research at the intersection of deep learning, blockchain technology, and game theory, waiting to be explored!
If you are interested in this research topic, please don’t hesitate to contact me and the DS3Lab at ETH Zurich.
If you want to support us in starting a pilot project with GainForest.org, send us a mail at email@example.com.
Blockchain AI Research (BLAIR) initiative at DS3Lab ETH Zurich is working at the intersection of artificial…blockchainai.org
We fight rainforest deforestation by intelligently rewarding and empowering caretakers with a cutting-edge proof-of…gainforest.org