Proposal: New security Audit for Anchor Protocol

Minor update here. I know it seems like this keeps dragging out, and believe me it is. Auditors are so backed up, especially in Cosmwasm. It now looks like Jan timeframe and we are trying to get that lined up - locked in.

There was also the recommendation to add ANC to the bonus pot to make it more exciting and incentivized -talking about the possibility to lock that up for a period of time as well.

Once locked in, it is in our best interest to drive community interest from those big brain hackers we have here in the terra ecosystem to participate. The top warden has already made close to 1 mil this year doing this work!

Iā€™ll report back again as soon as I know more.

2 Likes

Does anyone know if the source of the bLuna price oracle issue we had yesterday was due to something Cryptonics have reviewed? Or was it added in or modified after the audit? I think this is an important factor for which. auditing firm Anchor choose to work with in the future.

Hi Everyone:

Long-awaited update: We have been able to lock in two audits: 1. Cryptonics 2. Code4rena.

  1. Cyrptonics

Itā€™s a pretty straightforward standard audit as laid out by @PFC above. Itā€™s lined up and ready to go for $120,000. Ideally starting January 24 with a 6-week timeline.

  1. Code4rena

As requested Code4rena is the other auditor that will be used. As mentioned it is community sourced so we can leverage our Terra community hackers and auditors to get involved and be rewarded which is crucial since they have skin in the game.

Code4rena said the cosmwasm wardens (community sourced auditors) would need to see about $200,000 to make it worthwhile for them to show up. This is partly due to the shortage of cosmwasm auditors.

To increase the wardenā€™s skin in the game, code4rena put forth we pay $60,000 of the balance with locked ANC tokens. This creates more incentive to do thorough auditing because their tokens will be less valuable if a hack happens. This helps mitigate ANC dumping after the audit. We still have to look into the locking mechanism coding and if it will be feasible to unlock every month for 12 months.

Once the current ANC voting min prop reaches quorum this will go live for voting.

5 Likes

Wasnā€™t the point to avoid using Cryptonics due to their bad reputation

1 Like

The point was to have two audits. A bad reputation is a manner of perception and some in the community donā€™t think they have a bad reputation and would not vote for solely a community-sourced audit. This adds diversity and all stakeholders win since anchor really needs two audits anyways.

2 Likes

Thanks for the update @bitn8, thatā€™s great news! Is the bounty reevaluation being discussed anywhere? 50k is extremely low IMO.

@Rhumidian: With auditors being heavily backlogged and CosmWasm ones being ever rarer, I think a Cryptonics audit is better than no audit, especially since one is badly overdue. Now that these are in the pipeline, we should start planning ahead for the next audit and try to get it on the books asap as thatā€™ll give us more room to choose the auditor.

Which auditors would you be more comfortable hiring? Certik?

2 Likes

Agree that an audit should be done. I would be happy to move forward with this plan to use cryptonics under the pretext that we have another audit done by another firm in the future again. This would be inline with moving towards a more continuous audit schedule.

I have been in contact with trailofbits for an a comprehensive audit of anchor, however I have yet to get a quote. I believe the soonest this could be completed would be by the end of Q2 2022. I will chase them up and see if they have a quote ready.

2 Likes

Why not use Halborn who have been active on other Terra protocols like Spec and Nexus (i think this is right). Are they any good, any comments?

1 Like

We can do, if you can get a quote from them that would be great.

Did anyone contact CertiK, to see if they could be an option? Are they experienced in Cosmos projects?

@bitn8 I have contacted Trail of Bits. For a comprehensive review of Anchor they are quoting $480k USD (12 Engineering weeks). Could we put this to a proposal?

Code4rena is saying 200k, Oak is saying 120k. Anchor code is not that complex. We can get nearly 3 audits from different companies at that priceā€¦

What are your thoughts on the price tag and added benefits?

3 Likes

Good reputation as they have good track record but IMO 3 audits is better than 1 (if we book them all) but realistically we should do them allā€¦

2 Likes

@bitn8 Here is the review, they will review all auxiliary contracts too so itā€™s more in-depth.

Description of Services
Trail of Bits will provide the following services as requested or as needed by the Customer:
ā— Security review of the Customer source code through a combination of manual and automated review, with a focus on the token contracts, money-market contracts, bAsset contracts, bEth contracts, and vault contracts. Activities include but are not limited to:
ā—‹ Apply a comprehensive suite of tools to automatically uncover bugs
ā—‹ Review the architecture of the system for design flaws
ā—‹ Perform detailed manual code review
ā—‹ Identify security and correctness properties to:
ā–  Test them using state-of-the-art fuzzers
ā— Related services as requested by Customer or recommended by Trail of Bits
ā— Best-effort guidance after the project to address security questions that arise via
email or Slack.

1 Like

I agree. Basically it boils down to our budget for an on-going audit schedule. @bitn8 do you have any figures to help us form a rough idea of what we can afford to spend on auditing on a regular basis?

Ideally, itā€™s up to the community. But letā€™s use a benchmark of what Audits cost and not overpay. 350k for the year should be good.

I would like to see more focus from the community on increasing the bug bounty.

2 Likes

I agree, it seems like the process for evaluating and paying out claims need to be made more clear and binding too, according to @Unl1k3lyā€™s recent tweets.

Going with Trail of bits means we fail our target of two audits because using them will put us out of budget for the year.

I think we should go with Cryptonics and Code4rena because two ā€œaverageā€ (defined by peopleā€™s perception of reputation) is better than none or just one.

Remember guys, the point of regular audits is to (1) defend against new exploits as well as (2) against prior bugs that werenā€™t spotted. To be clear:

  1. For new exploits, we are hoping these two auditors are up to date enough to find them.
  2. For prior bugs that werenā€™t spotted, its a numbers game over the long term - over time weā€™re hoping many auditors will eventually stumble across those old bugs.

So to summarise, I think we should put it to a vote so we can get a move on with cryptonics and code4rena and get some peace of mind!

4 Likes

I just wanted to update everyone that work is being done to update the gov contract to be able to have more than one gov vote at a time. Currently, there is the Astro migration vote live, then we need the refund vote. Hoping the update can happen soon so we can get this vote live as well.

3 Likes

Is there any way we could boost the budget, I donā€™t think it would be insane to put $1m to the audit budget.

1 Like