No More Wars
International Treaties on Blockchain to prevent Wars
Created on 26th March 2022
•
No More Wars
International Treaties on Blockchain to prevent Wars
The problem No More Wars solves
Wars are the biggest problem to humanity, it causes more problems that solve. No more wars is an infrastructure on blockchain to solve this problem. All the international treaties are signed in this platform and all other treaties are deemed as invalid. The country pay a safe deposit i.e. 3billion worth of cryptocurrency (MATIC) to be a part of this blockchain. They can sign treaties add country and vote whether a country should be added or not. The platform is restricted to be used only on a Desktop computer and currently supports MetaMask wallet and currently uses test MATIC . In this polygon infrastructure if a country breaks a treaty than the victim can act on it by filling violation of treaty form. This form is than voted by all the other countries and if the majority votes for the victim, the country violating the treaty will be discarded from the blockchain and the 3 billion dollars worth crypto currency and sent to the victim's account. If the country is not a part of this blockchain there treaties are null and void, also all the treaties signed outside this blockchain are invalid so the countries will not act irresponsibly and also the cryptocurrency sent to the victim insures that do have the support of all the other countries and received an amount to prepare themselves from further damage.
Challenges I ran into
-
Misusing the account - The private accounts of the countries are made public so that the panel and judges can test the network as the important features of the platform is only visible to the country's account.
Solution: Using the Polygon Testnet was the best solution so that even if I share the accounts it won't hamper my real MATIC tokens. -
User and Country - So the countries have the option to add country, sign treaties and report other violations, but for a normal users those options are required. So the problem arrived to how to display just few options to the user.
Solution: When loading the website metaMask wallet gets automatically connected to the website, detecting whether its user or country and just to be on a save side the server side also check whether the actions performed are from a user or a country. -
Unique Votes for Adding Country, Voting for Violations - This was a problem as there was cases when they were adding a country but also was able to vote more than once.
Solution: Created a variable uniquevotes which stores keys as the event and the values as array of address so each country voting for any event gets stored and after the voting the addresses get flushed. -
Signing Treaties - When two country are on a treaty, a third country was able to sign a treaty and mark it as valid .
Solution - Created a structure which contains treaty information including country1 and country2 i.e only these two country can make a valid signature for a treaty. -
Pending request - The pending request for adding country and pending list of violation list are still displayed even after being resolved.
Solution: Made adjustments on the backend by popping the event from the event array after succesful completion and displaying only those event present in the event array in the frontend. -
Revoting when countries are removed - The same votes record where store even after removing the country.
Solution: Flusing every record of a country when removed.
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.