Home Coins YFOS.finance (YFOS) Bank Smartcontract Upgraded: More secure, More Decentralize | by YFOS Finance |...

Bank Smartcontract Upgraded: More secure, More Decentralize | by YFOS Finance | YFOSFinance | Oct, 2020


YFOS Finance

YFOS Bank Contract Initial Review

🤜 We have cooperation with Blockchain Consilium to audit notification contract for YFOS Bank 🏦

Blockchain Consilium — Specializes in ERC20 Tokens and Crowdsale Smartcontracts. Blockchain Consilium is one of the leading Smartcontract auditing firms that has audited contracts like $FTX, $WOM and $SRM.

An initial assessment of the issues and how to solve was given to perfect the Bank before to starting.

Based on that, we have revised the issues and Bank Smartcontract has officially been sent for final finalization by the testers.

Issue 1: Loopy

The audit company found the issue: if the attacker send lots of packages (Package ID), for example 1000 packages. When the interest is due, if they call the “getInterest” command, the contract bank must perform 1000 transactions in a single txHash at the same time, which will cause an error (Because each txHash only includes a maximum of about 200 transactions).

→ Solution: After researching, we updated the contract to solve this issue: Each user can only send maximum 5 packages (Package ID). After reaching all 5 packages (Package ID), users can add a new package by canceling the old one.

Issue 2: Dividend and Rounding Error

This is a common issue in dividend contracts. However, we have come up with a solution from the beginning by “the interest is divided by the amount deposited in”, so it is totally not based on the total amount of rewards in the pool.

About “Rounding Error”, the decimals of the YFOS token is 18, the error is almost zero or very small. In addition, because this is a contract of Bank (not contract of Staking), so it works similar to savings at banks.

Issue 3: Centralize

Although the contract was initially met the requirements of decentralization, but after consultation with the auditors, we decided to upgrade contract with adding the function of binding conditions: The amount of token in the contract (bankBudget) is not enough to pay the interest, the contract will not receive any more deposit.

For example: Contract WETH bank is running at 1:1 interest rate, currently, the total amount of WETH deposited is 99 WETH in the contract and there are 100 YFOS in bankBudget, user can only send 1 WETH to the contract, if the amount of deposit is more than 1 WETH, the contract will inform error.

Thus, we have completed the contract of Bank and passed the audit by the experts of Blockchain Consilium

We will start deploying and launching YFOS Bank in the next 24 hours.



Source link

- Advertisement -
Mr Bitcointe
Mr Bitcointehttps://www.bitcointe.com/
“Fact You Need To Know About Cryptocurrency - The first Bitcoin purchase was for pizza.” ― Mohsin Jameel
474FansLike
76FollowersFollow
4,567FollowersFollow
5,261FollowersFollow
1,549FollowersFollow
2,230SubscribersSubscribe
USD - United States Dollar
EUR
1.17
GBP
1.30
CHF
1.10
NOK
0.11
JPY
0.01
CAD
0.75
AUD
0.70

Most Popular

Cardano releases Daedalus 2.4.0 – AMBCrypto

Cardano had been working on the Daedalus wallet update 2.4.0 for a long time now and was working on the final stages of...

Winklevoss’ Gemini exchange to count crypto taxes in real time

American cryptocurrency exchange Gemini is partnering with tax compliance firm TaxBit to help its customers treport their crypto taxes with TaxBit’s Tax Center...

Fidelity Investments’ crypto arm expands custody to Asia

Fidelity Investments — one of the largest asset managers in the world — continues to expand its global reach in the cryptocurrency industry through...

Binance exchange partner Simplex rolls out Tether to euro offramp

Simplex, a major crypto-to-fiat payments provider, is adding another fiat offramp to enable its partner exchanges like Binance and Huob to sell major stablecoin...
bitcoin
Bitcoin (BTC) $ 13,121.75
ethereum
Ethereum (ETH) $ 384.12
ripple
XRP (XRP) $ 0.242234
tether
Tether (USDT) $ 0.998834
bitcoin-cash
Bitcoin Cash (BCH) $ 262.52
bitcoin-cash-sv
Bitcoin SV (BSV) $ 166.60
litecoin
Litecoin (LTC) $ 54.30
eos
EOS (EOS) $ 2.63
binancecoin
Binance Coin (BNB) $ 29.89
okb
OKB (OKB) $ 4.63
tezos
Tezos (XTZ) $ 1.93
leo-token
LEO Token (LEO) $ 1.27
cardano
Cardano (ADA) $ 0.096739
monero
Monero (XMR) $ 123.51
stellar
Stellar (XLM) $ 0.076849
chainlink
Chainlink (LINK) $ 11.32
huobi-token
Huobi Token (HT) $ 4.19
tron
TRON (TRX) $ 0.026610
usd-coin
USD Coin (USDC) $ 0.999988
dash
Dash (DASH) $ 66.47
neo
NEO (NEO) $ 15.20
iota
IOTA (MIOTA) $ 0.257584
nem
NEM (XEM) $ 0.095183
zcash
Zcash (ZEC) $ 55.73
maker
Maker (MKR) $ 526.97
paxos-standard
Paxos Standard (PAX) $ 0.999227
ethereum-classic
Ethereum Classic (ETC) $ 5.34
vechain
VeChain (VET) $ 0.010179
true-usd
TrueUSD (TUSD) $ 0.999401
ftx-token
FTX Token (FTT) $ 3.91
kucoin-shares
KuCoin Shares (KCS) $ 0.847262
waves
Waves (WAVES) $ 3.00