###### tags: `audit`
# Vault 12 Guardians
## MigrationContract
1. [`53 function oracle() external view returns (address) {`]( https://github.com/vault12/vault12_guardians/blob/0437a07aec2220f55aa691e3304ea73327f6f931/EscrowContract.sol#L53)
**Severity**: Minor
**Description**: This function is not needed. Just rename _oracleAddress to oracle and make it public.
2. [`61 function isContractCreationDisabled() external view returns(bool) {`](https://github.com/vault12/vault12_guardians/blob/0437a07aec2220f55aa691e3304ea73327f6f931/EscrowContract.sol#L61)
**Severity**: Minor
**Description**: This function is not needed as contractCreationDisabled is already public.
3. [`82 function hasNewVersion() external view returns(bool) {`](https://github.com/vault12/vault12_guardians/blob/0437a07aec2220f55aa691e3304ea73327f6f931/EscrowContract.sol#L82)
**Severity**: Minor
**Decsription**: Make function public as it is used in inherited contract.
## MigrationInterface
1. [`112 contract MigrationInterface is MigrationContract {`](https://github.com/vault12/vault12_guardians/blob/0437a07aec2220f55aa691e3304ea73327f6f931/EscrowContract.sol#L112)
**Severety**: Minor
**Description**: Change contract to interface and remove inheritance from MigrationContract.
## EscrowContractsStore
1. [`166 address _dateConverterAddress;`](https://github.com/vault12/vault12_guardians/blob/0437a07aec2220f55aa691e3304ea73327f6f931/EscrowContract.sol#L166)
**Severety**: Minor
**Description**: Provide explicit visibility.
2. [`267 function getContractsWith() external view returns(address[] memory owners, address[] memory custodians) {`](https://github.com/vault12/vault12_guardians/blob/0437a07aec2220f55aa691e3304ea73327f6f931/EscrowContract.sol#L267-270)
**Severity**: Major
**Description**: Owners and Custodians messed up.
------
168 address[] public contractOwnerAddress;
168 address[] public contractCustodianAddress;
Какая-то хуйня бесполезная, нахуй это нужно?
------
229 function migrateContractData(
Нахуя эта функция здесь реализована?
------
276 uint amount = 0;
Сука ну ебаный рот этого казино
------
569 uint price = escrowMemory.price.mul(escrowMemory.duration);
Нейминг заебись. Что будет если price умножить на duration? PRICE!
-------
568 uint totalPaymentsDays = now.sub(paidToDate);
Да идите вы нахуй. Как можно из одного таймстемпа вычесть другой и получить что-то измеряемое в днях????
-------
289 function cancelEscrowContract(address custodian) public isActive {
Нет проверок, что контракт не истек. Наверн все ебнется на истекшем контракте.
-------
Комменты к функциям, я ебал, настолько релевантные, что это просто пиздец.
-------
363 function changeCustodianAddress(address custodian, address newCustodian) external isActive {
Схерали там в updatedDate выставляется now? Никаких же выплат не было.
------
387 function increaseDuration(address custodian, uint duration) public payable isActive {
Тут надо иначе играться с memory/storage для оптимизации газа
------
507 function deleteConractDependens(address owner, address custodian) private {
БЛЯДЬ БЛЯДЬ БЛЯДЬ НУ КАК ТАК МОЖНО УДАЛЯТЬ ИЗ КОНЦА МАССИВА СУКА ЕБАНЫЙ РОТ
------
Не смотрел еще:
324 function changeContractPrice(address custodian, uint price) external payable isActive {
415 function renewContract(address custodian) public payable isActive {
457 function withdraw(address owner) external isActive {