Skip to content

Commit

Permalink
feat: update error swagger type, fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarens2 committed Mar 4, 2024
1 parent a8e8bac commit b080ab6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,17 @@ To create a new release:
1. After publication, the action to create a release bump will be triggered automatically.

## How calculation works

Requests are processed by Lido Accounting Oracle and finalized at time of report, when frame ends.
More about finalization process [here](https://docs.lido.fi/guides/oracle-spec/accounting-oracle#request-finalization)

Each withdrawal request finalizing by next sources of eth:

1. Buffer. [method](https://docs.lido.fi/contracts/lido#getbufferedether) from Lido Contract
2. Vault Balances. [WithdrawalVaults](https://docs.lido.fi/contracts/withdrawal-vault) and [ExecutionLayerRewardsVault](https://docs.lido.fi/contracts/lido-execution-layer-rewards-vault) are income potential income in the end of current frame.
1. Buffer. It is [method](https://docs.lido.fi/contracts/lido#getbufferedether) from Lido Contract
2. Vault Balances. [WithdrawalVaults](https://docs.lido.fi/contracts/withdrawal-vault) and [ExecutionLayerRewardsVault](https://docs.lido.fi/contracts/lido-execution-layer-rewards-vault) are potential income in the end of current frame.
3. Rewards. Calculation uses rewards from previous oracle report as approximate number of rewards per future frames.
4. Withdrawable Validators. If network already has some Lido validators with withdrawable epoch will consider them as potential income to buffer for frame of withdrawable epoch of validator + sweeping mean
5. Exit Validators. If previous sources of eth is not enough VEBO is going to exit Lido validators. This process is described [here](https://docs.lido.fi/guides/oracle-spec/validator-exit-bus/).
4. Withdrawable Validators. If network has Lido validators with withdrawable epoch they will be considered as potential income to buffer for frame of withdrawable epoch of validator + sweeping mean
5. Exit Validators. If previous sources of eth is not enough Validator Exit Bus Oracle is going to exit Lido validators to accumulate necessary amount eth. This process is described [here](https://docs.lido.fi/guides/oracle-spec/validator-exit-bus/).

Note, the requests made close to end of frame are postponed to next frame because of limit [here](https://docs.lido.fi/contracts/oracle-report-sanity-checker#getoraclereportlimits).

Expand Down
5 changes: 0 additions & 5 deletions src/http/common/dto/ErrorResponseType.ts

This file was deleted.

20 changes: 20 additions & 0 deletions src/http/common/dto/error-response-type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { ApiProperty } from '@nestjs/swagger';

export class ErrorResponseType {
@ApiProperty({
example: 400,
description: 'Http status code',
})
statusCode: number;

@ApiProperty({
description: 'Array of validation error messages',
})
message: string[];

@ApiProperty({
description: 'Error text',
example: 'Bad Request',
})
error: string;
}
2 changes: 1 addition & 1 deletion src/http/request-time/request-time.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { RequestTimeDto, RequestTimeOptionsDto } from './dto';
import { RequestTimeV2Dto } from './dto/request-time-v2.dto';
import { RequestTimeByRequestIdDto } from './dto/request-time-by-request-id.dto';
import { RequestsTimeOptionsDto } from './dto/requests-time-options.dto';
import { ErrorResponseType } from '../common/dto/ErrorResponseType';
import { ErrorResponseType } from '../common/dto/error-response-type';

@Controller(HTTP_PATHS[1]['request-time'])
@ApiTags('Request Time')
Expand Down

0 comments on commit b080ab6

Please sign in to comment.