Skip to content

Instantly share code, notes, and snippets.

View cNoveron's full-sized avatar
🎯
Focusing

Carlos Noverón cNoveron

🎯
Focusing
View GitHub Profile
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
import "./XToken.sol";
/**
* @title Lendexe's xNativeToken Contract
* @notice XToken which wraps Iota
* @author Lendexe
*/
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
import "./XToken.sol";
interface LexeLike {
function delegate(address delegatee) external;
}
/**
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
import "./XTokenInterfaces.sol";
import "./ErrorReporter.sol";
import "./EIP20Interface.sol";
import "./SwapTools/SwapHelper.sol";
/**
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
import "./XSDInterface.sol";
import "./UltimateLoan.sol";
import "../PriceOracle.sol";
import "../Comptroller.sol";
import "../XErc20.sol";
import "../ExponentialNoError.sol";
import "../SwapTools/ISwapRouter.sol";
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
import "./Base/XTokenOracle.sol";
import "./Uniswap/UniswapAnchoredView.sol";
import "./Chainlink/ChainlinkPriceOracle.sol";
import React, { useState, useEffect, useRef } from "react";
import "./styles.css";
// AbortController is a built-in Web API - no import needed in modern browsers/Node.js
// For older environments, you might need a polyfill
function useFetch(url) {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState("");
import { useState } from "react";
import "./styles.css";
/* Visit www.reactchallenges.live */
/* Instructions:
Create a Progress Bar that should fill based on the input percentage value
*/
const ProgressBar = ({ width }) => {
import { useEffect, useState } from "react";
import "./styles.css";
// Instructions:
// Create a custom Hook to detect if the user scrolled to the bottom of the page
const usePageBottom = () => {
/* logic goes here */
const [reachedBottom, setReachedBottom] = useState(false);
useEffect(() => {

🧮 Vault Batch Processing Computational Benchmark

KEY FINDINGS

The maximum users per batch in real execution conditions is 59 users as found by the compute units stress limits test. Previously Rowship developer @WalquerX who is in charge of unit test mentioned that the limit lied between 7 and 100 users. Through boundary exploration we found out the hard limit of this implementation of the Vault program is 59 users.

LIMITS ANALYSIS

Compute Unit Limits

After several tests under different conditions computing units per user lie between 23728 and 51852 CU/User.

Overflow and Underflow Analysis for Vault State Variables

Overview

This document analyzes all state variables in the vault program for potential overflow and underflow vulnerabilities. The analysis covers the Vault account, UserAccount account, and related data structures.

State Variable Analysis

1. Vault Account State Variables