Skip to content

Instantly share code, notes, and snippets.

View OxMarco's full-sized avatar

OxMarco OxMarco

View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {IPairFactory} from "./IPairFactory.sol";
import {IPair} from "./IPair.sol";
contract UniV2PoolBricker {
address public constant weth = 0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f;

Rooter - Business Plan

TL;DR

Rooter is a payment terminal that minimises processing costs through internal payment routing while offering superior inventory, customer management, and customised incentive program tools.

It features a dual‑mode POS that automatically detects and processes both traditional card transactions (via the schema, Visa/Mastercard/Amex) and crypto transactions via blockchain settlement (thus skipping the schema fees), dynamically choosing the optimal payment route without any manual input required.

Rooter also provides a cloud POS to manage inventory/SKU and customer retention; for sales and inventory analytics tools we use financial modelling and a LLM to make the numerical results into user-friendly action items.

General Principles

  • Set goals for the team to pursue and align around.
  • One focus per quarter - either a product area or theme; constrains build efforts.
  • Mostly defined Projects.
  • Leave space for smaller items that add a lot of value.
  • Projects should take 1-3 weeks to build with teams of 2-3 people.
  • Build in 2-week Cycles - task density should feel reasonable.
  • Break work into smaller parts when possible - to track / see progress.
  • Every Feature / Project / Design Doc / Task has a single named owner, and the owner is responsible for the ultimate delivery.
  • Increase velocity.
@OxMarco
OxMarco / The Evolution of Banking.md
Last active October 12, 2024 12:46
The Evolution of Banking: Traditional Systems and the Rise of Stablecoins

The Evolution of Banking: Traditional Systems and the Rise of Stablecoins

Banks are quintessential to financial intermediation, engaging in two primary transformations:

  1. Maturity Transformation: Banks convert short-term deposits into longer-term loans. For example, a bank might use funds from savings accounts, which can be withdrawn at any time, to finance 30-year mortgages. This process is crucial for economic growth but introduces inherent liquidity risks.

  2. Fungibility Transformation: Banks transform highly liquid, fungible assets (like cash deposits) into less liquid, non-fungible assets such as loans or bonds. This function allows for the efficient allocation of capital throughout the economy.

With the advent of post-1950s financial evolution, the predominance of traditional banking has been paralleled by the emergence of shadow banking a sector characterised by similar financial activities undertaken by non-bank financial institutions subject to lesser regulations, which now comprise

@OxMarco
OxMarco / Swing Pricing.md
Last active August 31, 2024 08:06
Swing Pricing - a systematic review of possible implementations

Swing Pricing and Liquidation Premiums - a systematic review of possible implementations for a mutual fund

Introduction

One of the primary issues in market turmoil situations, such as bank runs, is the advantage that first movers have: when investors rush to redeem their shares in a fund, those who move first often receive a better asset value, while remaining investors are left to bear the costs related with liquidation. A well-designed liquidity transformation method moves the redemption costs to the redeeming investors, mitigating this first-mover advantage and promoting fairness among all investors.

Swing Pricing

Swing pricing adjusts the NAV of a fund to reflect the costs associated with redemptions. This adjustment ensures that the remaining investors are equally affected by the costs incurred due to others redeeming their shares. As a result, swing pricing is a key tool in managing funds, designed to mitigate the adverse effects of large-scale redemptions and to break the first-mover advan

// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.24;
import {ERC4626, IERC4626} from "@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {ERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
@OxMarco
OxMarco / README.md
Last active August 15, 2024 11:39
README.md

Project Name

Solidity NodeJS NodeJS Docs

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import { Counters } from "@openzeppelin/contracts/utils/Counters.sol";
import { IERC20, SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract CDS is ERC721 {
using SafeERC20 for IERC20;
using Counters for Counters.Counter;

Dandelion: A Decentralised Offramping Protocol for Efficient and Tax-Free Whale Transactions

Abstract

This paper introduces a novel approach to facilitate cost-effective and tax-free offramping for large cryptocurrency holders, commonly referred to as whales. The proposed protocol leverages a decentralised network of random users acting as money relay nodes, allowing whales to transfer substantial amounts of funds to multiple destination bank accounts while mitigating transaction costs and regulatory implications. By utilising zero-knowledge proofs and a reimbursement mechanism, the protocol ensures the successful execution of micro transactions and provides incentives to participating users. This paper presents the design, implementation, and potential benefits of the proposed decentralised offramping protocol.

Table of Content

  1. Introduction
    1. Background
    2. Motivation
  2. Objectives
@OxMarco
OxMarco / SpritzFinance.md
Last active January 16, 2023 23:23
Spritz Finance - Architectural and Code review