This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _wrapPreview( | |
uint256 base_ | |
) internal view virtual override returns (uint256 shares) { | |
IYVToken yvToken = IYVToken(address(sharesToken)); | |
uint256 DEGRADATION_COEFFICIENT = 10 ** 18; | |
uint256 freeFunds = yvToken.totalAssets(); | |
uint256 lockedProfit = yvToken.lockedProfit(); | |
if (lockedProfit > 0) { | |
uint256 lockedFundsRatio = (block.timestamp - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: BUSL-1.1 | |
pragma solidity 0.8.14; | |
import "./IERC20.sol"; | |
import "./IERC20Metadata.sol"; | |
import "./MinimalTransferHelper.sol"; | |
import "./CastU256U128.sol"; | |
import "./CastU256U112.sol"; | |
import "./CastU256I256.sol"; | |
import "./CastU128U112.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: BUSL-1.1 | |
pragma solidity >=0.8.4; | |
import {FixedPointMathLib} from "./Marketplace/FixedPointMathLib.sol"; | |
import "./ExponentialNoError.sol"; | |
import "./Marketplace/Interfaces.sol"; | |
/// @notice Get up to date cToken data without mutating state. | |
/// @author Transmissions11 (https://github.com/transmissions11/libcompound) | |
library LibCompound { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"market": { | |
"underlying": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", | |
"maturity": "1648177200" | |
}, | |
"users": [ | |
{ | |
"user": "0xe6d79FD38ad0b7C9be78F03f8fBe4CF01B49a559", | |
"amounts": { |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"market": { | |
"underlying": "0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa", | |
"maturity": "1669957199" | |
}, | |
"users": [ | |
{ | |
"user": "0x7111F9Aeb2C1b9344EC274780dc9e3806bdc60Ef", | |
"amounts": { | |
"notional": "111522090989082212503037", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web3 = Web3(Web3.HTTPProvider(infura)) | |
swivelcontract = create_contract(web3, False, contract_abi, swivel) | |
marketplacecontract = create_contract(web3, False, marketplace_abi, marketplace) | |
vault = marketplacecontract.functions.markets('0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa',1669957199).call()[2] | |
vaultcontract = create_contract(web3, False, vaulttracker_abi, vault) | |
exits =[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"market": { | |
"underlying": "0x4DBCdF9B62e891a7cec5A2568C3F4FAF9E8Abe2b", | |
"maturity": "1639112399" | |
}, | |
"users": [ | |
{ | |
"user": "0x3f60008Dfd0EfC03F476D9B489D6C5B13B3eBF2C", | |
"amounts": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from web3._utils.events import get_event_data | |
from web3._utils.filters import construct_event_filter_params | |
import requests | |
import json | |
from web3 import Web3 | |
import math | |
_cache = dict() | |
def truncate(number, digits) -> float: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"market": { | |
"underlying": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", | |
"maturity": "1648177200" | |
}, | |
"users": [ | |
{ | |
"user": "0xe6d79FD38ad0b7C9be78F03f8fBe4CF01B49a559", | |
"amounts": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0xC7D2c67bC38b0E8b15B632c19Ef629022FD56543": 100000000000000000000, | |
"0x01628A344a6E8Db2aa3E0954BC2C2D1e26444f9D": 3600000000000000000000, | |
"0xF72F3240728C65F04948bC28a7F6772B590cb56F": 5937007874015748300000, | |
"0xCc8c3176C69e8cbb60903cFC91Afd383eB6739d7": 2100000000000000000000, | |
"0x94F5C85ee0233F8D053126cA71d7F4A51101db40": 4800000000000000000000, | |
"0x512aaD1d0E1492a9C4075aBa58cE1a944A74f973": 5937007874015748300000, | |
"0xC487f60b6fA6d7CC1e51908b383385CbfC6c30B5": 4000000000000000000000, | |
"0x570Ad1a6011c6F8d86BB688eD6fD10d55d0DD809": 4000000000000000000000, | |
"0x84817254031e40aA1Ee5c0b144118eF9A029cEAc": 3800000000000000000000, |
NewerOlder