Receipt / proof of purchase after buying dynamic fare for the next 30 days
Confirmed a purchased fare transaction
Once your route is established, request an estimate based on historic user population
If the fare looks good, complete the purchase sending the required eth to the payment address.
Create your list of desired routes
See purchase estimate
Connecting to matic
Deployment to matic mumbai testnet from remix
88mph DInterest contract can optionally push funds from fare purchases to DAI pool for interest.
Dynamic pricing for government transport services.
A chainlink model that allows purchase of public transport passes based on volume present at different transport hubs and the number of passes previously purchased.
Used several different blockchain technologies to make this project, going after:
- Government tech prize
- Social impact prize.
- GeoDB (oracle) - used for querying
- MATIC (deployment) - mumbai testnet contract: 0xDB73769d3132DcDE68D27B91E2dd278BD6Be917a
- Plasm (deployment) - testnet contract: 0xbEc5b1faDE897D49A10DC02fD405dCa2aC4C752f
- Moonbeam (deployment) - 0x7fB677AaB295F9B17C12E39FDED8Ee03885C0fF2
- 88mph contract - DInterest contract (currently concept, potentially includable in a future deployment) for pushing funds from government fare purchases to an interest bearing DAI pool.
Ethereum Kovan network: 0xf672b3d4d31b287D9faF733119F5b1bDbDB9b6B8
Covid caused a huge drop in public service usage that could be mitigated/reduced by offering the public the ability to pre-purchase futures for public transport on chainlink.
Right now I could go buy a bus pass and it always costs \$2.50. You don't want to have big chunks of the day or the year where running transport is open. Might as well discount them so you can still fill them up.
They run this at ski resorts because if there's a big event that causes a drop in people they still want to invite attendees. Transport business can get a more stable source of revenue if individuals purchase longer term passes. Customers also win because they know the price isn't going to go way up if the demand goes way up in the future.
What it does
- Uses chainlink oracles to model/track attendence at different airport and transportation hubs.
- Determines a real-time price for a given transport contract.
- Generates a receipt representing your pass purchase.
- Optionally pushes funds from transport pass purchases to interest bearing crypto pools.
- Currently deployed on Kovan and sponsor (Moonbeam, Plasm, Mumbai) testnets.
How we built it
TransportChain queries an index of Amtrak/train locations across the US allowing the user to create their own custom route for pass purchase.
A smart contract determines the pricing of the fare based on the user population/trends at the different stations over the past 2 months retrieved from the GeoDB Chainlink Oracle when on the Kovan network.
*Moonbeam: * Prices can be converted from Eth to USD using the Chainlink Price Feed Oracle when on the Moonbase Alpha network. We deployed our contract on the MoonBeam Alpha network and added Chainlink Oracle interactions following the Integration Guide. The ability to make requests without first obtaining compatible link tokens on the network allowed us to overcome the limitations we encountered when interacting with other networks. The provided interfaces were also very interesting and we could have benefitted with start to finish guide for integrating it with an existing contract.
Upon completing the purchase, the user is redirected to a receipt/completion page linking to the transaction alongside the created pass document as a pdf. Currently supports the Kovan Test, Moonbase Alpha, and Plasm local networks.
- Remix (contracts and compilation)
- Metamask/web3 (contract interaction)
- Chainlink (base contract)
- GeoDB (API)
- Plasm (deployment)
- Matic (deployment)
Challenges we ran into
- Integrating the different blockchain technologies in a single chainlink contracts.
- Deploying and configuring the contracts on different provider networks.
- Connecting the FE to the Kovan test network with metamask.
What's next for Transport Chain
- Support longer term passes
- More historic data to improve the pricing model
- Admin graphs/reporting of purchases made by users