Finding Submission Examples
Good writing skills are important to communicate complex ideas, ensuring that the reader fully understands the vulnerability’s significance and urgency. Below we provide two examples to follow as a guideline when submitting findings.Good
A good finding report clearly explains:
- What is the issue
- How / Why it is happening
- Where exactly the vulnerable code is located and which logic it connects to
- How to reproduce it with a Proof of Concept (PoC)
- How it can be remediated
.png?fit=max&auto=format&n=ku5dppycuRMaBQ9F&q=85&s=83f87f05e7a6e907a458e23e5d3fb391)
- Clearly describes what the issue.
Thesupplyandwithdrawfunctions can increase the supply share price (totalSupplyAssets / totalSupplyShares). If a depositor uses thesharesparameter insupplyto specify how many assets they want to supply they can be tricked into supplying more assets than they wanted. It’s easy to inflate the supply share price by 100x through a combination of a single supply of 100 assets and then withdrawing all shares without receiving any assets in return.
- Clearly describes why is it happening.
The reason is that inwithdrawwe compute theassetsto be received asassets = shares.toAssetsUp(market[id].totalSupplyAssets, market[id].totalSupplyShares);. Note thatassetscan be zero and thewithdrawessentially becomes a pureburnfunction.
- Clearly points to the vulnerable line using the highlighting-code.md feature.
.png?fit=max&auto=format&n=ku5dppycuRMaBQ9F&q=85&s=c79cca82fd2e9f34314d001bef5ec828)
- Provides a Proof Of Concept for anyone to reproduce and verify the vulnerability.
- Provides a remediation for the client.
Suppliers should use theassetsparameter instead ofshareswhenever possible. In the other cases wheresharesmust be used, they need to make sure to only approve the max amount they want to spend. Alternatively, consider adding a slippage parametermaxAssetsthat is the max amount of assets that can be supplied and transferred from the user. This attack of inflating the supply share price is especially possible when there are only few shares minted, i.e., at market creation or when an attacker / contracts holds the majority of shares that can be redeemed.
Competitions Finding Format
For Competitions, please use the Detailed template when submitting a finding..png?fit=max&auto=format&n=ku5dppycuRMaBQ9F&q=85&s=d0b659e2df7de8db29ae563c1b253c72)
Bad
The finding below is an example of a bad finding submission:
- The description is generic and nonsensical—it shows lack of understanding of the protocol and does not clearly state the exact problem or why it is happening
- It does not point to the lines of code affected
- It does not provide a Proof of Concept (PoC)
