## Inspiration

As more and more people embrace the movement toward a greener future, there still remain many concerns surrounding the viability of electric vehicles. In order for complete adoption of these greener technologies, there must be incentives toward change and passionate communities.

## What it does

EVm connects a network of electric vehicle owners and enables owners to rent their charging stations when they aren't needed. Facilitated by fast and trustless micropayments through the Ethereum blockchain, users can quickly identify nearby charging stations when batteries are running low.

## How we built it

Using Solidity and the Hardhat framework, smart contracts were deployed to both a localhost environment and the Goerli testnet. A React front-end was created to interact with the smart contract in a simple and user-friendly way and enabled a connection to a metamask wallet.
A Raspberry Pi interface was created to demonstrate a proof of concept for the interaction between the user, electric vehicle, and charging station. While the actual station would be commercially manufactured, this setup provides a clear understanding of the approach. The Raspberry Pi hosted a Flask server to wirelessly communicate data to the web-app. An LCD display conveys the useful metrics so the user can rest assured that their interaction is progressing smoothly.

## Challenges we ran into

This was our first experience in the blockchain development space. Not only learning the syntax of Solidity, but gaining an understanding of the major underlying blockchain concepts made for a steep learning curve in little time. Configuration with Hardhat did not go smoothly and required a great deal of debugging.
Integrating the hardware with the web-app and smart contracts through the Flask REST API required extensive testing and modification.

## Accomplishments that we're proud of

Building our first dApp was a huge accomplishment in itself. Our ambition to connect two of the most rapidly emerging fields, IoT and Blockchain, sparked new creativity in areas that are still very complex and unknown.

## What we learned

We not only learned how to write and deploy efficient smart contracts to the Ethereum network, but also saw how they can be integrated into user-friendly web-apps. Building EVm also provided us an opportunity to develop modular, low-level software by learning more about interrupt-driven design as well as various serial communication protocols.

## What's next for EVm

We look forward to deploying the smart contracts on actual blockchain networks. To improve transaction times and minimize gas fees, layer 2 chains will be explored to host the project in the future. Extensive testing and refactoring will be done to augment the security and efficiency. Reaching out to industry leaders to make the product more viable will be essential for its adoption.
# Ether on a Stick

Max Fang and Philip Hayes

## What it does

Ether on a Stick is a platform that allows participants to contribute economic incentives for the completion of arbitrary tasks. More specifically, it allows participants to pool their money into a smart contract that will pay out to a specified target if and only if a threshold percentage of contributors to the pool, weighted by contribution amount, votes that the specified target has indeed carried out an action by a specified due date.

Example: A company pollutes a river, negatively affecting everyone nearby. Residents would like the river to be cleaned up, and are willing to pay for it, but only if the river is cleaned up. Solution: Residents use Ether on a Stick to pool their funds together that will pay out to the company if and only if a specified proportion of contributors to the pool vote that the company has indeed cleaned up the river.

## How we built it

Ether on a Stick implements with code a game theoretical mechanism called a Dominant Assurance Contract that coordinates the voluntary creation of public goods in the face of the free rider problem. It is a decentralized app (or "dapp") built on the Ethereum network, implementing a "smart contract" in Serpent, Ethereum's Python-like contract language. Its decentralized and trustless nature enables the creation of agreements without a 3rd party escrow who can be influenced or corrupted to determine the wrong user.

## Challenges

The first 20 hours of the hackathon were mostly spent setting up and learning how to use the Ethereum client and interact with the network. A significant portion was also spent planning the exact specifications of the contract and deciding what mechanisms would make the network most resistant to attack. Despite the lack of any kind of API reference, writing the contract itself was easier, but deploying it to Ethereum testnet was another challenge, as large swaths of the underlying technology hasn't been built yet.

## What's next for Ether on a Stick

We'd like to take a step much closer to a game-theoretically sound system (don't quote us, we haven't written a paper on it) by implementing a sort of token-based reputation system, similar to that of Augur. In this system, a small portion of pooled funds are set aside to be rewarded to reputation token bearing oracles that correctly vote on outcomes of events. "Correctly voting" means voting with the majority of the other randomly selected oracles for a given event. We would also have to restrict events to only those which are easily and publically verifiable; however, by decoupling voting from contribution, this bypasses a Sybil attack wherein malicious actors (or the contract-specified target of the funds) can use a large amount of financial capital to sway the vote in their favor.
## Inspiration

Cars of today can function well by themselves, but for autonomous driving to be realistic, cars have to communicate and determine efficient routes as a network. *Kansei dorifto!*

## What it does

Inertia uses blockchain to implement secure hive-mind thinking. Each device/car runs a node on the Ethereum network, and these devices update their location, destination, and their calculations of routes through smart contracts. Once all the cars have submitted this information, the network is able to come to a consensus on the best routes to take. The calculation itself (which all users take part in) is loosely based on Dijkstra's algorithm as well as other graph theory algorithms. Users that contribute to this calculation are rewarded with tokens.

Why use a distributed app? There are three advantages:

1. Privacy. People should not have to constantly send their location and destination to a third party. With Inertia, they can stay anonymous on the Ethereum network instead.
2. Security. If something goes wrong, a car accident could occur - which is why it is important to use the blockchain, which is much harder to corrupt.
3. Lower costs! Inertia does not require a server or additional infrastructure to implement. The clients do the heavy lifting, which also makes it scalable.

## How we made it

We used Ganache to create nodes with worthless "fake Ethereum", and we used web3 to allow them to communicate to the network through the smart contracts (which we wrote with Remix). The front-end was made with just HTML/CSS and vanilla JavaScript and was served by a node.js back-end. Finally, we used ngrok to create tunnels to other devices.

## Accomplishments that we're proud of

All of our team members are relatively new to blockchain, so we are excited to have successfully implemented it.

## What's next for Inertia

Although we were unable to demo on physical cars at this hackathon, we would like to be able to implement this onto toy cars and even real ones eventually.