I really enjoy programming in Ruby, and my preferred web framework has been Ruby on Rails for many years. But, setting up to work on a new project is one of my least favourite yaks to shave. Over the years, web development has become more complicated, and a new Ruby on Rails project can involve: … Continue reading Installing Rails from scratch using Docker
Blog
Rewarding Liquidity Providers
Using a commission in our automated market maker to reward liquidity providers
Tracking Liquidity in the Automated Market Maker
Using Liquidity Provider Tokens (LP tokens) to keep track of who provided liquidity to the Automated Market Maker (AMM)
Adding Liquidity to the AMM
Adding/removing liquidity from the Automated Market Maker
Trading the Automated Market Maker
This post is part of a series on DeFi. Here is the previous post, and this is the first post in the series. We've seen how buying and selling from the Automated Market Maker (AMM) alters the token price. Now let's see what it looks like when we have multiple people (counterparties) buying from and … Continue reading Trading the Automated Market Maker
Refactoring the Ruby Automated Market Maker
This is the second in a series of blog posts about DeFi. The first post is here. In the last post, we implemented the buy method of our Automated Market Maker (AMM) like this: # Counterparty pays `amount` eth for some tokens def buy(amount) ether = amount.to_f @ether_reserve += ether new_token_reserve = @konst / @ether_reserve … Continue reading Refactoring the Ruby Automated Market Maker
Ruby Automated Market Maker
I've been getting interested in Decentralized Finance (DeFi) recently, and wanted to understand some of the core ideas better. I find the best way for me to properly explore an idea is to implement it in code so that I have something I can poke with a stick, to see how it reacts. In this … Continue reading Ruby Automated Market Maker
Using Ansible to configure a cloud VM
This is the second post in a series. Part one is here. Now that we have our VM, let's use Ansible to configure it as our development environment. Config and Playbooks Ansible instructions are defined in YAML files known as "playbooks", with global configuration in a file called ansible.cfg by default. Create a file called … Continue reading Using Ansible to configure a cloud VM
Developing in the cloud with terraform and ansible
I've been trying for a while to set up a workable development environment in the cloud, for several reasons: Renting the computer capacity I need, for just as long as I need it, seems less environmentally damaging and wasteful than buying a new, expensive laptop every couple of years. A VM in the cloud has … Continue reading Developing in the cloud with terraform and ansible
Deploying a web application on Dokku
This is the second post in a series. The first post is here. In the previous post we set up a dokku server on DigitalOcean using terraform. In this post, I'm going to show you how to host a web application on your dokku server, including setting up a PostgresQL database, and an SSL certficate … Continue reading Deploying a web application on Dokku