Freeport - A Prediction Market Built on Cardano

Project introduction
Name: Freeport
Description: A decentralized prediction market built on Cardano

For some context, I am not a software engineer/developer and did not begin this journey with a ton of transferable skills. I work full time in a finance/risk type role and mainly use excel in my day to day work. Stepping into the world of Cardano, Haskell, Nix, Plutus, Javascript, etc. has been a wild ride and not always the most fun. With the help of the free to use PPBL course (run by James Dunseith, co-founder of Gimbalabs) and the super supportive PPBL community (, I was able to learn the tooling build and deploy my very own Dapp on Cardano. I think this part is especially important to emphasize since there is a common misconception that the tooling is too difficult or you need to be funded out the rear by catalyst to build anything of substance. I hope to serve as an example that neither of those are true and with enough determination and passion, anyone can build on Cardano.

I have been fascinated with blockchain based prediction markets since I learned about Augur (an ethereum based project). I am also an avid sport bettor and build models to pick lines I believe to be profitable. I believe in the power of prediction markets to serve as a source of truth for important/impactful events and also to compete with the current sportsbook industry in recreational markets.

On to the project itself, I believe my implementation has the potential to deliver the promise of decentralized prediction markets that has yet to be realized. On Freeport, markets are created and settled by a ‘market originator’. These originators (who can be individuals or organizations) should carry some form of reputation within the community and be trusted to settle markets quickly and honestly. Originators provide the initial stake/liquidity to the market and set the initial line. When a wager is submitted on chain, the wager amount in Ada is locked at the contract and the bettor receives temporary tokens (outcomeA/B and PoolA/B tokens) that act as receipts of the bet amount and potential winnings recognizable by the contract. After settlement, these tokens can be exchanged for Ada if you wagered correctly. The pricing algorithm is similar to those used in a DEX where each trade will shift the exchange rate of the market by some amount. Unlike a DEX, Ada does not flow freely in and out during the wagering period. For more information on the smart contract and the protocol, you can read the whitepaper (litepaper?) which can be found here:

Again, I hope to serve as a source of inspiration to those who have a great idea/passion for change and don’t think they have the knowledge to begin building. I’m always open to any questions that might help anyone curious to get started down that path.

There are some exciting things on the horizon for Freeport including plutusV2 upgrades to reduce fees, market creation capability for the masses, stablecoin integration, a more robust reputation system, smart contract audit followed by open sourcing, and many UI improvements.

1 Like

I am not a gambler but I am impressed with your achievement despite not having a programming background.

Very inspirational. I am still trying to learn some Haskell.


Hey, Justin,
Been waiting for a long time to see a Prediction Market enter the Cardano space. Did you get the idea from Or, like me, ever since reading Earthweb?

Hope you don’t mind, but I’ve Tweeted about your new dApp. You’ve shown how easy it has become to now build on Cardano. Well done.

1 Like

For the intro part of the whitepaper, it would be a good idea to open with what are prediction / future markets. Their history, web1/ web2 attempts. I have some links to initial academic papers if you need them.

The stake pot algo you’re using, is not quite what I expected. How did you come to that model?

I’m just very excited to see this beginning.
A well-designed prediction market, can leverage global knowledge to solve the big questions of the future.
Well done again, Justin.

1 Like

I’m very excited to see someone share my same enthusiasm for the concept! I agree the whitepaper could use a rework, but I wasn’t too concerned with making it formal/traditional. I wrote it more as just a more in depth summary of the protocol itself, it assumes slightly more knowledge of prediction markets and their motivations from the reader than it should.
I don’t want to say that I came up with it on my own since I’m sure this type of algorithm is been formalized somewhere a long time ago, but I mainly just played around with the idea of betting pools and built out a rudimentary model in excel that simulated an initial market and subsequent bets to show what moving pieces were needed for the contract logic. I didn’t want to create a swaping protocol where you buy outcome tokens for ada and then can sell them for ada at any point (basically another dex). I wanted the contract to hold all wagers until settlement. I do imagine at some point that if there were long duration markets, where the outcome may not be known for years, the outcome tokens could be traded on a Cardano dex, knowing that their value is dependent on the outcome of the event.

I appreciate you spreading the word!

May I suggest you have a read of Idea Futures - The Concept

I was quickly rereading and something that jumped out at me is that to operate within the US you may need to register with the CFTC. Hence, many past attempts have used points, to be a game, rather than a regulated market. Something to consider.

Lots of links to economic papers in the doc. And I do remember one or two on the mathematical models used. But which ones, I don’t remember, I would need to rescan myself.

This was actually my first Catalyst proposal, when I didn’t fully understand the point of Catalyst. So, I just archived it.

1 Like

Just edited the link at the top. The previous try didn’t work.