Skip to content

Instantly share code, notes, and snippets.

View vivekascoder's full-sized avatar
💭
Learning

Vivek vivekascoder

💭
Learning
View GitHub Profile
@vivekascoder
vivekascoder / index.css
Created July 22, 2026 16:28
Obsidian css snippet
.markdown-rendered table tbody tr:nth-child(even) {
background-color: color-mix(
in srgb,
var(--background-primary) 92%,
var(--text-normal) 3%
);
}
.markdown-rendered table tbody tr:nth-child(odd) {
background-color: var(--background-primary);
const SCORE_MATCH = 16;
const SCORE_GAP_START = -3;
const SCORE_GAP_EXTENSION = -1;
const BONUS_BOUNDARY = SCORE_MATCH / 2;
const BONUS_BOUNDARY_WHITE = BONUS_BOUNDARY + 2;
const BONUS_BOUNDARY_DELIMITER = BONUS_BOUNDARY + 1;
const BONUS_CAMEL_OR_NUMBER = BONUS_BOUNDARY + SCORE_GAP_EXTENSION;
const BONUS_CONSECUTIVE = -(SCORE_GAP_START + SCORE_GAP_EXTENSION);
const BONUS_FIRST_CHAR_MULTIPLIER = 2;

test:

        address router = address(0x6131B5fae19EA4f9D964eAc0408E4408b66337b5);
        bytes memory encodedData = hex"e21fd0e9000000000000000000000000000000000000000000000000000000000000002000000000000000000000000063242a4ea82847b20e506b63b0e2e2eff0cc6cb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000b800000000000000000000000000000000000000000000000000000000000000dc00000000000000000000000000000000000000000000000000000000000000ac000000000000000013e8a25cd983c329600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041fc5c53bc326b9b46293fd7a9b97bd4a343c8c5ec9326e522ee4e60d7d778fbe1084b5e39b481fa0dfce1fb364faef0c5c5bf53f04f49dfc424c43d05fd43e2c21c0000000000000000000000000000000000000000000000
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.28;
import {Test} from "forge-std/Test.sol";
import {console2} from "forge-std/console2.sol";
import {AutopoolETH, IAutopool} from "../contracts/tranches/strategies/autousd/IAutopoolETH.sol";
/**
* @title Autopool APR Fork Test
* @notice Forks Ethereum mainnet and computes the base APR for autoUSD

Layerzero integration doc

Layer zero offers the following thing

OFT: For new ERC20 cross chain tokens.

OFTAdapter: For existing ERC20 deployed tokens (works by locking tokens in the contract)

There can only be one OFT Adapter lockbox in your omnichain deployment. Multiple adapters break unified liquidity and can cause permanent token loss due to insufficient destination supply.

version: '3.8'
# Common environment variables used by app services
x-common-env: &common-env
CLERK_JWKS_URL: ${CLERK_JWKS_URL}
CLERK_SECRET_KEY: ${CLERK_SECRET_KEY}
LIVEKIT_API_KEY: ${LIVEKIT_API_KEY}
LIVEKIT_API_SECRET: ${LIVEKIT_API_SECRET}
LIVEKIT_SANDBOX_ID: ${LIVEKIT_SANDBOX_ID}
LIVEKIT_URL: ${LIVEKIT_URL}
Average return: 30.11%
Total return: 270.96%
Total duration: 27 days
Start End Return [%] Peak Return [%] Win Rate [%] Equity Peak [$] Equity Final [$] Max. Drawdown [%] Buy & Hold Return [%]
6 Jul-01-25 Jul-04-25 22.451847 22.451847 50.000000 1224.518466 1224.518466 -18.776288 -2.465899
8 May-01-25 May-04-25 5.980060 28.021885 50.000000 1280.218851 1059.800601 -20.515246 -0.927623
3 Sep-01-25 Sep-04-25 23.810053 34.995735 46.666667 1349.957350 1238.100533 -48.303448 3.368899
4 Jun-01-25 Jun-04-25 22.736669 64.223819 43.750000 1642.238193 1227.366693 -43.733888 2.256369
0 Mar-01-25 Mar-04-25 304.614341 333.699821 42.857143 4336.998207 4046.143408 -40.423044 2.037495
1 Oct-22-25 Oct-25-25 -17.422481 65.668575 36.363636 1656.685754
Position History Summary (SOL-USD only):
Total positions: 11
Status: OK
Position Data:
================================================================================
market side size openPrice exitPrice pnl_percent closedTime
SOL-USD LONG 1.1000 180.2900 184.4600 23.1294 2025-10-23 11:19:40
SOL-USD LONG 2.5000 185.2300 182.4400 -15.0624 2025-10-22 19:58:04
SOL-USD SHORT 2.5000 184.2400 184.9100 -3.6366 2025-10-22 17:23:36