# ERC-20 Compatibility

The ERC20 specification defines a list of API functions (and relevant events) that each token contract is expected to implement (and emit). The failure to meet these requirements means the token contract cannot be considered to be ERC20-compliant. In this section, we examine the list of API functions defined by the ERC20 specification and validate whether there exist any inconsistency or incompatibility in the implementation or the inherent business logic of the audited contract(s)

|                | Expected Functionality                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Description according to the BEP20 Standard                                                                                                                                                                                                                                                                                                                                                                                         | Compatible      |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| name           | <ul><li>is declared as a public view function ✓</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Returns the name of the token.                                                                                                                                                                                                                                                                                                                                                                                                      | ✓               |
| symbol         | <ul><li>Is declared as a public view function </li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Returns the symbol of the token.                                                                                                                                                                                                                                                                                                                                                                                                    | ✓               |
| decimals       | <ul><li>declared as a public view function</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Returns the number of decimals used to get its user representation                                                                                                                                                                                                                                                                                                                                                                  | ✓               |
| totalSupply    | <ul><li>Is declared as a public view function</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Returns the amount of tokens in existence.                                                                                                                                                                                                                                                                                                                                                                                          | ✓               |
| balanceOf      | <ul><li>Is declared as a public view function</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Returns the amount of tokens owned by `account`.                                                                                                                                                                                                                                                                                                                                                                                    | ✓               |
| allowance      | <ul><li>allowance() Is declared as a public view function </li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through [`transferFrom`](https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#IERC20-transferFrom-address-address-uint256-).                                                                                                                                                                                             | ✓               |
| transfer       | transfer() is declared as a public function                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | <p>Moves <code>amount</code> tokens from the caller’s account to <code>recipient</code>.</p><p>Returns a boolean value indicating whether the operation succeeded.</p><p>Emits a <a href="https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#IERC20-Transfer-address-address-uint256-"><code>Transfer</code></a> event.</p>                                                                                                | ✓               |
| transferFrom   | <ul><li>Is declared as a public function ✓</li><li>Returns a boolean value which accurately reflects the token transfer status ✓</li><li>Reverts if the spender does not have enough token allowances to spend ✓</li><li>Updates the spender’s token allowances when tokens are transferred successfully ✓</li><li>Reverts if the from address does not have enough tokens to spend </li><li>Allows zero amount transfers ✓</li><li>Emits Transfer() event when tokens are  transferred successfully (include 0 amount transfers) ✓ </li><li>Reverts while transferring from zero address  ✓</li><li>Reverts while transferring to zero address ✓</li></ul> | <p>Moves <code>amount</code> tokens from <code>sender</code> to <code>recipient</code> using the allowance mechanism. <code>amount</code> is then deducted from the caller’s allowance.</p><p>Returns a boolean value indicating whether the operation succeeded.</p><p>Emits a <a href="https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#IERC20-Transfer-address-address-uint256-"><code>Transfer</code></a> event.</p> | ✓               |
| approve        | <ul><li>Is declared as a public function ✓</li><li>Returns a boolean value  that accurately reflects the token approval status ✓</li><li>Emits Approval() event when tokens are approved successfully ✓</li><li>Reverts while approving to zero address ✓</li></ul><p></p>                                                                                                                                                                                                                                                                                                                                                                                  | <p></p><p>Sets <code>amount</code> as the allowance of <code>spender</code> over the caller’s tokens.</p><p>Returns a boolean value indicating whether the operation succeeded.</p>                                                                                                                                                                                                                                                 | <p></p><p>✓</p> |
| Transfer Event | <ul><li>Is emitted when tokens are transferred, including zero value transfers </li><li>Is emitted with the from address set to address(0) when new tokens are generated ✓</li></ul><p></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | <p>Emitted when <code>value</code> tokens are moved from one account (<code>from</code>) to another (<code>to</code>).</p><p>Note that <code>value</code> may be zero</p>                                                                                                                                                                                                                                                           | ✓               |
| Approval Event | <ul><li>Is emitted on any successful call to approve ✓</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Emitted when the allowance of a `spender` for an `owner` is set by a call to [`approve`](https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#IERC20-approve-address-uint256-). `value` is the new allowance.                                                                                                                                                                                                                | ✓               |
