<p>Your <code>cardano-cli</code> example is correct - only the <em>verification</em> (public) keys are needed to build addresses, not the private keys. Therefore, we can build shelley addresses with any pair of <code>payment.vkey</code> and <code>stake.vkey</code>, regardless of whether or not they are derived from the same master seed.</p>
<p>&quot;Mangled&quot; in this case just means the payment and stake <code>vkey</code>'s are derived from different master seeds.</p>

CC BY-SA 4.0
2022-10-10T16:22:04.797Z
2022-10-10T16:22:04.797Z
zhekson
<p>ADA addresses (ignoring the bootstrap address type) consist of two components, like this (from <a href="https://github.com/input-output-hk/cardano-ledger/blob/master/libs/cardano-ledger-core/src/Cardano/Ledger/Address.hs#L184-L187" rel="nofollow noreferrer">here</a>):</p>
<pre><code>  = Addr Network (PaymentCredential c) (StakeReference c)
</code></pre>
<p>If you have two address, from two different wallets, you can create a franken address by taking the <code>PaymentCredential</code> from one address and the <code>StakeReference</code> from the other.</p>

CC BY-SA 4.0
2022-10-10T10:05:12.770Z
2022-10-10T10:05:12.770Z
Erik de Castro Lopo
<p>I am pretty sure its not possible to create one of these franken addresses with any of the standard tools. However, if you are relatively competent in Haskell its probably not difficult to write a tool to do it.</p>
<p>If you do not write Haskell, it may even be possible to do it with the JS library <code>cardano-serialization-lib</code> (which I have never looked at).</p>

CC BY-SA 4.0
2022-10-10T08:01:43.487Z
While a tool would ofc be helpful, the main goal of this question is to understand how it is possible to craft such an address when usually the private keys are required to create addresses.
eddex
CC BY-SA 4.0
2022-10-10T07:53:08.500Z
2022-10-10T07:53:08.500Z
Erik de Castro Lopo
<p>I've read a lot about mangled/franken addresses recently. A mangled address is an address, where the payment part of the address belongs to a different wallet than the stake part. This is an important thing to consider when building DApps on Cardano.</p>
<p>I'm wondering how it is possible to create such an address.</p>
<p>To <a href="https://developers.cardano.org/docs/stake-pool-course/handbook/keys-addresses/#payment-address" rel="nofollow noreferrer">create a payment address using the cardano-cli</a>, both the private payment key and the private stake key are required:</p>
<pre><code>cardano-cli address build \
    --payment-verification-key-file payment.vkey \
    --stake-verification-key-file stake.vkey \
    --out-file payment.addr \
    --mainnet
</code></pre>
<p>Let's say we have Alice who owns wallet A and Bob who owns wallet B.</p>
<p>Alice doesn't have access to the private keys of Bob, so how can Alice create an address with the payment part of her wallet A and the stake part of Bob's wallet B?</p>
<p>Or the other way around: How can Alice create a mangled address with Bob's payment part of wallet B and her stake part of wallet A?</p>

CC BY-SA 4.0
2022-10-10T12:51:26.133Z
The `vkey` are just the verification keys not your private (signing) keys which have `skey` suffixes. So creating a franken address only requires someones else's payment or stake `vkey`.
Will
CC BY-SA 4.0
2022-10-10T12:52:49.127Z
You can extract the PubKeyHash of a given address and hence you can also create a franken address combining the payment PKH with your stake PKH.
Will
CC BY-SA 4.0
2023-01-25T07:29:05.867Z
@William-BerlinPool But to spend the utxos i would still need both skeys, isn't it?
wutzebaer
CC BY-SA 4.0
2023-01-25T15:05:31.763Z
@wutzebaer To Spend a UTxO you just need the skey of the payment part of the address. The staking part is not relevant for spending.
eddex
CC BY-SA 4.0
2023-01-26T10:47:43.993Z
For spending any UTxO, you either need the payment skey for the address that the UTxO belongs to, if it is a wallet address. In case of it being a script address, then the on-chain validator logic needs to pass in order for the UTxO to be spent.

Addresses are made up of one or two parts (payment part & an optional staking part). In order to create any address you'll need the verification key (vkey) of each part. All this is only applicable for shelley addresses. Byron addresses don't follow that structure.
Will
<address><mangled-address>
How is it possible to create a mangled address (aka. franken-address) without the private stake key?
# How is it possible to create a mangled address (aka. franken-address) without the private stake key?

(Asked by: username_0 on 2022-10-10)

I've read a lot about mangled/franken addresses recently. A mangled address is an address, where the payment part of the address belongs to a different wallet than the stake part. This is an important thing to consider when building DApps on Cardano.
I'm wondering how it is possible to create such an address.
To create a payment address using the cardano-cli, both the private payment key and the private stake key are required:
cardano-cli address build \
    --payment-verification-key-file payment.vkey \
    --stake-verification-key-file stake.vkey \
    --out-file payment.addr \
    --mainnet

Let's say we have Alice who owns wallet A and Bob who owns wallet B.
Alice doesn't have access to the private keys of Bob, so how can Alice create an address with the payment part of her wallet A and the stake part of Bob's wallet B?
Or the other way around: How can Alice create a mangled address with Bob's payment part of wallet B and her stake part of wallet A?

**Tags:** address, mangled-address
> **Comments:**
> **username_1**: The `vkey` are just the verification keys not your private (signing) keys which have `skey` suffixes. So creating a franken address only requires someones else's payment or stake `vkey`.  
> **username_1**: You can extract the PubKeyHash of a given address and hence you can also create a franken address combining the payment PKH with your stake PKH.  
> **username_2**: @William-BerlinPool But to spend the utxos i would still need both skeys, isn't it?  
> **username_0**: @wutzebaer To Spend a UTxO you just need the skey of the payment part of the address. The staking part is not relevant for spending.  
> **username_1**: For spending any UTxO, you either need the payment skey for the address that the UTxO belongs to, if it is a wallet address. In case of it being a script address, then the on-chain validator logic needs to pass in order for the UTxO to be spent.  Addresses are made up of one or two parts (payment part & an optional staking part). In order to create any address you'll need the verification key (vkey) of each part. All this is only applicable for shelley addresses. Byron addresses don't follow that structure.  

---

## 3 answers

### Answer by username_3 on 2022-10-10. Score: 2 | Accepted answer

Your `cardano-cli` example is correct - only the *verification* (public) keys are needed to build addresses, not the private keys. Therefore, we can build shelley addresses with any pair of `payment.vkey` and `stake.vkey`, regardless of whether or not they are derived from the same master seed.

"Mangled" in this case just means the payment and stake `vkey`'s are derived from different master seeds.


---

### Answer by username_4 on 2022-10-10. Score: 1

ADA addresses (ignoring the bootstrap address type) consist of two components, like this (from here):
  = Addr Network (PaymentCredential c) (StakeReference c)

If you have two address, from two different wallets, you can create a franken address by taking the PaymentCredential from one address and the StakeReference from the other.


---

### Answer by username_4 on 2022-10-10. Score: 0

I am pretty sure its not possible to create one of these franken addresses with any of the standard tools. However, if you are relatively competent in Haskell its probably not difficult to write a tool to do it.

If you do not write Haskell, it may even be possible to do it with the JS library `cardano-serialization-lib` (which I have never looked at).

> **Comments:**
> **username_0**: While a tool would ofc be helpful, the main goal of this question is to understand how it is possible to craft such an address when usually the private keys are required to create addresses.  

---

