Skip to content

Instantly share code, notes, and snippets.

View shanev's full-sized avatar
💭
#BUIDL

shane.stars shanev

💭
#BUIDL
View GitHub Profile

ICS: Cinderella Tokens: An Async/IBC friendly alternative to flash loans

Flashloans are a fascinating economic coordination mechanism that has emerged out the Ethereum architecture as a result of a synchronous, sequential, atomic transaction system. It allows anonymous coordination between capital providers and arbitrageurs because the capital providers can condition providing any capital on protocol enforced guarantee that the entire arbitrage is profitable denominated in the token being lent.

One of the effects of this process has been the it ensures an efficient and healthy liquidation market for the collateral in long term debt instruments. It also enables low cost scaling of economic exploits.

Why don’t flash loans exist in IBC world?

Flash loans are impossible in an IBC world because IBC semantics require finalizing a block on the origin chain rather than on the receiving chain. This makes atomicity for the lender difficult and moves us into the domain of over collateralized lending.

@fxn
fxn / 01 main.rs
Last active August 23, 2021 15:13
Mandelbrot set generator from "Programming Rust", with ports to Crystal and Ruby.
// Mandelbrot set generator from "Programming Rust", with I/O removed (the
// original code writes a PNG file).
use std::env;
use std::str::FromStr;
use num::Complex;
fn main() {
let args: Vec<String> = env::args().collect();
@webmaster128
webmaster128 / json-schema-ref-parser-cli.js
Created October 13, 2021 20:15
CosmWasm schema to TypeScript .d.ts
#!/usr/bin/env node
const $RefParser = require("@apidevtools/json-schema-ref-parser");
function printUsage() {
console.info("Usage: json-schema-ref-parser-cli FILE")
}
async function main(args) {
if (args.length !== 1) {
@bloqhub
bloqhub / gist:ba04d09891bd59c21d9ff228eefadb62
Created October 29, 2021 15:15
Stargaze cosmovisor setup
0. Upgrade node to resease 1.0.0 Using docs:
https://github.com/public-awesome/mainnet/tree/main/stargaze-1
1. setup cosmovisor
cd ~
git clone https://github.com/cosmos/cosmos-sdk
cd cosmos-sdk
git checkout v0.42.7
ics title stage category author created modified
999
One Channel
draft
IBC/APP
Larry Engineer <[email protected]>
2023-03-02
2023-03-02