Synthetix Ether Collateral Smart Contract Review

### Introduction

This post provides a summary of a smart contract review performed by iosiro on changes made to the Synthetix Ether Collateral smart contract. The review was performed on 28 July 2020.

### Scope

The scope of the assessment was limited to reviewing changes to the smart contracts introduced in the following commits:
* Commit [67c3b07](https://github.com/Synthetixio/synthetix/commit/67c3b0790784aeac8ab28d8d84ad68609a196c0e).
* [PR-612](https://github.com/Synthetixio/synthetix/pull/612/files) (with latest commit 662a323).

As only the issues described below were in scope, a comprehensive security audit was not performed on the rest of the functionality in Ether Collateral or the rest of the codebase.

### Description

The objective of the review was to determine whether the following objectives had been achieved.

#### Fix a [bug](https://blog.synthetix.io/bug-disclosure/) reported by Sam (@samczsun).

✅ `account` updated to `msg.sender` in [67c3b07](https://github.com/Synthetixio/synthetix/commit/67c3b0790784aeac8ab28d8d84ad68609a196c0e).

#### Update a `require` statement to correctly validate whether the depot had enough sUSD available to close a loan, reported by Gnosis.

✅ The validation was updated to correctly determine whether enough sUSD was available in the depot in [57a5718](https://github.com/Synthetixio/synthetix/pull/612/commits/57a57187f47fa77884bf8dd35f0cfda78eed7d5a).

#### Implement [SCCP-27](https://sips.synthetix.io/sccp/sccp-27), which reduced the Collateralisation ratio of ETH backed loans from 150% to 125%.  

✅ Collateralisation ratio reduced from 150% to 125% in [57a5718](https://github.com/Synthetixio/synthetix/pull/612/commits/57a57187f47fa77884bf8dd35f0cfda78eed7d5a).


### Findings

All of the objectives were found to have been achieved and no new issues were identified. Furthermore, the test coverage of EtherCollateral.sol had been extended to 100% line coverage.

Secure your system.
Request a service
Start Now