Skip to content

Address Details

Every address has a corresponding identity unit in blockchain ledger, which stores information such as the number of DREP tokens corresponding to the address and the alias. The most common usage of address is to send or receive DREP token in the transaction and query the number of Drep.

Address format

To be compatible with EVM and its relevant tools, DREP’s address adopts the same address encoding method as Ethereum’s, EIP55-compliant. In this way, a byte array is generated after the uncompressed encoding of public key, and then a hash computation will be applied to the generated byte array. Here Keccak256 hash method is applied, which takes the last 20 bits as the byte array, and then a hex encoding will be implemented to the byte array to get a 40-length string. Finally, a check bit is needed here, the logic of check bit is the first two divided 4 bits before hex. If the highest bit among these 4 bits is 1 and the corresponding bit is a letter, then transform it to an uppercase letter. Finally, after adding 0x in the front, here comes the result.

public key => uncompressed serialize => Keccak256 [12:] => hex => add checsum => 0x prefix => address