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.
This file contains hidden or 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
| /** This example code is designed to quickly deploy an example contract using Remix. | |
| * If you have never used Remix, try our example walkthrough: https://docs.chain.link/docs/example-walkthrough | |
| * You will need testnet ETH and LINK. | |
| * - Ropsten ETH faucet: https://faucet.ropsten.be/ | |
| * - Ropsten LINK faucet: https://ropsten.chain.link/ | |
| */ | |
| pragma solidity ^0.6.0; | |
| import "https://github.com/smartcontractkit/chainlink/evm-contracts/src/v0.6/ChainlinkClient.sol"; |
This file contains hidden or 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
| pragma solidity >=0.4.22 <0.7.0; | |
| /** | |
| * @title Storage | |
| * @dev Store & retrieve value in a variable | |
| */ | |
| contract Storage { | |
| uint256 number; |
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.
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.
After several tests under different conditions computing units per user lie between 23728 and 51852 CU/User.
This file contains hidden or 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
| 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(() => { |
This file contains hidden or 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
| 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 }) => { |
This file contains hidden or 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
| 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(""); |
This file contains hidden or 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: GPL-3.0 | |
| pragma solidity ^0.5.16; | |
| pragma experimental ABIEncoderV2; | |
| import "./Base/XTokenOracle.sol"; | |
| import "./Uniswap/UniswapAnchoredView.sol"; | |
| import "./Chainlink/ChainlinkPriceOracle.sol"; | |
OlderNewer