Usually, when a build a simple transaction such as making a payment, the transaction usually requires the buyer's payment key. Here is an example transaction I made with Cardano Serialization Lib.

// Payload from API user
const payload = {
    address: 'addr_test...',
    utxos: [...]

const whitelist = ['stake_test1...', 'stake12']
const paymentAddress = 'addr_test1';
const amount = 10 * 1000000

const buyerStakeAddress = RewardAddress.new(

// Franken address will get pass this
if( !whitelist.includes(buyerStakeAddress.to_address().to_bech32()) )
    return false

const protocol_params = await this.get_protocol_parameters(NetworkInfo.testnet_preprod().network_id())
const linearFee = LinearFee.new(

const txBuilderCfg = TransactionBuilderConfigBuilder.new()

const txBuilder = TransactionBuilder.new(txBuilderCfg);
const inputs = TransactionUnspentOutputs.new()

payload.utxos.forEach(raw => {

    Value.new( BigNum.from_str(amount.toString()) )

txBuilder.add_inputs_from(inputs, CoinSelectionStrategyCIP2.RandomImprove)
txBuilder.set_ttl(protocol_params.slot + 3600)

const body = txBuilder.build()
const witnesses = TransactionWitnessSet.new();
const auxFinal = AuxiliaryData.new()
const transaction: Transaction = Transaction.new( body, witnesses, auxFinal )

return transaction.to_hex()

Here you can see it's only asking for my payment key signature.

enter image description here

From the looks of it, there is nothing wrong with this. But the problem is that Franken address will easily get pass the whitelist check condition with a spoofed stake address.

I am wondering if it's possible to ask for both payment and stake key signature in a transaction (maybe without involving any actual staking activity, such as delegating to a pool) so that a franken wallet cannot sign the tx as they don't have a staking private key.

Any ideas?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.