Are there guides for Router Contracts available (now or in the near future)?

Seeing as Plutus is brand new and that our Pioneers are the very first people who every write Plutus contracts, there are no best practices yet - and we hope our pioneers will help us discover and document some.
Of course, as soon as people have gathered experience with Plutus, we will be happy to publish such best practices.


How does one create a new native token with full control?

Here is a step-by-step recipe for creating a native asset manually: https://silas-stulz.medium.com/you-want-to-create-your-own-nft-heres-how-you-do-it-on-the-cardano-blockchain-9a0bbf8caa39.


How are NFTs being minted without smart contract in Cardano?

On Cardano, an NFT doesn't require a Smart Contact, as it is minted as an native asset.
To make sure a NFT is a really non-fungible, the minter of the native asset is usually locking its minting policy in time. In other words, you mint just one native asset and lock any further minting/burning in time, so it is impossible to increase its supply starting from a specific slot time.
As an example, have a look at the minting script of nutcoin.


We will see some form of Hydra in action by end of 2021 or the first quarter of 2022. Charles mentioned a couple of times that a separate team is always working on it and will try to release it sooner than previously planned.


Does Marlowe Run have the capability to mint NFTs?

No, it is not planned for Marlowe to have a feature to mint NFTs or native tokens.
However, it will use tokens internally to represent the ownership of a role in contact.


How to delegate ada to several staking pools using only one wallet?

In Yoroi, it is possible to delegate to multiple pools using a single wallet, but not in Daedalus. To delegate to multiple pools in Daedalus, you will need to create separate wallets. The stake associated with each wallet can then be delegated to a specific stake pool.
It is worth noting that multiple-pool delegation using a single wallet will not be supported on the mainnet.
Source : https://cardano.org/stake-pool-delegation/ (At the bottom, "Can i delegate to multiple stake pools ?")


All ADA has already been minted. Technically it was all minted in the first block. The stake pool payouts come from the reserves and transaction fees.


How are transaction fees determined for bulk sends?

The minimum fee is for the transaction as a whole, calculated as a * size(tx) + b, where a and b are protocol parameters. However, there is a Min-Ada-Value of 1 ADA which is the minimum size of a UTxO. The maximum possible UTxO set of Cardano is actually 45 billion for this reason. Anyway, you'd need to send 1 ADA per UTxO (which can be in the same transaction) and then the only limit should be the size of the transaction being less than the size limit of a block.
You can read more about this here:
Docs:
https://cardano-ledger.readthedocs.io/en/latest/explanations/min-utxo.html
Implementation:
https://github.com/input-output-hk/cardano-ledger-specs/blob/master/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA/Rules/Utxo.hs


How to query a Cardano node for an NFT's owner?

There is no way to find that information without syncing the whole blockchain into a database with a tool such as cardano-db-sync.
This takes a lot of time and resources, so you might want to use an API like blockfrost.io to query the addresses owning a specific token.
$ curl  -s -H "Project_id: $BLOCKFROST_PROJECT_ID" https://cardano-mainnet.blockfrost.io/api/v0/assets/00000002df633853f6a47465c9496721d2d5b1291b8398016c0e87ae6e7574636f696e/addresses | jq
  [
   {
    "address": "addr1qxlmfhfcjck5pctuvlpww3kuxvqjucz40qusgeqgmyqq4utntgjccmteyrsldd67rxv2yq6ew2a7t48q34p9j7nf0kjqskku78",
    "quantity": "1"
   }
  ]


Find your transaction, look at it on cardanoscan.io to get the policy_id and token_name, adjust the following link https://pool.pm/<policy_id>:<token_name>, and you'll see it.


Where can I find formal work comparing PoS and PoW models?

There are many variations on proof of work and proof of stake.  It is unlikely that there will be a formal comparison of these broad concepts.
The closest you are likely to find are informal comparisons such as Charles Hoskinson's video "Video for Jack: PoW versus PoS"


Technically it should be possible once the IELE virtual machine is finished. Currently it is still under R&D.
Once complete, we should be able to run code from any platform/framework inside the virtual machine if the appropriate conversion tools are also built.


How would a 51% Attack on the Cardano blockchain be started and overcome?

The 51% attack is used by an attacker to take over the blockchain. Usually, the community of a blockchain has to reach consensus, which means that once someone mints a new block, other nodes validate it. The majority has to agree that the new block is valid and thus the blockchain has grown one block. All other nodes accept the new block and all it's content (transactions) as valid and "follow" it, as in using is as a starting point to calculate the next block.
For a proof of work blockchain like Bitcoin, this would mean to have more hashing power than anyone else on the blockchain. This would even allow to you overwrite existing blocks. To regain control, the "honest minority" had to increase their hashing power.
For a proof of stake blockchain like cardano, an attacker would require more than half of all staked ada. An attacker would have to buy 22.5 billion ada of the currently circulating supply of ~33bn ada or control enough pools to which this amount of ada had to be delegated to. Buying ada would drive the price up, depending on how fast he wants to buy and how much he agrees to pay per ada and would be very difficult, same goes for running enough pools that attract enough delegators as well.
The attacker could then dictate the content of the minted blocks. To regain control in a scenario where the adversary bought the ada, the "honest minority" would have to buy his coins, which the attacker would have to agree to. In theory, this could be very difficult. However, it is almost impossible for an attacker to obtain that many ada in the first place.
If the attacker controls enough pools thus has enough control over more than half of all staked ada, the honest owners of the coins could simply switch to honest pools.
As for all 51%: with a growing number of honest users participating in a healthy network, an attacker will have a harder time to take it over, until it becomes basically impossible.


What's the point of new incoming addresses with the Daedelus wallet?

While it's intended to be a privacy-enhancing measure, it's currently somewhat negated by the fact that any Cardano wallet that's currently registered for staking has every address easily linked to the staking address (e.g. see Addresses tab of https://adastat.net/accounts/7e8e16462417aaf4d82249228050eb66b16a143c0433b08de794675f). So you might want to create a separate wallet that's not involved in staking for any intermediate transactions where the new address re-use will actually have the desired effect (not sure if legacy Byron wallets are still create-able anywhere, they would also do the job!).


Relay Node & Block-Producing Node, which one requires more Hard Disk capacity?

Both nodes need to download the Cardano blockchain and therefore both nodes need some disk space. Currently the space needed is ~25GB.


Hardware requirments for running a stake pool?

As per this documentation,
https://docs.cardano.org/en/latest/getting-started/stake-pool-operators/creating-a-stake-pool.html,
in terms of hardware, you should ensure you have the following:

8 GB of RAM

24 GB of hard disk space

a good network connection and about 1 GB of bandwidth per hour

a public IP4 address

Note that processor speed is not a significant factor for running a stake pool.


If by NFT you mean a locked native token, it is not possible to add smart contact functionalities to it later, unless you somehow remint a new one under a smart contact and somehow burn the old NFT (which might not be possible as its policy is locked).


What are technical differences in smart contract execution on Cardano in comparison to Ethereum?

Feel free to improve! :)

technical aspect
Cardano
Ethereum
notes

model
eUTxO-based
account-based
see cardano lecture,see question,...

smart contract code location
not stored on-chain, but shipped with transaction
stored on-chain ?

smart contract maximum count
unlimited
limited ?
see question

access third party contract e.g. an oracle
import and use lib (required or just helpful?),, compile your own contract, ship third party validator script with transaction, ...
call it via an address ?
see question

...
...
...
...


The phrase I like to use often is that Cardano is "An operating system for the decentralized web".


I have kudos in Catalyst/ideascale, why can't I give it?

If there are more team members in the proposal that you have, then you cannot give kudos to the proposal.
You must accumulate as many kudos as there are team members in the proposal.


How can smart-contract disputes be addressed?

Obligations that are written into the contract, can't be disputed. For example, if a contract allows money to be withdrawn from the contract address, only if the party leaves their money inside for some period of time, then it can be made impossible for a withdrawal to occur before the time is up, using the programming language of the contract.
For things that can't be made impossible through code, then in some cases we can rely on penalties and rewards to enforce the desired running of the contract. One could code in a reward to any entities who provide a proof that a party was trying to cheat the contract, and penalise those parties who are caught. But for this to work, we need ways of providing proofs about the real world that our contracts can understand, which is why oracles will be an essential part of such systems.
For any obligations that are not written in the code of the contract, they will rely on the same things that are in place today, court systems and public reputation. Legal systems may choose to recognise smart contracts as legally binding, and provide some pathway for dispute resolution when a smart contract has failed to do what was intended or otherwise.


cardano-cli calculate-min-fee expects Shelley era transaction body

Looks like the transaction is created with a different version of cardano-cli.
Can you please confirm the file /tmp/tx.dummy is the same as tx-1622014393N.dummy?


How can a node verify a transaction with a script address without the script?

By inspecting the current ledger CDDL specifications, you can see that each block contains a transaction_witness_sets field, where each transaction_witness_set is defined as:
transaction_witness_set =
  { ? 0: [* vkeywitness ]
  , ? 1: [* native_script ]
  , ? 2: [* bootstrap_witness ]
  }

Here, native_script, if present, contains some rules that need to be respected in order for the transaction to be valid (for instance, some minting policy):
native_script =
  [ script_pubkey
  // script_all
  // script_any
  // script_n_of_k
  // invalid_before
     ; Timelock validity intervals are half-open intervals [a, b).
     ; This field specifies the left (included) endpoint a.
  // invalid_hereafter
     ; Timelock validity intervals are half-open intervals [a, b).
     ; This field specifies the right (excluded) endpoint b.
  ]

So not only the script hash is included in the chain, but also the actual rules it contains.


How does one create receive addresses for a wallet programatically?

Multi address wallets are usually called Hierarchically Deterministic (HD) wallets and are defined by the BIP44 standard.
In Cardano, we do extend BIP44 in CIP1852 by adding staking key capabilities, but this is not your use case.
To derive wallet addresses for a single wallet, it is easiest to use an existing library that can do this for you, as for example the cardano-seralization-lib by Emurgo.
Have a look at their documentation, but this easy snippet you will show you how to derivate the 10th address of your wallet:
function harden(num: number): number {
  return 0x80000000 + num;
}

const rootKey = CardanoWasm.BIP32PrivateKey.from_bech32("xprv17qx9vxm6060qjn5fgazfue9nwyf448w7upk60c3epln82vumg9r9kxzsud9uv5rfscxp382j2aku254zj3qfx9fx39t6hjwtmwq85uunsd8x0st3j66lzf5yn30hwq5n75zeuplepx8vxc502txx09ygjgx06n0p");
const accountKey = rootKey
  .derive(harden(1852)) // purpose
  .derive(harden(1815)) // coin type
  .derive(harden(0)); // account #0

const utxoPubKey = accountKey
  .derive(0) // external
  .derive(9) // <- here is the index of your address, cycle thought this number to generate more of it
  .to_public();


While there's definitely some limit determined by the encryption scheme used to generate the public keys associated with the master private key, their is no practical limit that I'm aware of.
Apparently the most recent wallet addresses (Shelley era) are in BECH32 format, which support 2^160 number of addresses. So, practically unlimited.


No validation happens for outputs: Anybody can send anything with arbitrary datum to any address.
So in your example, those 100 USDT would indeed be locked forever.


Is there a metadata standard for native assets (talking about fungible tokens first) in Cardano?

As of now, there is no metadata standard/CIP defined for native tokens. But you can follow this CIP PR to know a bit of how the community is trying to define a standard for the same (your inputs are welcome).
Also, you can follow the metadata of some of the NFTs currently live to follow the schematics in case you are going to build a project.

cardanoKnitties
cardanoBits


Where can I learn to make Cardano NFTs that have varying rarity levels when they are purchased for the first time?

You can use this tool to create native tokens or NFTs: https://cardano-native-token.com
This is the easiest userfriendly way at the moment.
It's required to have more technical skills if you want to make more complicate NFT setup.


You did not account for Byron, where one slot was 20 seconds.
To make it easier, take the start time of epoch 209 which is the Shelley hardfork and started at 1596491091 unix time on slot 4924800.
Therefore to calculate the time of the current slot, you might try something like: 1596491091 + (current_slot - 4924800).


Daedalus only has two translated languages. Can the community add more?

From what I read here at https://github.com/input-output-hk/daedalus/issues/2423 (open on Mar 2, closed on Mar 3), there is indeed only 2 languages, English and Japanese, and yes the community already proposed for more translations, but as of now they will focus on the two actual as adding a new language requires to check carefully “every single line of text”. The verdict is that translations cannot be done by external contributions as it requires “internal people that are always present” for last-minutes changes.
I might propose that you could help translating other projects related to Cardano, for example maybe you could connect with people from specific staking pools!
It is a great initiative. :)


Is the Cardano testnet indefinite and immutable?

No, there are plans to reset the testnet in the future, probably sometime after Goguen.
But it is immutable forever, if you keep the blockchain data.


Is Cardano the only platform with 100% decentralized block production?

This all depends on how you view it. For instance, consider Bitcoin. Bitcoin has 100% decentralized block production, since no central authority owns Bitcoin and can regulate its block production. One might argue that the large mining companies that control a majority of block production makes this decentralization somewhat dubious. To be fair, the same thing happens with Cardano. Consider how much of the Cardano block production the Binance stake pools control.
To be honest, I am not sure there is a straightforward answer to your question. I would say that other chains have achieved full decentralization; however, Cardano is one of the most decentralized (if not the most) due to the numerous stake pools operated by individual community members.


Why is there a small difference between addresses derived by the cardano-address tool and Yoroi?

There is indeed missing a part of the address: the delegation part. For more information, please refer to this partially duplicate question and CIP-0019.
To derive Yoroi addresses from a seed phrase using the cardano-addresses tool:
./cardano-address key from-recovery-phrase Shelley < phrase.prv > root.xsk
cat root.xsk | ./cardano-address key child 1852H/1815H/0H | ./cardano-address key public --with-chain-code > root.xvk

# Derive the stake key.
cat root.xvk | ./cardano-address key child 2/0 > stake.xvk

# Only the index of the payment address is incremented to yield the next Yoroi address:

# First address
cat root.xvk | ./cardano-address key child 0/0 | ./cardano-address address payment --network-tag mainnet > payment.addr
./cardano-address address delegation $(cat stake.xvk) < payment.addr > payment-delegated.addr

# Second address
cat root.xvk | ./cardano-address key child 0/1 | ./cardano-address address payment --network-tag mainnet > payment.addr
./cardano-address address delegation $(cat stake.xvk) < payment.addr > payment-delegated.addr

# Third address
cat root.xvk | ./cardano-address key child 0/2 | ./cardano-address address payment --network-tag mainnet > payment.addr
./cardano-address address delegation $(cat stake.xvk) < payment.addr > payment-delegated.addr


Is it possible that an honest validator node gets penalised in Cardano's POS scheme?

Cardano does not applies slashing (negative incentive) as it's reward scheme allow to maintain necessary security with it.
The only penalty is the rewards the stake pool operator and its delegators has missed to obtain.


Could the Daedalus wallet use less space on laptops?

Do you need to run the full Daedalus wallet? On low-storage system I'd suggest looking at Yoroi which is a 'light wallet' that doesn't require its own local node.


Is the length (in characters) of a token policy id always the same?

The policyId is the hash of the policy script. It is a blake2b-224 hash resulting in 28 bytes and a hex length of 56 chars. So, your code will always work and is the right way to do it.
Find the spec defining the scriptHash here, note that the scriptHash is of type hash28 denoting the hash length.
Also, the assetName can be of any length between 0-32 bytes. Something to keep a note of in your application, this also means that there can be a token without assetName. Find the assetName length spec here


There isn't currently a Javascript library, but it looks like the Cardanoscan folks are building one for interfacing with the Cardano blockchain (link to article).
The current pioneer's testnet for writing smart contracts uses Plutus. You can read more about this here.


Where is the returning Contract Monad in the handleError function of Contract Monad?

Definitions:
submitTx :: forall w s e. (HasWriteTx s, AsContractError e) => TxConstraints Void Void -> Contract w s e Tx
void :: Functor f => f a -> f ()
handleError :: (e -> Contract w s e' a)-> Contract w s e a -> Contract w s e' a
Explaination:
submitTx tx is of type Contract w s e Tx, i.e. a Contract Monad with return type Tx.
void takes any Monad and maps it to a Monad with return type (). This is useful if you don't care for the returned value: void $ submitTx tx :: Contract w s e ()
handleError then takes the Monad and handles any errors with the specified error handler (e -> Contract w s e' a). However, it doesn't change the return type of the Contract Monad. In case there is no error on runtime the return value is just passed through.
payContract calls itself recursively on the last line of the do block in order to listen to the pay-endpoint indefinitely. Let's assume you'd leave out handleError and only use void $ submitTx tx your contract would crash on the first submission error.
If you wouldn't use void, your program would still be valid, but your compiler would output a warning, because you didn't use the return value of submitTx tx.


What is the exact implementation of proof of stake in Cardano?

You might want start by checking out the documentation library. Go here and search on page for "Ouroboros".


What does Atala Prism use ADA and the Cardano network for?

No. If Atala Prism is going to record its information on the Cardano blockchain (as IOG have said on numerous occasions), then it will have to do so with transactions that pay transaction fees in ADA.
For example, that means that the 5 million Ethiopian high schoolers enrolled in Atala will be driving some transaction volume into the Cardano blockchain.


Where can I find recordings of previous Catalyst town halls?

The user page of IOHK on Crowdcast has all the recent town halls in chronological order.  The recordings have their presentation slides and the questions (asked and answered) included in the player.
The recordings on IOHK's YouTube playlist only has the video stream available.


Burning tokens after the 'before' time slot?

Not right now, but IOG is working for a way to burn these, so for now, keep them around!


Hasura - Graphql Playground throws "GET query missing" 400 status code response

To access the playground, you have to manually turn it out using this guide.


Are there any negative effects of having too many stake pools run by central exchanges?

TL;DR: Centralization in the network is definitely a concern, but I don't think these numbers are scary.
Of course, the goal with staking pools is that they'll decentralize the network and encourage many stake pool adopters. Actually, Cardano has a formula used to determine block rewards and you'll notice that it reduces rewarding blocks to stake pool operators (SPOs) drastically after a critical value, determined by the number of ADA that will saturate a pool (currently that's ~63.6M ADA). So, there's not a lot of benefit for wallets/users to delegate their stake to a node which is over-saturated since the block rewards will have to be divided among a greater number of people.
However, the stake pool operators have almost no control in the governance/control of the protocol and are only responsible for providing trust/decentralization to the network.
Theoretically, if any single miner controls >51% stake then the security of the blockchain is lost. Practically, though, analysis has determined that with >50% probability a one-block attack can succeed with only 35% control of the network (see page 11). So, centralization is definitely a concern.
Now, if you treat all organizations as "independent stake pool operators" and don't denominate based on corporate structure/private ownership then you'll notice that the largest stake is Binance with 12.36%. I've read the details regarding the provenance regarding that chart, I'm not sure how accurate it is. To be sure, there's some uncertainty in these numbers.
However, my guess is that you'll see this distribution swing over 12-month periods as people seek higher returns from smaller SPOs and move funds to/from different exchanges who compete on rates.


How and when do CAs in Catalyst get feedback on their reviews?

The vCA's have a google doc (bear with us for now) that we share amongst ourselves for tracking review the reviewers. The CAs remain anonymous while the vCA's do not.
There has been some talk about in the future having a way for CAs to anonymously receive feedback for their reviews that were flagged in order to help guide CAs in the right direction.
I think this would be tremendously valuable, especially as the number of CA's grows almost exponentially in order to keep up with the expanding amount of proposals.
I second that you should simply join the Telegram channel and stay up to date on the latest developments from Project Catalyst, as things are changing very rapidly as we learn what works and discarding what doesn't work very well.


There is currently no announcement regarding a date. I have seen rumours that the Plutus Pioneer testnet is already up and running (probably caused by a web page that displays timers at certain milestones) - this is not true.


How can I write unit tests for Plutus contracts?

You can use the EmulatorTrace monad introduced in Lecture #4 for unit testing. You find examples of such tests in https://github.com/input-output-hk/plutus/tree/master/plutus-use-cases/test/Spec .


Will small stake pools find it hard to cover running costs?

If the stake pool does not create a single block in the epoch, it receives no rewards.
If it is elected and is able to create at least one block, it receives the fix pool fee, which is right now minimum of 340 ADA plus the margin fee.
Minimal hardware configuration is debatable, but you can run a pool as low as 1 EUR (about 1ADA with today prices) per epoch.


How are unused/outdated smart contracts handled on Cardano?

For one thing, the validator script associated with a smart contract is not stored on the blockchain; the blockchain only stores the hash just like for a lot of other things. When the code of the validator script changes, the script address also changes, but because the script is not stored on the blockchain, the cost of abandoning a smart contract is like that of abandoning a regular address.
So, there will be no blockchain storage problems with having a lot of unused smart contracts, no more than with having a lot of abandoned regular addresses, and the requirement that each UTXO contains at least a certain amount of ADA limits the number of addresses with non-zero balance.
To avoid losing assets, the developer should move the balance from the old script address to the new script address when he updates the validator script though that may not always be securely feasible without giving the developer/maintainer too much centralized power over the smart contract's operations.
However, someone may build an off-chain metadata service that allows registering validator scripts to facilitate lookups by hash and such a service may accumulate junk and get storage problems unless they address the issue.


Where can I find design and documentation resources for Cardano Smart Contracts?

I am not a techie. Lars has been posting Plutus videos on YouTube. Plutus is the main language for smart contracts on Cardano. I think it if searchable as Plutus pioneers program. That should get you to the trailhead. I'm not a techie but that is where I would start.


How can redundancy be established for producer nodes?

Currently, a block producer can only send out its blocks if there is an incoming connection to it. So, as long as your backup block producer has no incoming connections, it can be "hot" and ready to produce blocks. I recommend having a relay pointing to a backup block producer, but prevented from connecting by a firewall rule.
Use CNCLI ping to determine if the main block producer is up or down. Depending on the answer, you can add/remove the firewall block to the backup block producer.
Example script to run with cron once per minute. In this example, a backup relay and block producer are installed on the same server.
#!/bin/bash

# are we blocking? In other words, we are not in failover mode
isblocking=`/usr/sbin/iptables --list INPUT --numeric | grep REJECT | grep 5050 | wc -l`

#if [[ $isblocking -eq 1 ]]
#then
#  echo "NON-failover mode. checking..."
#else
#  echo "FAILOVER mode. checking..."
#fi

error=`/home/westbam/.cargo/bin/cncli ping --host relay0.myserver.com --port 5000 | jq .status | grep error | wc -l`
if [[ $error -eq 1 ]]
then
  #echo "relay0 error. check relay1..."
  sleep 10
  error=`/home/westbam/.cargo/bin/cncli ping --host relay1.myserver.com --port 5000 | jq .status | grep error | wc -l`
  if [[ $error -eq 1 ]]
  then
    #echo "relay1 error. check relay2..."
    sleep 10
    error=`/home/westbam/.cargo/bin/cncli ping --host relay2.myserver.com --port 5000 | jq .status | grep error | wc -l`
    if [[ $error -eq 1 ]]
    then
      if [[ $isblocking -eq 1 ]]
      then
        echo "$(date): Enter FAILOVER mode..."
        # remove the local node blocks
        /usr/sbin/iptables --delete INPUT -p tcp --dport 5050 --jump REJECT 2> /dev/null
        /usr/bin/mail -s "FAILOVER" 9999999999@msg.fi.google.com <<< "FAILOVER to relay3 enabled"
      fi
      exit 0
    fi
  fi
fi

if [[ $isblocking -eq 0 ]]
then
  # we're not blocking local traffic, but we SHOULD be. Turn on the blocks
  echo "$(date): Return to NORMAL mode..."
  /usr/sbin/iptables --insert INPUT -p tcp --dport 5050 --jump REJECT 2> /dev/null
  /usr/bin/mail -s "NORMAL" 9999999999@msg.fi.google.com <<< "failover disabled"
fi


Why Strict evaluation operator "!" used in record definition used in Plutus core?

This is correct. Plutus Core uses eager evaluation. You can see this in the first section of the Plutus Core Specification. I'm not sure why however I'd expect it is to allow you to accurately estimate fees and avoid infinite data structures.
This PDF contains the formal language specifications of the Plutus Core language.


What commercial (brick and mortar) banks support ADA staking?

Binance is the only leading exchange which offers staking that I'm aware of.


Plutus Pioneer Program - Lecture #1 Problem with cabal build

It looks like your cabal version is too old.
You can make sure you have the right one if you first start a nix-shell at the top-level directory of the plutus-repository, then cd to the code folder of the plutus-pioneer-program-repository and run cabal build from within that nix-shell.


Will there be token burn at any point in time in future?

Decreasing the supply of ADA by burning tokens is a method to artificially raise the value of the remaining supply. It has been repeatedly stated that all ADA has an owner/purpose and supply will not be reduced by burning ADA.
ADA relies on use and utility to increase its value.


How can I tell if I have successfully registered for voting on Catalyst proposals?

Try to re-register.
However, at the moment of writing this post, there are no current Catalyst project registrations, are you sure you are just not using an older version of Daedalus?


Is there a timetable of dates for Project Catalyst phases/cycles?

As you can find here there is a link to IdeaScale portal and link to Telegram chat group in which they announce all new events (Crowdcast, Fund cycles, etc.).
Basically every 6 weeks we have a fund round but sometimes because of technical or other reasons there are delays (as with Fund 4).
You can also subscribe to the email newsletter to receive the latest updates or to check in Cardano forum.


You would probably want to use the AWS node as relay. This way you don't have to distribute the IP address of the Raspberry Pi in the Cardano network. (I assume you want to run the Raspberry from your home).
You also need to figure out if you have a static IP where you setup the Raspberry or if you get a dynamic IP from your ISP. If you get a dynamic IP, you need to make sure you either update it in your relay node every time it changes or you need to setup some sort of dynDNS service.


do you need to know Haskell to code in marlowe

Yes, you would need to know some Haskell basics to edit your Marlowe contracts if you don't want to use Blockly or JS.


Is there a maximum number of transactions a block can hold?

Both the block size and the transaction size are defined as protocol parameters. These can be changed at any time by IOG, or voted on once we have Voltaire. Blocks come on average every 20 seconds, but the closest blocks can be currently is every second.
maxBlockBodySize is 65536 bytes and maxTxSize is 16384 bytes. As the network becomes more useful and congested, these parameters can be changed to accommodate the additional traffic.
We can also modify the activeSlotsCoefficient which is currently 0.05. By modifying this we can make blocks appear more frequently on average instead of 20 seconds.
Cardano has a verify flexible protocol so it can adjust quite a bit on its own before we need to worry about implementing hydra for additional scalability.
{
  "txFeePerByte": 44,
  "minUTxOValue": 1000000,
  "stakePoolDeposit": 500000000,
  "decentralization": 0,
  "poolRetireMaxEpoch": 18,
  "extraPraosEntropy": null,
  "stakePoolTargetNum": 500,
  "maxBlockBodySize": 65536,
  "maxTxSize": 16384,
  "treasuryCut": 0.2,
  "minPoolCost": 340000000,
  "maxBlockHeaderSize": 1100,
  "protocolVersion": {
      "minor": 0,
      "major": 4
  },
  "txFeeFixed": 155381,
  "stakeAddressDeposit": 2000000,
  "monetaryExpansion": 3.0e-3,
  "poolPledgeInfluence": 0.3
}


Can I restore my Yoroi account with only 12 phrases?

Yoroi uses 15 words for its seed phrase. You did probably used Daedalus to generate it. I recommend you to try to use Daedalus to restore it.


Not directly, as the token minted on the Cardano blockchain will be a new asset.
If such an use case is needed, one might use an oracle to see it or metadata to record it at the minting time.


How to make your own coin on the ADA Cardano Network?

You'll need to use the Cardano CLI. It's technical and a programming background is helpful but not required. Here is a walk through video.


How long does it take to sync a node or a Daedalus wallet? What factors does it depend on?

It all depends on your hardware, mostly CPU and network connection (yours and your peers), but on most newer hardware you should be able to sync it within a day right now.


When smart contracts launch, will every node on the network have to run every contract transaction?

The validation of the state change of a smart contact in the eUTXO model is done when accepting the transaction. When a node validates a transaction, the node determines if the transaction is allowed to use a certain output as an input. The transaction will look up the script provided by the output's address and will execute the script if the transaction can use the output as an input. The node can validate multiple transactions in parallel if they are not consuming the same input.
References:

https://iohk.io/en/blog/posts/2021/04/13/plutus-what-you-need-to-know/
https://iohk.io/en/blog/posts/2021/03/11/cardanos-extended-utxo-accounting-model/
https://iohk.io/en/blog/posts/2021/03/12/cardanos-extended-utxo-accounting-model-part-2/


Does pool pledge amount impact odds of getting a block?

A high pledge does not increase the chance for the stakepool to get a block, but it does give a higher reward for the stakepool with a larger pledge than the other one. A estimation of assigned blocks per epoch for a pool can be calculated like this:
[stakepool total stake]/[total stake] x 21600
The pledge can only be linked to the wallet address belonging to the stakepool, meaning that you cannot take others stake in your stakepool and put it up as pledge, if you tried this the pledge would not meet, and the stakepool would not be able to mint the blocks it get assigned, losing potential rewards all together.
PS - I do believe someone in the community has found out how to have multiple people pledging to a stakepool, but this is out of my scope.


Development is alive and kicking.
Alongside our native smart contract language Plutus, we are still on track with the KEVM and its support for languages like Solidity and Glow.


Voting on Catalyst with multiple wallets

Each wallet will represent its own amount of ADA and will have its own representation for voting.  You won't be able to pool the amounts together and will have to register each wallet to vote independently.


How to restore a wallet with 24 words and passphrase?

The wallets support "hidden" wallets on hardware devices with passphrases but you can't restore the wallet directly into Daedalus or Yoroi. Instead, you need to restore the wallet to a new Ledger device and then connect it to the software
wallet.


When do rewards transfer to a wallet in Daedalus?

The rewards are automatically deposited by the protocol in the stake (rewards) address associated with the wallet. They are included in your wallet total balance. In order to spend these funds, they must be moved to a spending address within the wallet (become an UTxO) which costs a transaction fee. Daedalus automatically does this for you the next time you send ADA out of the wallet (combining transaction fees). There is not really a need to move the funds from your rewards account to your spending account unless you need to spend them. They earn compound rewards whether they sit in your rewards account or spending account.


I would like to run a relay node on Ubuntu 20 server without creating a wallet, what are my options? Are packaged binaries available?

A stake pool is just a full node with some additional configuration, so the binaries are the same.
If you need to run cardano-node, you might want to start with its Getting started documentation and you can find the release binaries on the Github's release page of cardano-node.


What will the ERC20 converter use as an exchange rate?

I assume that a good solution would be to provide an oracle that calculates the average price coming from different exchanges.


As I front-end developer, how should I start learning more about blockchain and should I start with Plutus?

Smart contracts on Cardano are actually developed using Haskell which is then compiled into Plutus Core by the Plutus Tx compiler. Plutus Core is a very low-level programming language and programming wouldn't be fun.
The best place to start learning is to participate in the Plutus pioneers program.
More Haskell resources:
If you are not familiar with Haskell, grab a book such as Learn You a Haskell for Great Good!, as it will be very helpful.
If you want to focus on the Haskell features required for programming smart contracts, have a look at the Mongolia class recordings: Haskell and Crypto Mongolia 2020
Also see this YouTube playlist: Haskell for Imperative Programmers


Are the locked funds in a contract still considered as delegated to a wallet and can get staking rewards?

Yes, it will be possible to associate a staking address for script outputs.


Could the d-factor still be changed, to revert to more centralized block production by IOG?

Cardano has three different pillars of decentralization:
The first pillar: block production. Once d hit 0, this pillar was fully decentralized.
The second pillar: networking. It means how nodes find each other and pass on this information. Currently, this is a topology file and it will be replaced by P2P discovery.
The third pillar: governance. The way to vote on all protocol parameters (like d) and updates and access fundings of the treasury.
So to answer your question: yes, theoretically, it would currently be possible to increase the d-parameter again. But should IO do so, it would certainly be a disastrous signal.


How to access the current slot in a Plutus validator script?

Accessing any runtime information (including current slot) should not be possible in the validator by design. The reason is that transaction validity needs to be deterministic on construction. The only reason a transaction cannot be executed afterwards would be, if a UTXO was already consumed or the slot is outside of txInfoValidRange (as explained in this Youtube video).
There might be other use cases, but making sure expired oracle data isn't consumed anymore could also be achieved by deactivating an oracle (which would require the oracle contract to support it). And also it is in the best interest of the party creating a transaction to make sure only trustworthy oracle data is consumed.


What advantages does Cardano have over other "fast" blockchains?

I recently discovered Solana too and found that it has awesome speed. Here are my thoughts from a little review:

Decentralized limit: Hardware recommended requirements for Solana nodes are pretty advanced which limits the amount of nodes that can be run.
Speed: Project Hydra from Cardano has a theoretical limit of 1M TPS acheiving 1/10 of that will still be significant.
Adoption: Its not always just about technology, I like IOG approach to get adoption with deals. Even if the Africa deal falls through they are still pursuing other opportunities.
Transparency: I honestly couldnt find any way to actually connect with the people behind Solara. It just looks like they are popping out high performance tools. I do wonder if there is a tradeoff being done for speed.

Finally, I really like the goal of Cardano which is about making the world a better place by building for the globe.
Most of the crypto ecosystem is mainly in first world countries.


There is an issue open on Daedalus github requesting this feature. Looking into the linked pull request, the feature appears to be complete but not enabled for the main client yet. Per Daedalus devs, the solution right now is to import the keys to Yoroi. You could do this after transferring out balance & rewards to minimize the security risks.


Tokens are uniquely differentiated by their Policy ID and Asset Name, which are combined to make a unique Asset ID. The Policy ID is a hash of the monetary policy script that was used to mint the token, and the Asset Name identifies the token under that Policy ID. So long as you just mint one token with the a particular asset name under that policy, the NFT will be unique.
So, the ticker (its Asset Name or the "Ticker" field its minting metadata) is not unique by itself, but the Asset ID or its Policy ID will distinguish it from other tokens with the same ticker.


Can two-factor authentication (2FA) be added to the Daedalus and Yoroi wallets?

2FA (in the traditional sense) relies on a shared secret. By design, this can only work in a centralized environment like an exchange or an online wallet, not with a wallet that interacts directly with the blockchain.
But there are other ways to achieve this, and a multi-sig would be possible and kind of the blockchain equivalent of 2FA. Multi-sig means, for example, you need two private keys to access the funds. (both keys should live on different devices)
There are also more advanced and configurable multi-sig solutions (m-of-n type) like: there are three private keys (m), and two of them (n) are sufficient to control the funds. We will see beautiful solutions here in the future.


Will Cardano's transaction fees be expensive (similar to ETH gas) in the future?

My answer is no. And there are two reasons.

Cardano is a PoS protocol. Therefore, users don't pay for electricity cost. In a PoW system, miners need to solve computational questions to be able to produce blocks which consumes electricity. This price is covered by users when users make transactions.

Cardano will have more TPS compares to Ethereum currently which also contributes to a lower transaction fee.

However, on-chain solutions have limitations. Blockchains need to implement off-chain solutions to increase TPS and lower transaction to be able to make microtransactions. Cardano has given their solution which is called Ouroboros Hydra.


What should I be doing to become a top tier Plutus Developer?(Besides Plutus-Pioneer-Program)

Fello Plutus Pioneer here.
Besides following the lectures closely and doing the homework (potentially several times), I would recommend digging into the actual plutus project, go through the source and find your way around. As you know, plutus is currently being developed, so any videos, articles, and documents (even comments in the source code itself) can be outdated rather quickly. So my suggestion is to work with plutus closely. Find some use cases to implement, but also follow the development closely.
See if you can fix some of the issues and/or review the PRs that are made on the GitHub repo and contribute your own.


How can smart contracts interact each other?

It can't.
But that doesn't mean different smart contracts can't interact. The interaction must simply happen in the same transaction.
As an example, imagine you have some Uniswap-like liquidity pool as one UTxO and another UTxO belonging to an auction contract. Then you can use the pool to swap tokens and then use the swapped tokens to bid in the auction, all in one transaction. That transaction will have both UTxO's as inputs (plus additional inputs for the funds that you swap) and updated UTxO's for both the liquidity pool and the auction as outputs.
You have to think differently when working with the EUTxO-model, but that model is at least as powerful as the accounting model used by Ethereum.


Providing metadata to `cardano-cli transaction build-raw`

Looks like you are using the CLI correctly, and the question was really about the NFT metadata standard. The usage of "721" as the top level key is to be compatible with Etherium token metadata and 3rd party sites that showcase ETH NFTs.
Alessandro of BERRY/SpaceBudz is the one who proposed this as a CIP on the Cardano forums and it seems to have been widely adopted at this point.
Edit: See also Is there a metadata standard for native assets (talking about fungible tokens first) in Cardano?


is it possible to build a cardano multicurrency dApp wallet?

From my understanding Exodus and Guarda are not dapps, which makes your question tricky to answer. I'm going to try and answer some questions that may be related to what you are asking and hope it helps.
First, Cardano is available on many of these multicurrency wallets so if your question related to have ADA or and Cardano tokens added to these wallets then it already is in place. ADA is supported on Exodus for example and I assume they will integrate support for other Cardano-based tokens once they are released.
Next, if your question relates to the dapp support that Exodus has, in particular compound, then I think this is certainly possible down the line. I can certainly see Exodus integrating support for a Cardano-based DeFi dapp given it has enough community support and usage.


You can get the inside view by Edsko de Vries, creator of the hardfork combinator, here: https://youtu.be/D8OTZULEsaI


Blockchain Simulator Chokes on Validation Error

The problem is that in the off-chain wallet code, after submitting the transaction, there is a line of code that waits for the transaction to be confirmed. Seeing as the transaction is invalid, it will never be confirmed, so the wallet contract blocks on that line forever.
There would be workarounds, but in the final version of Plutus, it will be possible to check the status of validation from the wallet and for example detect if the transaction was invalid.
This means handling this and similar situations will be much easier in future.


Can Babel fees be extended to be a protocol level DEX?

I think you may want to consider reversing the order here. The intent behind babel fees from my understanding is to leverage future conversion guarantees, DEXes, and other avenues for guaranteeing liquidity/conversion to ADA rather than to provide it's own mechanism.
We know these mechanisms will exist on chain from third parties so there is little reason for the foundational infrastructure itself to attempt to solve the problem as well. Instead it can leverage the existing solutions (once smart contracts are live) and allow competition and market forces to push for improvements and drive down prices.
It may be possible depending on how the negative values in EUTxO are implemented. The main issue is that as described in the blog post it currently relies on the assumption that transactions are only filled if the block producers can find a way to fill them. This would still likely be relying on conversion guarantees, DEXes, and other avenues for guaranteeing liquidity/conversion. Essentially this means if the block producers can't or won't exchange the tokens themselves, they'll have to use an on chain solution or the protocol will have to be extended so that non block producers can fill the requests. While this change can be done it would be very much non-trivial as it would likely require running an entire second network for negotiating order filling in between block production.
The issues with using this for running a DEX or liquidity system outside of just implementing it so that using it for DEXes would be feasible are that it'd create a lot of unnecessary transactions on-chain (which is inherent to on-chain DEXes) and depending how the system is implemented, it may put significant unnecessary load on the block producers. You'd probably want to run it on a state channel or side chain however both introduce new problems. The state channels would pose issues as joining may end up too expensive and side chains have significantly weaker security guarantees which would place using such a DEX somewhere in-between on chain and using a CEX in terms of security guarantees.
Additionally note that babel fees are in the paper phase at the moment. This means we won't see them on-chain for at least a year or two and the ecosystem may look vastly different than it does now so our assumptions as to how exchanges and liquidity systems operate may have changed significantly (based on the change we've seen in the last year or so).
TLDR: Maybe. We do not know remotely enough about how the system is implemented to know whether it would be feasible or even possible yet. When a paper on the topic is published, we should know enough to reason about the potential however as it stands it could be anywhere between completely feasible and impossible.

I may be off-base here. If so, I'd appreciate someone chiming in to correct me.


Yes?
In the lecture #4 of the current Plutus Pioneer program, there's a way to run a faux blockchain with Plutus contracts.  The first 90 minutes are a Haskell tutorial, but then it goes into how to use the EmulatorTrace.
It's not a full testnet, so it might not be a full replacement for Ganache (which I haven't used), so maybe No.


No, as the smart contract cannot produce blocks.
However, funds within a smart contact can be delegated to a pool.


Can I change the challenge my insight or proposal is located in?

Sadly, this is not possible right now. You have to recreate it and delete the other one.
:(


How do I build a debug configuration of a Plutus project?

This may have to do with Haskell being a functional language. Meaning that unlike imperative languages, there is no 'breakpoints' due to the nature of the language.
The other link you mentioned only works with I/O operations where they follow an 'imperative' style. The answer for your question would be to find a new way to debug functional programs seeing as they dont work with imperative style debugging.


What makes Cardano different from other cryptocurrencies like Bitcoin and Dogecoin?

Cardano is classified as a third-generation Cryptocurrency due to the following reasons.

Smart Network  It is almost impossible to have smart transactions in Bitcoin Network. In Cardano, the transactions will be programmable.
Energy Consumption Cardano uses the Proof of stake concept for evolving consensus with respect to the selection of valid transactions. This reduces energy consumption for running the network by approximately a million times. Cardano can be run using embedded processors.
Research Cardano is an organically evolving financial operating system with more than 100 peer-reviewed academic research papers. While Bitcoin protocol is more or less frozen since the mechanism for adaptation does not exist.
Governance  There is a established mechanism for governance financed by the protocol itself through treasury for continuous research, management, and guidance of the project by its stakeholders. No such mechanism exists in Bitcoin.
Bottom-up Approach   Cardano aims to have practical utility in the lives of millions of people neglected by the traditional financial system. While Bitcoin is just a store of value.

I am avoiding mentioning the other project being compared in the question since I feel it's a meme made with the purpose to discredit cryptocurrency and does not deserve an effort for answers.


You can use Plutus Playground to test your code and maybe in the near future we will have more options.


What events are kicked off when a transaction is submitted?

When a transaction is submitted, it is loaded into the node's mempool. This is like a waiting room for transactions that haven't yet made it on the blockchain. Whether the node is daedalus, or a stakepool, the nodes communicate with each other using the TxSubmission mini-protocol. New transactions are sent to all other nodes in the network.
Once a stakepool has been elected to make a block, it drains its mempool while validating all the transactions. It will fill up the block with all the transactions or until 65536 bytes (the current max block size which could be increased in the future).
That block is published on the blockchain. The BlockSync mini-protocol transmits the block until it propagates to all nodes. All nodes process the transactions in the block and remove any transactions from their mempool that have made it into the block.


How can a developer access the Cardano network?

If you use Nix or NixOs, it is rather straightforward: Build the code for a cardano node using nix (link to current documentation)
Duplicating the official documentation:
git clone https://github.com/input-output-hk/cardano-node
cd cardano-node
nix-build -A scripts.mainnet.node -o mainnet-node-local
./mainnet-node-local

This will run a cardano node on the mainnet.
Then you can also build and use the CLI tool to interact with the cardano network.

In the provided solution above, if you don't want to compile GHC which can take a long time, IOHK provides many binaries that are pre-compiled for you: lots of time gained ! So don't hesitate to use their nix binary cache
In NixOS, I currently set it this way:
# configuration.nix
{ config, pkgs, ... }:
{
  # ... all the rest of the configuration of the server

  # iohk binary caches
  nix =
  {
    binaryCaches          = [ "https://hydra.iohk.io" "https://iohk.cachix.org" ];
    binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo=" ];
  };
}


What is the maximum timeout for a contract that you can define in Marlowe?

You're correct that the duration of a Marlowe contract could be practically "infinite": there is no specific limit on the timeout slot for a Marlowe contract.


How to get intellisense/auto suggestion working for Plutus in VSCode?

Simply install the Haskell extension from inside Visual Studio Code. You'll get there by pressing Ctrl+Shift+X and searching for Haskell.
Note that the extension requires a ghc installation (=<8.10.4) on your system. The current release of ghc 9.0.1 is not yet supported.


Why am I prompted to recover Yoroi Wallet every time on startup?

Not sure which platform (iOS/Android) you're using or which version of Yoroi wallet. And, I'm a bit confused about the two options. In my Yoroi application (Android, Yoroi v4.0.2, Commit ea5c1120) I see the option to access my wallets (saved) or, at the bottom,

ADD WALLET (SHELLY-ERA)
ADD WALLET (BYRON-ERA DEPRECATED)

So, if you don't see your wallet(s) listed under (My wallets) then you'll need to either:

A. CREATE WALLET (which will create a new wallet that will be saved in the application in the future)

B. RESTORE WALLET (which requires you to have already created a wallet and have your 12/24 word recovery phrase, your private key)

C. CONNECT TO LEDGER NANO (which requires you to have a Ledger Nano hardware wallet)

You'll need to decide which path makes the most sense for you, but my guess is you'll want to do 1. -> A.


You can check the token policy for that. For most NFT projects you can look it up on https://pool.pm
A token policy can look like this:
{
  "scripts": [
    {
      "keyHash": "66833acfcf26d87e56bc829aa7bcef13295d4eee4d8b442175bd67a9",
      "type": "sig"
    },
    {
      "slot": 31882046,
      "type": "before"
    }
  ],
  "type": "all"
}

You can see the "slot": 31882046 and "type": "before" values which means tokens with this policy can only be minted before slot 31882046. To be sure that your NFT is unique, you can check that the quantity is 1 and the current slot of the blockchain is later than the one mentioned in the policy.
This policy is from the following NFT: https://pool.pm/1131301ad4b3cb7deaddbc8f03f77189082a5738c0167e1772233097.CardanoBits1947


Can the max supply of ADA be decreased or burned?

Decreasing the supply is a method to artificially raise the value of the remaining supply.  It has been repeatedly stated that all ADA has an owner/purpose and supply will not be reduced.  ADA relies on use and utility to increase its value.


These are synonyms. Stiftung is German for foundation. The Cardano Foundation is located in Zug, Switzerland - a German-speaking part of the country.
The twitter handle of the (now verified) Cardano Foundation is CardanoStiftung: https://twitter.com/CardanoStiftung.


Plutus Pioneer Program - Lecture #4 Homework - Best practice for logging errors

The exception handler does not cover the first payment contract run. I've created a separate function for this that handles this error:
payContract' :: Contract () PaySchema Void ()
payContract' = Contract.handleError
    (\err -> Contract.logError $ "Caught error: " ++ unpack err)
    payContract

Then of course you have to call the payContract' in your emulator tracer as follows:
h1 <- activateContractWallet (Wallet 1) payContract'

You can also combine everything together like this:
payContract :: Contract () PaySchema Text ()
payContract = Contract.handleError
    (\err -> Contract.logError $ "Caught error: " ++ unpack err) $ do
    pp <- endpoint @"pay"
    let tx = mustPayToPubKey (ppRecipient pp) $ lovelaceValueOf $ ppLovelace pp
    void $ submitTx tx
    payContract


Can I run a stakepool on a home router without a fixed IP address?

You could but it is not recommended. You could use DynDNS service, associate the address with an actual DNS entry from your domain. But, from years of experience managing infrastructures, you will run into problems.


What's the difference between "on-chain" and "off-chain" in plutus smart contracts?

I think the Plutus core specification gives pretty good explanation.

Plutus Core code (and code intended for execution on a blockchain in general) can be executed in two different environments: off-chain and on-chain. As the name suggests, off-chain execution doesn’t happen on the blockchain itself, but in some other environment, such as in an electronic wallet on a smartphone or PC. In contrast, on-chain execution takes place on core nodes, machines which are actually maintaining the blockchain.

Not only the environment is different though. The purpose is also different:

On-chain code is used to validate transactions. It will be run every time somebody wants to submit a transaction to the blockchain. If validation succeeds, most likely the transaction will be written to the chain. Fees also should be paid for running the on-chain code to prevent DoS of the blockchain (if there are no fees, anybody can submit an infinite loop to the blockchain and then every node running this code will be stuck and thus blockchain won't be able to operate)
Off-chain code is used to build and submit transactions and also query the blockchain. Say, you want to participate in online auction running on Cardano. In order to do so, you need to make a bid. To make a bid, you need to send specific data to the auction smart contract, say the ID of the lot and amount of Ada. Off-chain code builds such a transaction, runs off-chain validation (so you can avoid spending fees for invalid transactions), calculates the fees and submits the transaction to the blockchain


Let's assume your pool has the below configuration,

Cost - 340 ADA
Margin - 1%
Pledge - 5000 ADA
Delegation from all delegators - 5000 ADA

We will not discuss the reward calculation timing in this question, as it is a topic for another question.
When reward calculation happens, pool performance is calculated. Which in simple terms is how much total stake the pool controls across all pools ie. this pool controls (X+Y) note - pledge + delegation and the number of blocks it should ideally mint based on the stake it controls. Based on the performance, a pool is set to receive some ADA, for this pool let's keep that ADA to be 1000 for 1 block minted.
Now we have,
Total Rewards for the pool and delegators - 1000 ADA
Next, the protocol will calculate pool fees. Pool fees are the fixed cost + margin.
In this case, pool fees are as below
fixed cost + ((reward-cost)*0.01)
340 + 6.6 ADA
Now we have pool fees = 346.6 ADA
remaining rewards for the delegators = 1000 - 346.6 = 653.4
Next, the protocol will calculate rewards for the delegators from the remaining ADA, which is a straightforward process, each delegator gets rewards as per the share of their stake.
Considering there are 3 delegators including the owner's pledge

owner pledge - 5000 ADA (50%)
delegator 1 - 2500 ADA (25%)
delegator 2 - 2500 ADA (25%)

The reward distribution is as below,
Available Rewards to be distributed = 653.4 (note remaining after pool fees)

owners stake rewards - 326.7 ADA
delegator 1's rewards - 163.35
delegator 2's rewards - 163.35

Now, NOTE that the owner's stake rewards + pool fees are paid to the reward account itself. The owners don't get the stake rewards into their own accounts.
so the pool reward account will get = 326.7 (pledge staking reward) + 346.6 (pool fees) = 673.3
The delegator rewards are paid to the respective staking addresses.
Important to note, if the pool fee is 100%, which means all of the rewards are taken by the pool and nothing is left for the delegators.
here's an example of a pool running at 100% fees that it produces 0 rewards for the delegators. PRIVATE POOL


How to validate transaction where number of tokens are generated based on the value locked in a contract?

Yes, Constraints.mustForgeValue and Constraints.mustPayToTheScript are used to define/create a transaction that forges tokens or locks tokens in your script respectively (https://youtu.be/6VbhY162GQA?t=1720).
There are multiple script types that validate different aspects of a transaction.
If you want to spend funds locked in a script(address) you need a validator script (Plutus.V1.Ledger.Scripts.Validator) that will validate any transaction consuming the UTXOs locked in that script. To lock funds in a script you need to transfer funds to that script, thus creating a new UTXO that is owned by the script.
If you want to forge tokens in a transaction you need a minting policy script (Plutus.V1.Ledger.Scripts.MonetaryPolicy) which validates that the forged tokens adhere to the specified policy. Minting policy scripts don't have a Datum and Redeemer available, because the transaction is not consuming a UTXO locked in the minting policy. I don't think sending funds to a minting policy makes sense or is even possible.
In your case you might want to have two scripts:

MonetaryPolicy: validates the minting transaction
Validator: A script that manages funds created from minting

The minting policy then has to make sure that the adequate amount of ada is being transferred to the fund-managing-script when validating the minting transaction.
When creating the minting transaction you can use Constraints.mustPayToOtherScript to send funds to the script.


Can we expect to see already existing stablecoins on Cardano?

As far as I know, the Liquity team is interested to have their protocol deployed on Cardano too. But it is too early to tell.