Skip to content

Instantly share code, notes, and snippets.

View OxMarco's full-sized avatar

OxMarco OxMarco

  • Somewhere in Europe
  • 18:48 (UTC +02:00)
  • X @OxMarco_
View GitHub Profile

Introduction

One of the primary issues in financial instability situations, like bank runs, is the privilege that first movers have. A well-designed liquidity transformation method transfers redemption costs to the redeeming investors, thereby mitigating the first-mover advantage.

Swing Pricing

Swing pricing adjusts the NAV of a fund to reflect the costs associated with redemptions. This adjustment ensures the remaining investors are equally affected by the costs incurred due to others redeeming their shares.

This is why swing pricing is the primary weapon in the management of any type of funds, designed to mitigate the adverse effects of fud-driven large scale redemptions and break the first mover advantage. There are two major variations of swing pricing:

  • Liquidation-based: This method activates the fee once the fund's cash reserve is depleted and il/liquid assets need to be liquidated.
// 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 / BusinessPlan.md
Last active November 16, 2023 18:47
BusinessPlan.md

Business Plan

Executive Summary

CroPay is positioned to enter the B2B Buy Now, Pay Later (BNPL) landscape, targeting the unique needs of Italy's agricultural business sector. Our innovative approach addresses the inefficiencies of traditional payment methods, such as postdated checks and extended billing cycles, which are prevalent in this industry. By introducing a BNPL service that offers biweekly instalment payments or deferred payment terms of up to 90 days, we enable merchants to receive full payment upfront, thereby enhancing their liquidity, while buyers benefit from more manageable cash flow and simplified expense management.

The Italian agricultural market, with total revenues of €65.4 billion in 2022 and a compound annual growth rate of 18.8% from 2017 to 2022, presents a substantial opportunity. CroPay aims to capture a conservative 0.01% market share in its first year, which we project to increase in subsequent years. This approach is expected to yield revenues of approximately €6.54 mi

@OxMarco
OxMarco / README.md
Last active November 3, 2023 09:03
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

NOTES ON DAO AND SUCH

Where to Incorporate

Cayman/Panama Foundation

Generally used to incorporate DAOs and have similar features to a LLC without having an official director and a public list of members.

Pro:

  • Easy to setup
  • No need to KYC members
@OxMarco
OxMarco / Spritz.md
Created September 19, 2022 13:03
Spritz.md

Spritz Finance - Report

19/09/2022

Repository - General Comments

.husky and .yarn I guess you used Paulrberg template. They are quite useless tbh

.vscode Opinionated to keep it in the source repo, especially if not all your devs use VSCode. Better to add a separate document to explain code style (i.e. formatting, line breaks, comment style, NatSpec position, etc.)