Kuiper contest - goatbug's results

Automated portfolio protocol.

General Information

Platform: Code4rena

Start Date: 16/09/2021

Pot Size: $50,000 USDC

Total HM: 26

Participants: 30

Period: 7 days

Judge: GalloDaSballo

Total Solo HM: 17

Id: 36

League: ETH

Kuiper

Findings Distribution

Researcher Performance

Rank: 6/30

Findings: 6

Award: $3,819.27

🌟 Selected for report: 7

πŸš€ Solo Findings: 3

Findings Information

🌟 Selected for report: kenzo

Also found by: goatbug

Labels

bug
duplicate
2 (Med Risk)
sponsor acknowledged

Awards

450.8693 USDC - $450.87

External Links

Handle

goatbug

Vulnerability details

Impact

Given a bondDiv of say 400, it requires 0.25% of a portfolios capital to perform a Ddos attack.

Portfolio rebalancing is often a time sensitive task. New weights need to be put into place to take advantage of shifts in capital market expectations etc.

Users can block rebalances by 48hrs, a sizeable window, through a relatively cheap DDoS of 0.25% of the portfolio, a relatively small size.

48hrs since, a 24hr timelock is required for a new proposal, and a 24hr bond arbitration period is required. A user simply watches the mempool and submits a bond proposal immediately to lock the contract in an auction phase.

A user could therefore block a market from any change for more than 196 hours (4*24) for the cost of 1%. 8 Days is often too slow for a portfolio to react and balance in crypto market conditions. This is annoying and another reason one needs to consider the bondDiv more carefully and scale it according to portfolio size.

One could consider simply allowing anyone to settle the auction. This removes the DDoS attack.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

Tools Used

#0 - frank-beard

2021-10-19T16:43:22Z

this is possible however the ability for anyone to rebalance is important. we will look into possible solutions to mitigate this

#1 - GalloDaSballo

2021-12-18T14:08:34Z

Duplicate of #66

Findings Information

🌟 Selected for report: GalloDaSballo

Also found by: goatbug

Labels

bug
duplicate
2 (Med Risk)
disagree with severity
sponsor acknowledged

Awards

1001.9319 USDC - $1,001.93

External Links

Handle

goatbug

Vulnerability details

Impact

function setMinLicenseFee(uint256 newMinLicenseFee) public override onlyOwner { minLicenseFee = newMinLicenseFee; } function setAuctionDecrement(uint256 newAuctionDecrement) public override onlyOwner { auctionDecrement = newAuctionDecrement; }

Proof of Concept

Both min license fee and auction decrement have no restrictions on the values that can be set.

This can be critical and block the contract if a too high value or zero value is set.

I.e. the min license fee could be set higher than the total amount, causing revert.

Similar applies with the decrement.

Tools Used

#0 - frank-beard

2021-09-30T18:37:45Z

it is assumed the owner is trustworthy in this version of the protocol, however we will add mitigations and further decentralization in future updates

#1 - GalloDaSballo

2021-12-19T22:05:46Z

Duplicate of #119

Findings Information

🌟 Selected for report: GalloDaSballo

Also found by: goatbug

Labels

bug
duplicate
2 (Med Risk)
disagree with severity
sponsor acknowledged

Awards

1001.9319 USDC - $1,001.93

External Links

Handle

goatbug

Vulnerability details

Impact

bondPercentDiv can be set to zero by the owner. This would give a div by zero error in line 61 bondAmount = basketToken.totalSupply() / factory.bondPercentDiv(); and brick any portfolio balancing ever.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

Tools Used

#0 - frank-beard

2021-09-30T18:37:13Z

it is assumed the owner is trustworthy in this version of the protocol, however we will add mitigations and further decentralization in future updates

#1 - GalloDaSballo

2021-12-19T22:07:15Z

Duplicate of #121

Findings Information

🌟 Selected for report: goatbug

Labels

bug
2 (Med Risk)
disagree with severity
sponsor acknowledged

Awards

1001.9319 USDC - $1,001.93

External Links

Handle

goatbug

Vulnerability details

Impact

function setAuctionMultiplier(uint256 newAuctionMultiplier) public override onlyOwner { auctionMultiplier = newAuctionMultiplier; }

auction multiplier can be set to zero by factory owner. This would stop the auction settling, function would always revert.

uint256 a = factory.auctionMultiplier() * basket.ibRatio(); uint256 b = (bondTimestamp - auctionStart) * BASE / factory.auctionDecrement(); uint256 newRatio = a - b;

causing a safe math error and newRatio to revert.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

Tools Used

#0 - frank-beard

2021-09-30T18:37:31Z

it is assumed the owner is trustworthy in this version of the protocol, however we will add mitigations and further decentralization in future updates

#1 - GalloDaSballo

2021-12-19T22:06:45Z

Agree with the finding, because the warden showed a specific "admin privilege" that DOSses the protocol, the finding is valid and of medium severity

Findings Information

🌟 Selected for report: tensors

Also found by: 0xRajeev, 0xsanson, goatbug, pauliax

Labels

bug
duplicate
1 (Low Risk)
sponsor confirmed

Awards

43.8245 USDC - $43.82

External Links

Handle

goatbug

Vulnerability details

Impact

Anyone can add any bounty and pass in any smart contract instead of an erc20 token. When calling settleAuction, this triggers a tranfer function to be called from the smart contract that can be used to re-enter the auction or basket code.

Currently this cannot do anything malicious, but after the code is heavily refactored and improved based on the audit, it is possible this reentrancy hook could maliciously be used.

The contract should rather have a whitelist of token addresses that could be used for the bounty to avoid reentrancy.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

Tools Used

#0 - frank-beard

2021-10-19T16:46:37Z

dduplicate of #31

#1 - GalloDaSballo

2021-12-19T15:48:28Z

Duplicate of #136

#2 - GalloDaSballo

2021-12-27T00:48:57Z

After re-review this is a duplicate of #270 Mentions re-entrancy without a poc

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax Β© 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter